This is just a very experimental idea, but I mentioned before that realizers will support WASM execution (for truly cross platform island->derivation conversion) and I thought: Why not do this for Cab itself?
\program = runtime ==> (
execute "${lib.getExe packages.cargo}" [ "build" ];
exit 0
);
derive {
features = [ "wasm" ],
command = ./cab-runtime.wasm,
arguments = [ (lib.compile program).wasmExecutablePath ],
}
This is definitely worth exploring IMO
Here we have a minimal WASM runtime for Cab (via Rust WASM cross compilation) that runs Cab bytecode (made to be tiny)
@Tim DeHerrera @Andreas what do you guys think?
so the "builder" is a wasm binary, essentialy?
Yup
looks like someone just asked a similar question to the tvix guys, might be good to review their response:
https://matrix.to/#/!YUnRYAzgytLSZbBhbx:hackint.org/$Sbspe2NOL3nYD2MQnmARWrnQ0SI2tOfT0GuK3s6qQck?via=hackint.org&via=matrix.org&via=envs.net
Last updated: Nov 15 2024 at 11:45 UTC