wasm-go is a module that is designed to compile a WebAssembly module from Go. There is a publication for this repository which can be found here.
cd app/ && GOOS=js GOARCH=wasm go build -o ../public/app.wasm
cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" ../public/app.js
go run webserver.go
Navigate to http://localhost:9990/, open the JavaScript debug console, and you should
see the output. You can modify the program, rebuild app.wasm
, and refresh to see new output.