-
Copy
wasm_exec.js
from the standardGo
installation in this folder (only once).cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" .
-
Compile the code
GOARCH=wasm GOOS=js go build -o demo.wasm demos/triangle.go demos/shader_helpers.go
-
Serve the web page
go run server.go
-
Open the following URL in a browser: http://localhost:8080/
examples
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||