What kind of WASM file sizes can we expect? I know some work has gone into shrinking Go executables, especially in 1.7, but will we be able to produce something like the 15KB Rust Hello World WASMs? Go has a fantastic stdlib but it hasn’t prioritized web optimized file sizes (yet). I’m looking forward to the results of this work!
WebAssembly architecture for Go
51–60 of 71 posts
Re: WebAssembly architecture for Go
#52Earlier quoted context omitted.
I was under the impression that WASM does not have one.
Wasm doesn't have one yet , but it's a future extension to to spec. You can, of course, compile your GC in today, and it will work. Wasm's integrated support will mean re-using the existing GC, which means smaller code size. Side note: most people thought this would be a precursor to DOM support, but the new "host bindings" proposal opens up DOM support without needing GC support, and many people believe that now the…
Can Go simply run with the WASM GC or does it need some specific type of GC?
Re: WebAssembly architecture for Go
#53Re: WebAssembly architecture for Go
#54What kind of WASM file sizes can we expect? I know some work has gone into shrinking Go executables, especially in 1.7, but will we be able to produce something like the 15KB Rust Hello World WASMs? Go has a fantastic stdlib but it hasn’t prioritized web optimized file sizes (yet). I’m looking forward to the results of this work!
Re: WebAssembly architecture for Go
#55Strange that wasm doesn't support go-to instructions. Didn't they see the need for it coming? Most compiler backends need it, I suppose.
Wasm exists because it's small and incremental; there's lots of stuff that's needed, but not in the initial spec. As long as it can be added in the future, that's what matters.
Re: WebAssembly architecture for Go
#56Earlier quoted context omitted.
but i'm asking what are some webasm languages/backends/use cases that aren't a JS interpreter?
There is a work ongoing to enable WASM to be used for Etherum smart contracts, replacing the custom VM/bytecode. One could use WASM for reconfigurable on-edge computing, all the way down to microcontrollers.
Re: WebAssembly architecture for Go
#57Earlier quoted context omitted.
Wasm doesn't have one yet , but it's a future extension to to spec. You can, of course, compile your GC in today, and it will work. Wasm's integrated support will mean re-using the existing GC, which means smaller code size. Side note: most people thought this would be a precursor to DOM support, but the new "host bindings" proposal opens up DOM support without needing GC support, and many people believe that now the…
Are GC implementations transparent for the languages? Can Go simply run with the WASM GC or does it need some specific type of GC?
See https://github.com/WebAssembly/gc for the current proposal.
Re: WebAssembly architecture for Go
#58Strange that wasm doesn't support go-to instructions. Didn't they see the need for it coming? Most compiler backends need it, I suppose.
Re: WebAssembly architecture for Go
#59Earlier quoted context omitted.
Follow-up question, why can't LLVM -> Web Assembly solve the problem?
x86 elf -> wasm could solve this problem.
You can still do it, of course and performance isn't even that bad. See Fabrice Bellard's x86 emulator using asm.js.
Re: WebAssembly architecture for Go
#60Earlier quoted context omitted.
x86 elf -> wasm could solve this problem.
No, it wouldn't. At that point you already lost lots of information and your only option is to faithfully reproduce the behaviour of the x86 machine. You can still do it, of course and performance isn't even that bad. See Fabrice Bellard's x86 emulator using asm.js. https://bellard.org/jslinux/tech.html