Install newest Go-lang. Last stable version for this project:
go version go1.18.3 darwin/amd64
Build to wasm file:
GOOS=js GOARCH=wasm go build -o ../../assets/json.wasm
This Go integration uses wasm_exec.js
file.
The file can be found in golang environment. In my case it was:
~⚙ ls ~/go/misc/wasm/*.js
/home/t/go/misc/wasm/wasm_exec.js
Extra settings for VS Code:
To .vscode/settings.json
add this entry:
{
"go.toolsEnvVars": {
"GOOS": "js",
"GOARCH": "wasm"
}
}