"WASM: Bringing Go to the Browser (and Beyond!)"
summary
Go 1.11 compiles Go into WebAssembly using GOOS=js GOARCH=wasm plus the syscall/js package and the provided wasmexec glue, letting Go call into DOM and expose Go functions to JavaScript. Demo converts a JS byte array image to grayscale with the Go image library and returns a JS typed array. CloudFlare Workers run the same WASM endpoint (gabbi.fish/grayscale). Containers add ~500ms cold start; Go WASM currently asks for ~1GB but work targets ~16MB.
AI-written summary · about
chapters (11)
- 0:00Start
- 1:14Go Development Cycle
- 2:06Browser Environment
- 3:34Web Assembly
- 5:03Tooling
- 5:40Disclaimer
- 7:27Expose Go to Javascript
- 12:36Scope Class
- 13:16Import Object
- 15:32Demo
- 24:45Memory Usage
related talks
08mRunning Go in Browsers Using WASM
25mWebAssembly with Go: Powering the Web with Speed and Efficiency
18mGet Going With WebAssembly
29mExperimenting with Golang and Webassembly
36mGo in the World of WebAssembly: Not Just the Browser
37mGo, WebAssembly!
36mGo in the WebAssembly World: Beyond the Browser
29mWeb Assembly, the Future of JS, and a multi-language web
