aboutsummaryrefslogtreecommitdiff
path: root/rtic-macros/src/codegen/extra_mods.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rtic-macros/src/codegen/extra_mods.rs')
-rw-r--r--rtic-macros/src/codegen/extra_mods.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/rtic-macros/src/codegen/extra_mods.rs b/rtic-macros/src/codegen/extra_mods.rs
new file mode 100644
index 0000000..b92dda6
--- /dev/null
+++ b/rtic-macros/src/codegen/extra_mods.rs
@@ -0,0 +1,9 @@
+use super::bindings::extra_modules;
+use crate::analyze::Analysis;
+use crate::syntax::ast::App;
+use proc_macro2::TokenStream as TokenStream2;
+
+/// Generates code that runs before `#[init]`
+pub fn codegen(app: &App, analysis: &Analysis) -> Vec<TokenStream2> {
+ extra_modules(app, analysis)
+}