Hey everyone, is it possible to build a webassembl...
# javascript
d
Hey everyone, is it possible to build a webassembly using kotlin that function as a shared bussiness logic while keep using other regular js framework? I want to share business logic between desktop, mobile and web
👀 1
c
Why not share it with your web as a Kotlin/JS library? If your goal is to call Kotlin functions from vanilla JS, it will be easier
d
I didn't knew it's possible. So all the kmm function is available to use that way?
c
All the standard library and KotlinX.* libraries are available in Kotlin/JS, yes. Other than that, it depends
There are more libraries available for Kotlin/JS than Kotlin/Native (Kotlin/WASM is a part of Native) at the moment
d
I see okay noted, thank you 🙇
a
Kotlin/WASM is a part of Native at the moment
Is no longer a valid statement. JB has been working for quite sometime now with a new WASM backend that is decoupled from Native
âž• 1
c
Oh, good to know. I assume it's even less stable currently, then?
a
Very early stages, yes. @bashor usually posts teasers on #webassembly very frequently. It is so promising though
c
Well my point was: there are currently many more libraries available for Kotlin/JS than there are for Kotlin/WASM, and they will be easier to use from JS, so that's what I would recommend going with. I do think Kotlin/WASM will be the future for the web platform, but I wouldn't expect to use it in the next 2–3 years
a
We do share that perspective