pub trait RticPass {
// Required methods
fn run_pass(
&self,
args: TokenStream2,
app_mod: ItemMod,
) -> Result<(TokenStream2, ItemMod)>;
fn pass_name(&self) -> &str;
}
Expand description
A trait that allows defining a Compilation Pass.
A Compilation Pass can be thought of as a (partial) proc-macro that expands parts of the user RTIC application once all the compilation passes provided using RticMacroBuilder::bind_pre_core_pass and RticMacroBuilder::bind_post_core_pass are run. The resulting code should be comprised only of init, idle , shared resources and tasks (that may be bound to interrupts) that share those resources. The Core Pass then will take over from there to generate all the necessary logic and expand the user application further to an application understandable by the Rust compiler.
Required Methods§
sourcefn run_pass(
&self,
args: TokenStream2,
app_mod: ItemMod,
) -> Result<(TokenStream2, ItemMod)>
fn run_pass( &self, args: TokenStream2, app_mod: ItemMod, ) -> Result<(TokenStream2, ItemMod)>
Runs the (partial) proc-macro logic that allows extending the basic RTIC syntax