Is it possible to disable garbage collection entir...
# webassembly
d
Is it possible to disable garbage collection entirely when compiling for WASI?
s
Kotlin compiler has no GC configuration. Some runtimes could have an option to to disable GC when it is implemented. For example, proposed wasmtime Null GC.
d
Thanks for the answer, let's hope that Wasmtime's GC implementation progresses quickly!
e
How would you work without GC in K/Wasm?
s
Short-lived programs could finish before requiring a GC. Longer-lived programs need to be careful to limit allocations. An extreme example would be allocating all the necessary memory upfront and never allocating again.