Kotlin/WASM seems to require enabling garbage coll...
# compose-web
s
Kotlin/WASM seems to require enabling garbage collection in the browser. Isn't that a big barrier for Compose Web to overcome? Will the browsers just naturally adopt that to be enabled by default, or would there be a way to ask the user to do so? Or is there a way for Kotlin to work around that? What's the plan?
Okay, I think I found the answer to my question: Browsers are building in support for it already according to this article: https://platform.uno/blog/the-state-of-webassembly-2022-and-2023/
d
Yes, we need a garbage collector. But it is already implemented in major browsers.
r
In Chromium-based browsers, its currently an origin trial [1]. See https://developer.chrome.com/origintrials/#/view_trial/2948731856020832257. According to https://chromestatus.com/feature/6062715726462976 the original trial is expected to last until version 117. Users can also enable it via chrome://flags/#enable-webassembly-garbage-collection. Firefox users need to enable it via a config flag, here is the meta-issue for the remaining work: https://bugzilla.mozilla.org/show_bug.cgi?id=1774825. Not sure about the status in other browsers. [1] https://github.com/GoogleChrome/OriginTrials/blob/gh-pages/explainer.md
t
PM for wasm here - can confirm it'll be shipping in Chrome and other browsers to follow!
r
And its live in Chrome 119! wasm https://developer.chrome.com/blog/wasmgc/
K 1