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

John O'Reilly

11/30/2023, 5:31 PM
Looks like standard Kotlinx Serialization 1.6.2 now works for Wasm target (https://github.com/Kotlin/kotlinx.serialization/releases/tag/v1.6.2)
❤️ 14
K 6
s

sdeleuze

11/30/2023, 6:03 PM
If somebody has some data points about how much Wasm size it adds (with all the dead code elimination options enabled) to for example serialize/deserialize JSON, I would be interested to know.
j

John O'Reilly

11/30/2023, 7:11 PM
have updated Wasm based Compose for Web modules in https://github.com/joreilly/BikeShare and https://github.com/joreilly/PeopleInSpace to use that.....hopefully getting to point soon where those can depend on common dependencies!
👍 2
r

Robert Jaros

12/01/2023, 12:25 PM
@sdeleuze In my project it adds 102 KB (with serialization only), 166KB (with deserialization only) and 179KB (with both serialization and deserialization).
thank you color 2
s

sdeleuze

12/01/2023, 12:28 PM
Looks not too bad, but not amazing for a compile time approach. I would be curious to know if there are low hanging fruit identified by the Kotlin serialization team to reduce the runtime footprint.
Or if optimization would be more on the Wasm specific side.
b

bashor

12/01/2023, 1:18 PM
@Robert Jaros is it prod build? Have you applied binaryen?
r

Robert Jaros

12/01/2023, 1:51 PM
Yes. Production build with agressive binaryen optimization.
👍 1
🙏 1
15 Views