2 ms·
This reminds me of genrules in Bazel. Bazel is a sandboxed build system where code-generating tools need to declare all inputs and outputs. Before running a cod
by skybrian 7y ago
This reminds me of genrules in Bazel. Bazel is a sandboxed build system where code-generating tools need to declare all inputs and outputs. Before running a code generating tool, Bazel needs to compile it for the platform that's running Bazel. The code-generation binary can be cached, though.
Procmacros in Rust also imply a build system that runs arbitrary code, so it's interesting to see them exploring a similar direction.
- swsieber 7y agoSo the initial implementation doesn't allow any inputs/outputs besides the tokenstreams, but some proc macros do access the filesystem. There's definitely more exploration to be done both with proc macros, and the general build system (which allows execution of arbitrary rust code as well, but which tends to touch the file system a lot more). This definitely seems like a good starting point for adding security to the build system.