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

Frankablu

11/23/2020, 12:12 AM
Hi, I've got a Kotlin/JVM program which I would like to port to wasm. What's wrong with the deprecated version? When's the new version coming out? Would I be better compiling to JS in the mean time? (Even if I go offline I'll be back online tomorrow)
g

gildor

11/23/2020, 12:30 AM
Deprecated version? What do you mean? Are you talking about deprecated Kotlin/Native Wasm compilation? If so, it wouldn't be very easy to use it, you have to port your program to K/N first
There is no Kotlin Wasm backend yet, it still in development, and even when it will be released, it probably would be a very early version, it also rely on new, not released in modern browsers, Wasm runtime with GC support
3
If your goal is to launch your program on browser, Kotlin JS is way to go
3
b

Big Chungus

11/23/2020, 1:06 AM
I'd suggest going with js as main target, but trying to keep as much code as possible in common sourceSet
4
This way you'll be able to port it quicker when new k wasm comes out
If you'd still like to play around with kn wasm, here's something to get you started https://gitlab.com/lt.petuska/kvdom
Also #kvdom if you have further questions
f

Frankablu

11/23/2020, 1:56 AM
Thanks