Is it possible to disable garbage collection entirely when compiling for WASI?
s
Svyatoslav Kuzmich [JB]
06/08/2024, 1:41 PM
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
DynamicField
06/08/2024, 4:09 PM
Thanks for the answer, let's hope that Wasmtime's GC implementation progresses quickly!
e
Edoardo Luppi
06/10/2024, 9:14 PM
How would you work without GC in K/Wasm?
s
Svyatoslav Kuzmich [JB]
06/11/2024, 5:16 AM
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.