Created
October 4, 2022 11:00
-
-
Save postspectacular/a58e409234e8291827b643650b979715 to your computer and use it in GitHub Desktop.
Zig command to build a WASM library, can't figure out equivalent using `build.zig` - help?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
zig build-lib -O ReleaseSmall -target wasm32-freestanding -dynamic --strip \ | |
--pkg-begin wasmapi ../../node_modules/@thi.ng/wasm-api/include/wasmapi.zig --pkg-end \ | |
--pkg-begin dom ../../node_modules/@thi.ng/wasm-api-dom/include/dom.zig --pkg-end \ | |
src/main.zig | |
# optional post processing & optimization | |
wasm-opt main.wasm -o main.wasm -O3 | |
wasm-dis -o main.wast main.wasm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment