Very intrigued by the possibilities of Kotlin + wa...
# webassembly
k
Very intrigued by the possibilities of Kotlin + wasm and curious to know if the following use case is something that is realistic to expect. Is it possible that someday (soonish) a multiplatform library that targets wasm could be used by a JS client app? With TypeScript definitions generated? I realize we can get this today by targeting JS, but I haven’t had the best experiences with the JS output of KMP so far (large bundle sizes, data types such as List need workarounds being the 2 I can think of off hand).
b
If by JS you mean JS/TS but not Kotlin/JS it’s already possible — we generate mjs file what instantiate wasm module and reexport declarations from wasm module.
we don’t generate d.ts yet
k
Yes, exactly what you described is what I’m curious about. That’s exciting! Looking forward to developments in this area. I think this could be a great way to distribute a shared lib written in Kotlin to JS/TS apps and who knows where else with wasm gaining more features and support outside of the browser as well.