gojs example
This shows how to use Wasm built by go using GOOS=js GOARCH=wasm. Notably,
this uses filesystem support.
$ go run cat.go /test.txt
greet filesystem
Internally, this uses gojs, which implements the custom host functions required by Go.
Notes:
GOOS=js GOARCH=wasmwazero be removed after Go 1.22 is released. Please switch toGOOS=wasip1 GOARCH=wasmreleased in Go 1.21.GOWASM=satconv,signextenables features in WebAssembly Core Specification 2.0.