Show HN: macro_magic – access foreign item tokens in Rust proc/attribute macros

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • polkadot-sdk

    The Parity Polkadot Blockchain SDK

  • Crate author here, macro_magic takes an extremely tricky to implement (and thus rare in the wild) pattern for accessing the tokens of foreign items in Rust within proc/attribute macros by path, the decl macro callback pattern, and makes it easy to use and full accessible for people who want to leverage this superpower in their proc and attribute macros.

    This approach enables some very exotic functionality that is normally impossible in rust proc macros, where you can decorate an item _anywhere_ with your attribute macro, and that item's tokens will become accessible when referenced by path as part of the input to any macro_magic-amplified proc or attribute macro.

    Some crates/ecosystems making use of macro_magic already include:

    - https://crates.io/crates/supertrait (enables default associated types in stable rust)

    - https://github.com/paritytech/polkadot-sdk

    Happy to answer any questions anyone may have about macro_magic!

    Also worth noting, I am on the job market looking for my next Rust and/or CTO position :) -- info in bio

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts