virtual machine. WASM is designed as a portable target for compilation of high-level languages like C/C++/Rust/Go, enabling deployment on the web for client and server applications. WebAssembly WebAssembly?
size is at minimum around 2 MB • Go programs can call into JavaScript • new experimental syscall/js package • new GOOS value "js" and GOARCH value "wasm"
• No native DOM APIs (yet - OS lib is out there) • No multithreading (yet) • Large binary file sizes • Performance not yet where it should be • Some core libraries are not supported ◦ Parts of the net-package =( ◦ ...
package js Package js gives access to the WebAssembly host environment when using the js/wasm architecture. Its API is based on JavaScript semantics. This package is EXPERIMENTAL. Its current scope is only to allow tests to run, but not yet to provide a comprehensive API for users. It is exempt from the Go compatibility promise. $ godoc syscall/js | head -n 12
serve it locally or upload it • github.com/gopherjs/vecty ◦ Vecty is a React-like library for GopherJS -> currently working on WASM support • Grpcweb.jbrandhorst.com ◦ GopherJS gRPC-Web Client -> currently working on WASM support Go & WASM - Past, Present & Future
& WASM hacking • Jason Murray (@chaosaffe) - Title of the talk • Markus Zimmermann (@markus_zm) - stole some ideas & slides from him • The great team of the GoDays(@godaysio) for organizing this event