Stream: show and tell

Topic: wasm


view this post on Zulip nandi (Dec 22 2025 at 21:06):

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

view this post on Zulip Luke Boswell (Dec 22 2025 at 21:50):

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.

view this post on Zulip Luke Boswell (Dec 22 2025 at 21:51):

@nandi did you find the wasm example in the repo to follow?

view this post on Zulip nandi (Dec 22 2025 at 22:48):

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

view this post on Zulip nandi (Dec 23 2025 at 05:29):

playing around with new compiler and wasm

image.png


Last updated: Jan 12 2026 at 12:19 UTC