Back to Developer Roadmap

Macros and Metaprogramming

src/data/roadmaps/rust/content/macros--metaprogramming@eTpZXd8E2jVBmk_aSLZYV.md

4.0775 B
Original Source

Macros and Metaprogramming

Macros are code that writes code, enabling metaprogramming in Rust. Declarative macros use macro_rules! for pattern-based code generation, while procedural macros provide custom derives and function-like macros. They're expanded at compile time, offering zero-cost abstractions.

Visit the following resources to learn more: