I’ve had a thought of a build system + package manager that only ever executes wasm, and I feel like rust is the perfect language both to create this build system as well as be one of the primary languages using it (although ideally it could support any language).
Basic idea:
- very similar to Nix package manager, except gets around the complexity of multiple build systems / build targets. Also I’d use jsonnet for the config language personally, where inputs to build steps are passed as only files in NAR archives and json blobs into stdin.
- only runs wasm – i.e. compilers are wasm and output “binaries” are wasm. Obviously there might be intermediate object files/etc that are not wasm – but they also don’t get executed.
- deterministic inputs/outputs could allow for truly distributed builds. You know the exact hash of your inputs, and you could have “trusted signatures” to simply download the intermediate outputs. Think a web-level build system with multiple actors. Possibly even do something blockchain-esque and have multiple sources build things and compare to mark as “trusted”… you could go crazy here.
Anyway, none of this is possible if we don’t have the “stage0” rustc.wasm compiler – in other words we need rust to build rust into a wasm target. We also need a wasm engine capable of at least file+network I/O, which I’m not sure is quite there yet.
Anyway, wondering how close these goals are to reality to determine when I should get started