Hi all, I am new to Kotlin WASM and tried to foll...
# webassembly
e
Hi all, I am new to Kotlin WASM and tried to follow the tutorial here https://kotlinlang.org/docs/wasm-get-started.html#generate-artifacts I noticed the wasmJsBrowserDistribution, the outputs files are quite large. Example, skiko.wasm (8 MB) and composeApp.wasm (5.7 MB). That's quite large file sizes though! Is it common for wasm to be that file size? It's just a simple tutorial, I can't imagine someone building a figma clone using Kotlin WASM, can be much bigger file size. Any tips? Thanks.
r
Yes, it's like this with compose-web.
Skiko (the largest part) is the cost of common compose ui with other platforms.
e
If not mistaken Figma is on WASM, and how come it loads so fast? Is their WASM also big in file size too?
r
from what I can see, it's not
e
Maybe Kotlin WASM is still in alpha, lets hope it improves, otherwise I doubt it will work. It's like flutter web, so heavy.
r
It's not wasm problem, it's compose.
If you compile compose-web application to JS target, it will still use additional 8MB skiko.wasm for drawing.
e
ouch ok
wonder it will be reduced when it hits beta, or it will be the same 😞
r
You can build web apps with Kotlin/Wasm without compose-web and skiko.
e
oic
210 Views