I'll be interested to find out more about interactivity with the rest of the javascript world via syscall/js.
I'll be interested to find out more about interactivity with the rest of the javascript world via syscall/js.
From the release notes:
> Go programs currently compile to one WebAssembly module that includes the Go runtime for goroutine scheduling, garbage collection, maps, etc. As a result, the resulting size is at minimum around 2 MB, or 500 KB compressed.
The minimum size is a bit unfortunate, but after all it is still just experimental.
Maybe they can use some DCE to get it smaller, idk. Go binaries have never been that small so I have my doubts, but hopefully!
EDIT: I see the release notes now that says 500k compressed. That's much better. I didn't realize webassembly could be compressed, is this just gzip?
This isn't a limitation we'd see with something like Rust.
The size of the Java Runtime Environment is around 80 MB (compressed). Even with Jigsaw and just the "java.base" module its still 13 MB (compressed).
My point isn't that Go should be banned from WASM or something, but that "5x increase in library size for zero functionality sounds fine" is a disappointing view to see given how hard the JS community has worked on bundle sizes.
No, since they are already in the browser at first place. That's the point. I don't need any extra runtime to run JS in the browser.
No linker will ever do that.
(Of course that would open up all the sorts of issues that static compiles get rid of.)
You can also use C or Rust and avoid GC altogether. Rust produces very small WASMs
I imagine that go to wasm would likely be used for situations where size won't matter too much and will be an acceptable trade off for familiarity or code reuse.
WASM has significantly less parse penalty than javascript. A larger bundle size than your accustomed to with pure js is not necessarily a problem.
https://blog.figma.com/webassembly-cut-figmas-load-time-by-3...
https://hacks.mozilla.org/2018/01/making-webassembly-even-fa...