nandi@ubuntu-16gb-hel1-1:~/code/rocky$ roc build --target=wasm32 pi.roc
0 errors and 0 warnings found in 1852 ms while successfully building:
pi.wasm
nandi@ubuntu-16gb-hel1-1:~/code/rocky$ wasmtime run pi.wasm
pi (Dec, 3 iters): 3.141592653589735643
It's very cool.
We're building the interpreter shim into an object file amd embedding that into the roc cli. Then when you build an app we embed the compiled app into that shim and link it with the host .. so you can have a standalone WASM module.
Looking forward to see what kind of platform innovation this unlocks.
I've only been able to get the modules down to like 2.5MB in size. But when we actually lower to machine code using llvm we should be able to have very tiny sized wasm modules and even more performance.
@nandi did you find the wasm example in the repo to follow?
Luke Boswell said:
nandi did you find the wasm example in the repo to follow?
I didn't see that. There were issues with my build but I just vibe coded them away with codex lol
playing around with new compiler and wasm
Last updated: Jan 12 2026 at 12:19 UTC