Releases: sam0x17/macro_magic
Releases · sam0x17/macro_magic
v0.2.4
Adds #[use_attr]
and #[use_proc]
attributes that allow easy importing and re-exporting of attributes and proc macros created by #[import_tokens_proc]
and #[import_tokens_attr]
, since these both create hidden helper macros that need to be brought into scope.
Can be used by simply applying #[use_proc]
or #[use_attr]
to a simple use statement, such as:
#[use_proc]
pub use some_crate::my_proc_macro;
or:
#[use_attr]
use some_crate::my_attribute;
More complex paths are not allowed, and tree-mode paths are not supported (paths using curly braces to bring in multiple items).
v0.2.3
v0.2.1
v0.2.0 - Overhaul
- completely removes unstable/non-future-proof usage of reading/writing files to the
OUT_DIR
- removes the ability to enumerate over
#[export_tokens]
calls in a particular namespace (should use outer macro pattern for this going forward) - removes namespacing
- removes the "indirect" and other features as they are no longer needed
- completely re-writes this crate using decl macro callbacks, meaning the basic functionality is now 100% safe and future-proof
- adds comprehensive docs and test suite
- adds helper macros that allow for the easy creation of proc and attribute macros that receive export_tokens tokens
v0.1.6
- support applying
#[export_tokens]
to any validsyn::Item
- when applying it to something that doesn't have a natural name/Ident, you are required to specify a disambiguation name (when using direct imports) or a disambiguation path (when using indirect imports)
- disambiguation names can now be used in direct import mode, as long as they are valid. Complex paths are not supported for this, just paths of depth 1.
v0.1.5
- adds new
macro_magic_core
/macro_magic::core
crate/module containing all core implementation code for#[export_tokens]
and the machinery behind indirect imports/exports in an easy-to-use form - functions in
macro_magic::core
can be used to make a custom#[export_tokens]
macro - fixes some minor docs issues and general clean up