Skip to content
Experimental code playing with Go and WebAssembly
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitattributes
.gitignore
README.md
build.sh
index.html
manifest.json
test.go
wasm_exec.js

README.md

This is some experimental code for working with Go and WebAssembly.

Prerequisite

As of this writing, the Go release doesn't support WebAssembly so the version of Go from neelance is needed.

See https://blog.lazyhacker.com/2018/05/webassembly-wasm-with-go.html for how to build Go with WASM.

Install

go get lazyhackergo.com/wasmgo
cd $GOPATH/src/lazyhackergo.com/wasmgo
./build.sh

Note: build.sh assumes that the 'go' command is located in $HOME/go-wasm/bin. Make sure GOROOT is pointing to the 'go' command that has WASM support.

Running

The code needs to be served through a web server.

go install lazyhackergo/simplehttpserver
$GOPATH/bin/simplehttpserver
You can’t perform that action at this time.