This is a command line tool that acts as a companion to my w4 module for Zig ⚡
w4-init is used to create a directory containing code that
allows you to promptly get started coding on a cart for the
lovely little fantasy console WASM-4.
The Zig build .target is declared as .{ .cpu_arch = .wasm32, .os_tag = .wasi }
and .optimize is set to .ReleaseSmall
Important
No need to specify -Doptimize=ReleaseSmall
Requires you to have Go installed.
go install github.com/peterhellberg/w4-init@latestRequires you to have an up to date (nightly) version of Zig installed.
(As well as npx, which is part of Node.js these days)
w4-init mycart
cd mycart
zig build runNote
There is also a zig build --watch command that can
be used to trigger automatic reload of the WASM-4
cart running in the browser when a file is changed.
🌱