Re-exporting macros
⚓ Rust 📅 2025-05-23 👤 surdeus 👁️ 10I'd like to do something like this:
macros_for_type_A.rs is a file that re-exports macros defined in various files. Then other files relevant to this type can simply do use macros_for_type_A::* and get the macros they need.
My understanding is that #[macro_export] makes macros globally available; is there a more modest alternative similar to functions? And with this one would always have to call them as macros_for_type_A.rs::macro!() rather than macro!() ?
4 posts - 3 participants
🏷️ rust_feed