Try   HackMD

Reading Club: Continuing Declarative (macro_rules!) macro improvements

  • April 15 2025
  • Participant: Vincent (@vincenzopalazzo), Josh (@joshtriplett)

Topic

Reading club about the rust project goal 2025

Reading the RFC https://github.com/joshtriplett/rfcs/blob/declarative-attribute-macros.md/text/3697-declarative-attribute-macros.md

Minutes

Discussion about priorities for prototyping order:

  • Attribute macros
  • Derive macros
  • Initial macro fragment fields
  • Further

Questions

Vincent: Wondering if writing the attr macro in the following way is more intuitive for the user & make the code to implement from the compiler side easy and reusable

macro_rules! main { attr { ($func:item) => { make_async_main!($func) }; (threads = $threads:literal) ($func:item) => { make_async_main!($threads, $func) }; } }