Hacker News new | past | comments | ask | show | jobs | submit login

Go has a mandatory runtime (think, the GC) that needs to be included, Rust does not. As such, it’s binaries will always be larger.



I remember I watch a talk on youtube saying browser vendors may start make their GC runtime support GC languages (such as Golang, Java), after which we don't need a large Runtime when we consume the WASM compiled from GC languages.

Probably it's far away down the road? But I was under the impression that it will soon get supported.


What Steve said!

Also (and this does apply to Rust to some extent too), if you start pulling in the stdlib for your webapp then you can't avoid compiling in a lot of code (for example the fmt or net/http packages are pretty big - fmt adds around 1MB to binaries on my system here). If the stdlib for any of these popular languages could be cached or included somehow in browsers that'd be awesome, as part of the attraction of using them is having a great stdlib.

It'd be great if at some point they managed to slim it down significantly as I'd really love to replace JS with Go specifically.


Wasm has “add a GC” to its roadmap, but a runtime is more than just a GC. That will certainly help, but it’s not a panacea.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: