Hacker News new | ask | show | jobs
by vlakreeh 955 days ago
> we can already see this by compiling build and proc macro crates with optimizations, it's just not the default and they still have to be compiled once.

I'm hopeful something like watt (https://github.com/dtolnay/watt) will land in Cargo that'll allow us to ship pre-compiled wasm blobs for proc-macros so we can just have sandboxed binaries.

1 comments

That'll be great for proc-macros, although it won't work for build scripts.
Why not?
It could, in theory. But build scripts can do arbitrary things so the wasm sandbox would need to allow for that.
I think the whole point is to prevent build scripts from doing arbitrary things. The sandbox should give access to the source code being built, record changes to these files (and/or new files generated in the same directories), and that's about it.
That's a cool idea but it would be a major breaking change. For proc-macros it's less of a major breaking change, though it is absolutely still one.