Crate mini_macro_magic
source ·Expand description
MMM 😋
Export tokens to other crates. Now with 100% less proc macros!
This crate provides the export macro which allows exporting tokens.
The concept is similar to that used by the inspiration for this crate macro_magic.
Namely, a macro_rules is generated alongside the tokens to be exported. This macro_rules will invoke a passed macro with the tokens exported. Simple as that.
The difference to macro_magic is that this
crate does it all with one macro_rules! macro. No more need to poll in a set of proc macros
if you don’t need the full power of macro_magic. Instead use export to generate a
macro you or a dependant can use. Also, a dependant doesn’t need to know about
mini_macro_magic to use the generated macro_rules. They are fully self contained.
no_std
mini_macro_magic is fully no_std compatible.
Modules
- Example of using
export. (This module is not part of the crate’s public API)
Macros
- Export tokens for use by other macros.