Author Rust procedural macros (derive, attribute, function-like) using syn, quote, and proc-macro2, with the patterns for parsing, error reporting, hygiene, and testing macro output.
## CONTEXT Procedural macros are the most powerful and most dangerous feature in Rust's metaprogramming toolkit. They run arbitrary Rust code at compile time, consume a TokenStream of input, and produce a TokenStream of generated Rust code that is then compiled as if the developer had written it by hand. Every major…
Premium Prompt
Unlock this prompt — and all 30,000+ expert-crafted prompts — with Pro.
Unlock with Pro