3 ms·
I just started playing with Go's WebAssembly support last night. Support is still nascent but I was able to get up and running very quickly, and the API is dead
by enneff 8y ago
I just started playing with Go's WebAssembly support last night. Support is still nascent but I was able to get up and running very quickly, and the API is dead simple: https://github.com/golang/go/wiki/WebAssembly https://github.com/golang/go/wiki/WebAssembly
- justinclift 8y agoOn the Go front, TinyGo (a subset of Go targeting embedded dev) recently added Wasm support: https://github.com/aykevl/tinygo https://github.com/aykevl/tinygo It's output files are very small (~1kb for the toy examples), as it does dead code elimination, which is missing from the mainline Go approach (for now). Both Go and TinyGo are in very early stages of their Wasm support though, so things are changing and updating fairly quickly. :)
- bloomer 8y agoThe go compiler does dead code elimination. I'm not familiar with TinyGo but from the readme one thing it does do differently is drop the whole scheduler if there are no blocking go routines.
- justinclift 8y ago> The go compiler does dead code elimination. For Wasm output? It really doesn't seem like it. Output binaries from the mainline Go compiler (atm) are ~2MB. Most of which is dead code.