Compiling a New C/C++ Module to WebAssembly - WebAssembly | MDN
docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) \
emscripten/emsdk emcc helloworld.c -o helloworld.html --shell-file template.html
https://github.com/tinygo-org/tinygo/tree/release/src/examples/wasm
tinygo build -o ./simple_call.wasm -target wasm ./simple_call.go
tinygo build -o ./advanced_call.wasm -target wasm ./advanced_call.go
tinygo build -o ./dom_interop.wasm -target wasm ./dom_interop.go
Links:
- Using WebAssembly | TinyGo
- tinygo/src/examples/wasm at release · tinygo-org/tinygo
- WebAssembly using Go (Golang) | Run Go programs in the browser
- js package - syscall/js - pkg.go.dev
- Passing strings between TinyGo and JavaScript — Blog documentation
- syscall/js.finalizeRef not implemented · Issue #1140 · tinygo-org/tinygo