aboutsummaryrefslogtreecommitdiff
path: root/rtic-macros/src/codegen.rs
diff options
context:
space:
mode:
authorJohannes Cornelis Draaijer <johannes.draaijer@kiteshield.com>2025-09-03 13:53:50 +0200
committerHenrik Tjäder <henrik@tjaders.com>2025-09-17 19:40:38 +0200
commit3ba1632f8d8e4c5564de282ad359e33151956bb6 (patch)
tree6866e77ac14cfd12b124fa564c0faa9c180d1c29 /rtic-macros/src/codegen.rs
parentfa2c8c1dcdd74bd7e4268845a671e2ed146d0c1b (diff)
rtic-macros: forward attributes applied to app module
Instead of ignoring additional attributes applied to the app module, we can forward them to the generated code.
Diffstat (limited to 'rtic-macros/src/codegen.rs')
-rw-r--r--rtic-macros/src/codegen.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/rtic-macros/src/codegen.rs b/rtic-macros/src/codegen.rs
index 060db6d..e0cd033 100644
--- a/rtic-macros/src/codegen.rs
+++ b/rtic-macros/src/codegen.rs
@@ -44,12 +44,14 @@ pub fn app(app: &App, analysis: &Analysis) -> TokenStream2 {
let user_code = &app.user_code;
let name = &app.name;
let device = &app.args.device;
+ let attribute_metas = &app.attribute_metas;
let rt_err = util::rt_err_ident();
let async_limit = bindings::async_prio_limit(app, analysis);
quote!(
/// The RTIC application module
+ #(#[#attribute_metas])*
pub mod #name {
/// Always include the device crate which contains the vector table
use #device as #rt_err;