Master Windows Internals - Kernel Programming, Debugging & Architecture
Master AI and Machine Learning: From Neural Networks to Applications
Overview
Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This talk presents nine rules for creating Rust procedural macros, covering project structure, debugging, syntax tree manipulation, and API design.
Syllabus
Nine Rules for Creating Procedural Macros in Rust
Talk's Approach: 9 "Rules"
Develop as a normal (non-macro) project
Convert freely: Strings, Syntax trees, Literal code
Create debuggable unit tests
Understand Rust syntax trees
Recursively manipulate syntax trees
Follow the rules of elegant Rust API design
Conclusion: Follow these 9 rules and ... writing macros as easy as writing a regular Rust program ... that manipulates large, nested structs.
Taught by
Rust