Updated WebAssembly (markdown)

Hajime Hoshi 2018-08-26 15:39:37 +09:00
parent 0d2f75d355
commit 464cd46ee1

@ -4,21 +4,16 @@ The easiest way is to use [WasmServe](https://github.com/hajimehoshi/wasmserve)
Note that you'd need the master branch of Ebiten (v1.7.x doesn't work with WebAssembly).
# Get the latest Go
1. Checkout the latest Go (https://go.googlesource.com/go)
2. Compile the compiler by running `./make.bash`
# Compile your game
```sh
GOOS=js GOARCH=wasm /path/to/latest/gocode/bin/go build -o yourgame.wasm github.com/yourname/yourgame
GOOS=js GOARCH=wasm /usr/local/go/bin/go build -o yourgame.wasm github.com/yourname/yourgame
```
# Copy `wasm_exec.js` to execute the Wasm binary
```sh
cp /path/to/latest/gocode/misc/wasm_exec.js .
cp /usr/local/go/misc/wasm_exec.js .
```
# Create an HTML