Re:Rust: A Critical Retrospective
by xigoi on Friday May 20, 2022 @06:05AM
(#31445368)
But there's the weird limitation that procedural macros have to be in a separate crate.
[ Parent
| on HN ]
Why is that weird? Procedural macros are compiler plugins. They get compiled for the platform you're building on, not the one you're building for, and so they need to be a separate compilation unit. In Rust, the crate is the compilation unit.