https://kotlinlang.org logo
#webassembly
Title
# webassembly
s

spierce7

12/12/2023, 7:33 PM
What optimizations can are still yet to be done for the JetBrains team for WASM? Is tree shaking in yet?
s

Svyatoslav Kuzmich [JB]

12/12/2023, 8:05 PM
Tree shaking is in, and there’s probably some room for improvement. We have some ideas for other things, but not a concrete list of pending optimizations. We’ll evaluate the priority based on real app benchmarks and figure out the the best place for them to be done. It could be a library code, binaryen, Wasm engine, or Kotlin compiler.
s

spierce7

12/12/2023, 8:06 PM
Any idea how the current size compares to the same application in JS?
👀 1
o

Oliver.O

12/13/2023, 9:33 AM
See remarks about sizes in the "Changes" section here: https://github.com/OliverO2/compose-counting-grid
r

Robert Jaros

12/13/2023, 11:13 AM
@spierce7 a hello world app written in Kilua compiled with K/JS - 422KB, compiled with K/Wasm - 497KB (.wasm) + 17KB (.js).
You can checkout and play yourself: https://github.com/rjaros/kilua
b

bashor

12/13/2023, 2:17 PM
@Robert Jaros I guess it’s uncompressed size, right? Could you please check size after
brotli --best
?
r

Robert Jaros

12/13/2023, 3:22 PM
Can I use it from gradle somehow ?
Or you just want me to run the command on the wasm file?
It's 111KB
🙏 1
To stay on topic, JS is still a few bytes ahead with 94KB.
🙏 1
5 Views