This is a minimal zig + wasm example to be used in a browser
- Run
git clone https://github.com/mumboo/zig-wasm-browser.gitcommand to clone a repository - Run
cd zig-wasm-browserto change directory to repository root folder - Run
zig buildcommand in your terminal- Output will be located in
zig-out/libfolder
- Output will be located in
- Start http server from
zig-out/libfolder - In a browser go to an address of your running server (e.g.
127.0.0.1:5500/index.html) - Open developer console and make sure you see
Result: 3output