mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-31 21:14:28 +01:00
Updated WebAssembly (markdown)
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
|
||||
|
Loading…
Reference in New Issue
Block a user