Skip to content

Releases: sam0x17/macro_magic

v0.2.4

28 Mar 01:46
a4edd54
Compare
Choose a tag to compare

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

27 Mar 22:05
3688c29
Compare
Choose a tag to compare

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.1

24 Mar 20:08
db3dade
Compare
Choose a tag to compare

Adds initial MACRO_MAGIC_ROOT support

v0.2.0 - Overhaul

23 Mar 18:20
c1b0336
Compare
Choose a tag to compare
  • 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

09 Mar 20:56
377377c
Compare
Choose a tag to compare
  • support applying #[export_tokens] to any valid syn::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

08 Mar 06:44
bc7cace
Compare
Choose a tag to compare
  • 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

v0.1.4

07 Mar 23:29
e5ef249
Compare
Choose a tag to compare
  • adds "indirect-read" feature
  • adds "indirect-write" feature
  • fix some clone() issues with rust-analyzer
  • update CI
  • update docs

v0.1.3

07 Mar 23:01
708c1ab
Compare
Choose a tag to compare

Initial release. Includes:

  • direct exports/imports
  • indirect exports/imports
  • "indirect" feature for disabling/enabling indirect imports/exports support