An example demonstrating Zig interacting with a canvas via JS. It is a port of one of the official mozilla examples.
https://developer.mozilla.org/en-US/docs/WebAssembly
- Install Zig
- Install Node.js
- Install dependencies
npm install
npm run build
npm start
# Then open http://localhost:3000
# You should see a simple triangle in translating horizontally in a loop