u/420goonsquad420in r/rust • Recommends
On “Talk to me about macros”
…Rust proc macros are a whole different world. They let you execute arbitrary code at compile time, meaning you can make up syntax, run it through a proc macro, and have it spot out Rust code at the end. It's also how traits can be derived. Proc macros are magic.
If you want to learn more, I'd personally recommend Jon Gjengset's video(s) on them:
link to this video
link to this video
link to this video
Note that this is collectively about 10 hours of video, so buckle in.…