Haha I stole inspiration from @spritelyinst's work on Hoot tonight, and implemented a macro in Elixir that lets me generate WebAssembly modules.

This program generates a Wasm4 game that lets me control a smiley face using my arrow keys.

Next up will be lowering directly from high-level Elixir code, so that you don't need to manually write everything as stack operations.

Follow

@quinn @spritelyinst how much did it take you? Or Elixir already had some webassembly implementation? I'm asking because it took me like a month to implement webassembly in and I'm trying to understand if I should feel bad about it.

@jonn @spritelyinst you definitely shouldn't feel bad! I did this from scratch in about 6-8 hours or so, but note that this isn't an implementation of a WebAssembly runtime or anything like that: it's basically just a glorified assembler

@quinn @spritelyinst ah! Okay! So you assemble and run in an existing runtime. Still really cool!

Sign in to participate in the conversation
Doma Social

Mastodon server of https://doma.dev.