From Zed to WASM-4: How a Zig Discord Rabbit Hole Got Me Building Tiny Games

WASM-4 Setup (Aug 9, 2026)

Tonight I finally got WASM-4 up and running on my Debian machine.

I arrived here through a chain of tools I’ve been exploring lately. It started with Zed, then curiosity about Roc, which led me into Zig, and eventually into conversations on the Zig Discord. Somewhere in those discussions WASM-4 kept coming up as a clean, minimal way to actually make something small and complete with WebAssembly. That was enough to pull me in.

I installed it globally with npm install -g wasm4. After a few deprecation warnings it landed cleanly at version 2.7.1. From there I created a new AssemblyScript project (w4 new my-game), ran the usual setup (npm install + npm run build), and started wrestling with the runtime.

The web version worked first (w4 run / w4 watch), serving the cart on localhost and giving me a QR code. The native version (w4 run-native) initially failed with the cryptic error “only one memory per module is supported.” That turned out to be caused by “importMemory”: true in asconfig.json. Removing the flag fixed it, and suddenly I had a real desktop window showing the classic “Hello from AssemblyScript!” screen with the blinking smiley.

Along the way I also had to:

  • Fix the PATH so the w4 binary (living in ~/.npm-global/bin) could be found again
  • Raise the Linux inotify watcher limit because w4 watch kept dying with ENOSPC
  • Deal with port 4444 already being occupied, forcing the server onto 4445

By the end of the night both the browser version and the native window were working. I now have a clean, minimal foundation ready for actually writing a small game — which was the whole point of the detour through Zed, Roc, Zig, and the Discord in the first place.