3 ms·
Would it be possible to make use of the built in JavaScript garbage collector (I'm assuming not) and/or separate to the Go runtime into some kind of shared link
by Lio 8y ago
Would it be possible to make use of the built in JavaScript garbage collector (I'm assuming not) and/or separate to the Go runtime into some kind of shared linked lib so that at least you only pay the download cost once?
(Of course that would open up all the sorts of issues that static compiles get rid of.)
- gameswithgo 8y agoyes but Go doesn't plan to do that, they feel their GC is better. You can also use C or Rust and avoid GC altogether. Rust produces very small WASMs
- Lio 8y agoYeah it does seem an unlikely fit for go. I imagine that go to wasm would likely be used for situations where size won't matter too much and will be an acceptable trade off for familiarity or code reuse.
- steveklabnik 8y ago“Make use of the JS GC” is a feature planned for, but not yet accepted or implemented in webassembly.
- skybrian 8y agoThe JS garbage collector would be unlikely to work for Go since Go allows pointers into the middle of an object and JS doesn't.