Earlier quoted context omitted.
Please note that upx also compresses your binary contents and decompresses it at runtime. When downloading a WASM file over HTTP, the server can gzip it transparently. It'd be interesting to compare the effects on the size with what upx does (which is more specialized than gzip).
I see, thanks. I used vanilla `strip` on my binary and it did not produce any size gain (so the strip flag of go compiler is plenty enough). Indeed, given how browsers already handle gunziping resources, it's probably best to rely on it. My binary, stripped by the go compiler and gziped, is 525ko (against 480ko using upx).
Go gets preliminary WebAssembly support
81–90 of 99 posts
Re: Go gets preliminary WebAssembly support
#82Could this be used to get native gRPC support for the browser?
Re: Go gets preliminary WebAssembly support
#83Will the binaries be compiled for size optimization, or will they be the same size as usual golang bins? Go binaries, being static and embedding the whole go runtime, tend to be quite big. Now, I don't care about it because 5 or 10MO on my server filesystem is nothing. If I ask every visitor to download 10MO before running my webpage, that will be a problem, though. Is this something we will have to deal with? Or wil…
Half the size of Go binaries you encounter in the wild are debugging symbols. Compile without them and use `upx --ultra-brute` and the binary will be about ~15% of its original size. You still get goroutine stack traces from panics without the debugging symbols.
Re: Go gets preliminary WebAssembly support
#84Hey so question - WebAssembly can't access the DOM right? What's the whole point then, avoid Javascript? If we can't just swap out all the gnarly JS garbage whole-hog, I don't see where the business value is, given that there's plenty of language-to-js libraries.
Re: Go gets preliminary WebAssembly support
#85What are the challenges to provide a standard GC interface that all managed languages can leverage.
I believe that the LLVM project is trying to accomplish this [1]. However, the concurrent, non-pausing GC of GoLang is not easy to match in efficiency. I'd be interested to hear about actual high-quality implementations of GCs in LLVM. And then there's the problem of making it all work efficiently in WASM (which doesn't yet support advanced concepts needed by GCs such as memory barriers). [1] https://llvm.org/docs/Ga…
Re: Go gets preliminary WebAssembly support
#86Re: Go gets preliminary WebAssembly support
#87Will the binaries be compiled for size optimization, or will they be the same size as usual golang bins? Go binaries, being static and embedding the whole go runtime, tend to be quite big. Now, I don't care about it because 5 or 10MO on my server filesystem is nothing. If I ask every visitor to download 10MO before running my webpage, that will be a problem, though. Is this something we will have to deal with? Or wil…
Half the size of Go binaries you encounter in the wild are debugging symbols. Compile without them and use `upx --ultra-brute` and the binary will be about ~15% of its original size. You still get goroutine stack traces from panics without the debugging symbols.
Also, can you use UPX on WebAssembly binaries? If so, will that trigger any widely used antivirus software?
Re: Go gets preliminary WebAssembly support
#88I thought webassembly has no GC. Is this implementing a GC for go as well, or did something change?
Re: Go gets preliminary WebAssembly support
#89Re: Go gets preliminary WebAssembly support
#90I thought webassembly has no GC. Is this implementing a GC for go as well, or did something change?