chriscow / go-wasm-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build

Build the webassembly binary GOOS=js GOARCH=wasm go build -o ./build/example.wasm main.go

Copy the wasm_exec.js helper cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" ./build/

Serve python3 -m http.server

Reference

[Compile Go to WebAssembly] (https://fodor.org/blog/go-to-webassembly/)

About


Languages

Language:Go 95.9%Language:HTML 4.1%