https://github.com/meheleventyone/zig-wasm-test
A minimal Web Assembly example using Zig's build system.
https://github.com/meheleventyone/zig-wasm-test
typescript wasm webassembly zig
Last synced: 6 months ago
JSON representation
A minimal Web Assembly example using Zig's build system.
- Host: GitHub
- URL: https://github.com/meheleventyone/zig-wasm-test
- Owner: meheleventyone
- Created: 2018-11-20T22:10:38.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-07-03T10:45:59.000Z (over 1 year ago)
- Last Synced: 2025-05-02T23:43:04.706Z (6 months ago)
- Topics: typescript, wasm, webassembly, zig
- Language: Zig
- Homepage:
- Size: 28.3 KB
- Stars: 55
- Watchers: 2
- Forks: 10
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-zig - meheleventyone/zig-wasm-test
- awesome-zig - zig-wasm-test🗒️A minimal Web Assembly example using Zig's build system
README
# zig-wasm-test
A minimal Web Assembly example built with Zig.
## Building
To build this project with a working Zig at 0.11.0 and TypeScript install at the project root just type.
```
zig build
```
You need to move the resulting wasmtest.wasm file from /zig-out/lib to /www/. One has been committed if you're happy omitting this step.
For good measure you can then build the TypeScript file:
```
cd www
tsc wasmtest.ts
```
## Running
Start the web server of your choice serving the www folder and navigate to wasmtest.html in your browser of choice. The value 7 should be output in the console.