3 ms·
I'm searching a starter instruction manual for go and WebAssembly. Any recommendations?
by therealmarv 9y ago
I'm searching a starter instruction manual for go and WebAssembly. Any recommendations?
- k__ 9y agoI don't think Go works with WASM, because it uses a GC.
- anentropic 9y agoisn't the GC part of the Go program that gets compiled to WASM though? The Haskell crowd seemed to think that was how it would work for them: https://www.reddit.com/r/haskell/comments/5ydqrc/compiling_to_webassembly/deq0z6m/ https://www.reddit.com/r/haskell/comments/5ydqrc/compiling_t...
- hackcasual 9y agoNot sure that's working. A lot of GC designs need access to program state, like what's currently on the stack, that's not available in WebAssembly.
- dragonwriter 9y ago> I don't think Go works with WASM, because it uses a GC. So? To WASM, how is the GC different from manual allocation, since it's just explicit manual allocation/deallocation in the underlying runtime that gets compiled to WASM.
- loudmax 9y agoBrad Fitzgerald created a github bug to track the issue: https://github.com/golang/go/issues/18892 https://github.com/golang/go/issues/18892 From what I understand, the WebAssembly team is working on their own GC and the Go team would like to use that rather than rolling their own for this target. Also, WebAssembly doesn't have threads yet, which is pretty important for Go. In short, Go in WASM isn't there yet, but it is most likely coming at some point. I expect most popular languages will be ported to WebAssembly at some point, but IMHO Go itself is far more suited to running backend services than in the browser.