Badge WASM Runtime

Contents

Last year (2025), I did some cool expirements with trying to put a wasm vm on the hackrva rvasec badge. This would have provided a way to write badge apps in other programming languages (languages that can compile down to wasm).

Due to the space / memory constraints on actual hardware it ended up seeming a bit pointless.

I believe the badge runs rp2040 with about 2MB flash and 256k ram.

If you're curious, there's a branch called wasmrt-experimental in the badge2026 repo on github.

Libraries

I did my experiments with wasm3. It was pretty minimal and easy to set up.

The Bytecode Alliance released wasm-micro-runtime [wamr]​ that I also played around with a bit.

WASM Blob size

Most languages that compile down to wasm include a bunch of hooplah required for that language's runtime (e.g. golang). Even when I tried using tinygo (go compiled using LLVM), the wasm size was much larger than similar apps written in C. I was able to get fairly small wasm blobs with apps written in C, zig, Assemblyscript.

Conclusion

It was fun to play around with this, but it added tooling complexity and it probably wasn't feasible with the hardware constraints.