Hacker News new | ask | show | jobs
by nasso_dev 168 days ago
Aren't procedural macros amd build.rs arbitrary code being executed at build time?
1 comments

Pretty much, yes. And they don’t have much as far as isolation goes. It’s a bit frightening honestly.

It does unlock some interesting things to be sure, like sqlx’ macros that check the query at compile time by connecting to the database and checking the query against it. If this sounds like the compiler connecting to a database, well, it’s because it is.