What exactly is this new wasm in kotlin 1.8.20? We...
# compose-web
p
What exactly is this new wasm in kotlin 1.8.20? We had that onWasmReady as part of jb-compose. Is that a different wasm?
o
Currently when you use "onWasmReady" only skiko (skia + kotlin bindings) part is wasm. With 1.8.20 k/wasm, we'll be able to compile Compose to wasm too. Currently (with k/js) it's compiled to js.
p
And why do I want that?
b
To get usual wasm benefits like streamed compilation, concise binary payload and predictable performance
p
I have a hard time picturing what that means for developer and user experience. Is it preferred over js and if so why? I'm missing a larger picture: when do I want kotlin js and when wasm?
b
To me personally anything is preferable over js... But for most it will be the abscence of js kinks that es built in over the years
Also as wasm matures, you'll be able to use cpp, rust, dart, etc. wasm modules in your kwasm projects and vice versa
h
JS needs to be compiled during runtime, so you need to provide (minimized) js source code. wasm is precompiled and the browser (or another runtime) needs to execute the binary only.