3 ms·
How does garbage collection work with Go and WASM?
by amelius 2y ago
How does garbage collection work with Go and WASM?
- 4ad 2y agoJust the same as it works on amd64 or arm64 or any other architecture.
- amelius 2y agoYou mean inside another thread, collecting garbage concurrently? I'd be very surprised if it worked that way.
- marianoguerra 2y agonot sure what's the current status of Go so there are two alternatives: if they are targeting Wasm pre Wasm-GC then they have to ship their GC in the Wasm module and it can't interoperate with "the outside world" if they use Wasm-GC then they use the host's GC and values can be shared with the host and other guests.
- 4ad 2y agoNo, Go can never use WasmGC because Go has interior pointers. Not even fat pointers help because Go has unboxed types. Go will continue to use its own GC for the foreseeable future.