Post

Nix friends: How terrible is this idea? I added `builtins.runWasm` to nix, allowing you to call out to Wasm. The Wasm is reset every time, so the functions remain pure. This gives you a (performant?) escape hatch for things that Nix is missing. E.g parsing YAML (here: via Rust)

0 reposts8 likes

I'm curious, WASM obviously doesn't have a concept of strings so what does the interface look like? would this work with other languages compiled to WASM?

For now, I established the convention the the parameters must be pointers to byte arrays containing UTF-8 encoded JSON strings. I think that’s actually quite feasible. But the real deal would be to use the Wasm component model imo