NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io
crates.io, #2424 most downloaded on crates.io
Support macros for macro_magic_core
Latest stable
0.6.0
Last release 2 years ago
no release in 18 months
Ships unpredictably
gaps range from 8 days to 9 months
Nearly every release is documented
notes for 24 of 24 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
24 releases · first in 2023
Drag across the ruler to compare, or tap a release to open it.
Upgrades edition to Rust 2024 🎉
Upgrades edition to Rust 2024 🎉
upgrade derive-syn-parse to 2.0 so syn is fully upgraded to 2.0 now (thanks @jmg-duarte!)
derive-syn-parse to 2.0 so syn is fully upgraded to 2.0 now (thanks @jmg-duarte!)Previous release should have been a major release because breaking change, 0.4.3 will be yanked and replaced with this 0.5.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Previous release should have been a major release because breaking change, 0.4.3 will be yanked and replaced with this 0.5.0
Adds ability to have the auto-generated export_tokens macro name match the name of the exported item, since apparently this does not cause a conflict
Adds ability to have the auto-generated export_tokens macro name match the name of the exported item, since apparently this does not cause a conflict (#13, thanks @gupnik!)
Adds a stronger uniqueness guarantee to new_unique_export_tokens_ident by incorporating a compilation-unique tag.
Adds a stronger uniqueness guarantee to new_unique_export_tokens_ident by incorporating a compilation-unique tag.
This will resolve situations where crates using separate instances of macro_magic that happen to have #[export_tokens] declarations that use the same name and happen to have the same COUNTER value are glob imported into the same module/scope.
Though these scenarios are already exceedingly rare, after this change for this to happen again two separate macro_magic compilations would also have to have their COMPILATION_TAG: u32 value collide, which is as unlikely as two random u32 values colliding, in addition to all of the other collision requirements laid out above. So this shouldn't be an issue anymore for anyone. If it does happen, you can rest assured it will go away after a fresh compile unless the universe truly despises you.
fixes mm_override_path / MACRO_MAGIC_ROOT with leading :: not always working
mm_override_path / MACRO_MAGIC_ROOT with leading :: not always working(#10 / #11)
This release contains breaking changes.
This release contains breaking changes.
#[use_attr] has been removed#[use_proc] has been removedpretty_print feature has been removed. For a better alternative see my proc-utils crate.#[export_tokens] that would normally be inaccessible due to private modules or inaccessible path has been removed#[import_tokens_proc] and #[import_tokens_attr] now no longer need #[use_attr] and #[use_proc] to be brought into scope properly or re-exported, thanks to a new self-calling macro structure.MACRO_MAGIC_ROOT/mm_override_path can now also be overridden on #[import_tokens_proc] and #[import_tokens_attr] by passing a path or an expr (the expr option is new). The expr must evaluate to something compatible with Into<String> and must contain a valid path to a macro_magic re-export.#[export_tokens] which allows for multiple items with the same name in the same crate (but not at the same path) and enables streamlined importing and re-exporting of macros created via macro_magic,Now properly throws a compile error at parsing time when a non-path is passed in the place of mm_override_path
Now properly throws a compile error at parsing time when a non-path is passed in the place of mm_override_path
hotfix to add #[doc(hidden)] to #[export_tokens] generated macro
#[doc(hidden)] to #[export_tokens] generated macroadds #[with_custom_parsing(..)] attribute to be used in tandem with #[import_tokens_attr]
#[with_custom_parsing(..)] attribute to be used in tandem with #[import_tokens_attr]cargo test with no features enabledExposes #[export_tokens_no_emit] from the crate root.
Exposes #[export_tokens_no_emit] from the crate root.
add #[export_tokens_no_emit] variant and emit boolean option on export_tokens_internal in core, which allows you to decide whether you want the item #
#[export_tokens_no_emit] variant and emit boolean option on export_tokens_internal in core, which allows you to decide whether you want the item #[export_tokens] is attached to to emit the tokens locally (the default/old behavior is that the tokens are always emitted). This is useful for scenarios where you want to define some code in one place but have it only compile in another place via macro_magicOfficially upgrades to version 2.x for syn and the latest 1.x for proc-macro2 and quote
Officially upgrades to version 2.x for syn and the latest 1.x for proc-macro2 and quote
fixes broken cargo docs / docs.rs missing feature gated items
fixes broken cargo docs / docs.rs missing feature gated items
feature gates potentially no_std breaking items depending on proc_macro2 that should only be used when compiling proc macros
no_std breaking items depending on proc_macro2 that should only be used when compiling proc macrosimport_tokens_attr and import_tokens_proc and related proc macro building functionality will need to enable the proc_support feature in order to function properlyremove convert_case crate and replace with a bespoke snake_case method
convert_case crate and replace with a bespoke snake_case methodno_std issues specific to substrategate pretty_print function behind a pretty_print feature, disabled by default
pretty_print function behind a pretty_print feature, disabled by defaultcargo test with all features enabled and as a separate job with no features enabledmake main crate and all sub-crates 100% no_std and update docs accordingly
core crate to mm_core (macro_magic::mm_core) to avoid conflicts with the built-in rust core crate when macro_magic is imported via use macro_magic::*Fully fix distant re-export issues where macros created using macro_magic are re-exported and then re-exported again
export_tokens macro layout that supports re-exported paths better and always works in expr position 🎉Make __source_path available to macros created via #[import_tokens_attr]
Make __source_path available to macros created via #[import_tokens_attr]
Allow applying attributes and doc comments to items with #[use_proc] or #[use_attr] attached
Allow applying attributes and doc comments to items with #[use_proc] or #[use_attr] attached
Adds #[use_attr] and #[use_proc] attributes that allow easy importing and re-exporting of attributes and proc macros created by #[import_tokens_proc]
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).
Added ability to override MACRO_MAGIC_ROOT directly on the proc macro decorators by providing the alternate path as an argument to the attributes
Added ability to override MACRO_MAGIC_ROOT directly on the proc macro decorators by providing the alternate path as an argument to the attributes
v0.2.2 Compare # Choose a tag to compare
v0.2.2
Compare
One column per quarter.