A small browser game written in Zig and compiled to WebAssembly. The premise is trivial — chase a dot around the screen. The point was never the game. It was the question: what does it feel like to write something playful in a language designed for serious systems work?
Zig doesn't want to be in the browser. It has no garbage collector, no runtime, no opinion about the DOM. Getting it there means compiling to WASM and bridging the gap with a thin JavaScript loader. The interesting part is how little JavaScript you actually need — the game logic, the movement, the state, all lives in Zig. JS just hands it a canvas and steps back.
The result is fast in a way that feels disproportionate to what it's doing. A dot moving on a screen shouldn't feel like anything — but when the frame updates are coming from compiled machine-level code, there's a crispness to it. No jank. No GC pause. Just a dot.