An RTIC distribution is a rust crate that exposes the RTIC attribute proc-macro implemented for a specific hardware architecture, or for a specific micro-controller, or even for a specific target use case (with non-standard syntax). For example, we could have a distribution for single core cortex-m devices, another distribution specifically tailored for the multicore RP2040, a distribution for risc-v architecture ... etc.
The responsibility for a distribution crate is to:
- Implement the low level hardware specific details and provide/bind that to the hardware agnostic RTIC compilation passes.
- Integrate a selection of compatible Compilation passes and optionally expose them to the user as a set of features which the user can select to enable.
- Expose the RTIC proc macro generated by
RticMacroBuilder
after performing the previous two steps
Distributions allow the RTIC code-base growth more controllable and provides an alternative approach to the older approach in which all the hardware specific details all belong to a single crate maintained by the RTIC team, and users choose an implementation for some specific hardware is chosen by enabling a corresponding rust feature for their target hardware.
todo: provide short example and link to template distro