Hi all. I understand that for now, wasm support is in its early stages. No kotlinx-datetime, no coro...
c
Hi all. I understand that for now, wasm support is in its early stages. No kotlinx-datetime, no coroutines, no ktor client... Is there a roadmap for wasm targets for those libraries in some predictable future?
s
Hi. No roadmap with particular dates yet. We are working on kotlinx.coroutines port. kotlinx.serialization (ktor client dependency) would probably be the next candidate. Other libraries will be considered later. Do you have a project with mentioned libraries that you would like to try compiling to Wasm?
c
Thanks for your answer. Yes, I have a few multiplatform experimental tools which would be good candidates for wasm ; but I also need other third parties libraries, like https://github.com/ionspin/kotlin-multiplatform-bignum , to also support wasm.
It's already good to know that you're working on it!
s
Wasm compiler and standard library are not quite stable yet. On the one hand we want to have some useful libraries to experiment with. On the other hand we don’t want to burden a bunch of projects with unstable dependencies. We are trying to keep the balance. I expect this balance to shift when core Wasm platform support becomes less flaky.
c
I understand. And working on the coroutines port first is certainly a good choice since it's a showstopper for many libraries.
j
I might target WASM with my multiplatform elasticsearch/opensearch library when things progress a bit: https://github.com/jillesvangurp/kt-search. I would need ktor-client. co-routines, and a few other multiplatform things to work for that. My main target would be eventually targeting serverless type deployments with this rather than just the browser. Browser already works fine via kotlin-js and it works fine via jvm in spring-boot and ktor-server. But I"m looking beyond this at other platforms as well. For example, command line tools via WASI would be in scope for me. Or even native. I actually have kotlin scripting (and even jupyter) working but wasm might be a better fit for some of this stuff. Of course understood that now is not the time but I am looking forward to this getting usable.