The JS garbage collector would be unlikely to work for Go since Go allows pointers into the middle of an object and JS doesn't.
Re:Go 1.11 Beta 2 is Released
by steveklabnik on Friday July 20, 2018 @10:41AM
(#17575358)
“Make use of the JS GC” is a feature planned for, but not yet accepted or implemented in webassembly.
Re:Go 1.11 Beta 2 is Released
by gameswithgo on Friday July 20, 2018 @09:49AM
(#17574944)
yes 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
Yeah 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.
(Of course that would open up all the sorts of issues that static compiles get rid of.)