3 ms·
It is compact and efficient. Problem is that there's a lot of it, because these payloads also have to include large chunks of Go's standard library. Apparently
by pdpi 5y ago
It is compact and efficient. Problem is that there's a lot of it, because these payloads also have to include large chunks of Go's standard library. Apparently fmt and http are particularly large packages that will each add 1-2MB to your was binary.
- hbn 5y agoThe runtime alone is also roughly 700kb, or at least was as of 2017 when this SO answer was written https://stackoverflow.com/a/46159048 https://stackoverflow.com/a/46159048 Not sure if anything's changed since then
- oefrha 5y agoWith go 1.17, a minimal program doing absolutely nothing when built with GOOS=js GOARCH=wasm go build -ldflags='-s -w' comes in at 1.2M raw, 362K gzipped, 276K brotli'ed (default compression levels).