Learn to generate a WASM library that can be used in a browser.
To build the library, use the following.
zig build
Start a web server in the project directory. You can use npm http-server.
npx http-server
Once web server is running, open http://127.0.0.1:8080 in a web browser.
My work is based on https://blog.battlefy.com/zig-made-it-easy-to-pass-strings-back-and-forth-with-webassembly.