mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-10-25 17:42:27 +08:00
* refactor: clean to roadmap content * refactor: move shared helpers into scripts/lib
10 lines
775 B
Markdown
10 lines
775 B
Markdown
# 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:
|
|
|
|
- [@official@Macros](https://doc.rust-lang.org/book/ch20-05-macros.html)
|
|
- [@official@macro_rules!](https://doc.rust-lang.org/rust-by-example/macros.html)
|
|
- [@article@Macros in Rust: A Tutorial with Examples](https://blog.logrocket.com/macros-in-rust-a-tutorial-with-examples/)
|
|
- [@article@Metaprogramming Magic in Rust: The Complete Guide](https://elitedev.in/rust/metaprogramming-magic-in-rust-the-complete-guide-/) |