Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
xigoi
on May 20, 2022
|
parent
|
context
|
favorite
| on:
Rust: A Critical Retrospective
But there's the weird limitation that procedural macros have to be in a separate crate.
efaref
on May 20, 2022
[–]
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.
xigoi
on May 20, 2022
|
parent
[–]
Because you can't just throw together a simple procedural macro to use in a specific project, as you can in other languages.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: