r/Zig • u/drone-ah • Sep 16 '25
Using Zig + Lume for WASM with automatic reload
I’ve been experimenting with a small side project and wanted to share how I got a smooth workflow going between Zig, Lume, and WebAssembly.
The setup:
- Zig + sokol for graphics
- ImGui for UI
- Lume (a Deno static site generator) for the frontend
I wired up build.zig so that after Emscripten links, the .wasm and .js outputs are automatically copied into Lume’s static folder. With zig build --watch running alongside deno task serve, any Zig or frontend change triggers a rebuild and browser reload.
It’s not hot reload, but it feels fast and seamless enough for development. I wrote up the details here: https://drone-ah.com/2025/09/16/auto-reload-wasm-with-zig-lume/
Would love to hear if others have tried similar setups (or better ways to handle the JS/WASM split).
3
u/anon-sourcerer Sep 16 '25
Really interesting stack, thanks for sharing! Could you also expand a bit on what Shine is meant to do? I found it hard to piece that together from the blog.
3
u/SilvernClaws Sep 17 '25
Nice. Lume is pretty underrated.
2
u/marler8997 Sep 17 '25
I haven't heard of lume...googling reveals it's a static site generator? Are you familiar with Loris's ssg framework? https://zine-ssg.io/. If so, I'm curious about the differences between them if you're able to provide a comparison.
2
u/AirlineFragrant Sep 20 '25
Sweet ! Lume addition sounds great, gotta try it. I did make a zig + raylib into WASM for my dev portfolio (yeah overkill but it was fun ).