After fooling around a bit, we finally could get a...
# webassembly
a
After fooling around a bit, we finally could get a simple Kotlin program to export the entry point we needed (using the annotations to keep and export the symbol didn't seem to really do what we hoped for tho). That's also working around the WASI expected functions to pretend they are there, not a big deal, but we'd rather not have the whole JS interop part of our modules… These are expect to be lightweight functions (think FaaS, loaded as dyn libs effectively). Are we looking at Kotlin Native's support for Wasm in a too early stage? Or are we just looking at the wrong set of documentation? Or source code? Anyone can point us to either where we could find something to help ourselves, or if what we're trying to do is just not a real option right now using Kotlin? We'll keep on giving it a spin tomorrow, but any pointers would be greatly appreciated.
n
It is significantly easier to do FaaS with Kotlin Native via the linuxX64 target than it is to do it via the wasm target. Can find a FaaS sample here: https://github.com/JetBrains/kotlin-native/tree/master/samples/weather_function
JetBrains are currently in the process of developing a new Kotlin development platform called Kotlin WASM (

https://youtu.be/0xKTM0A8gdI?t=2172

), which is in the early stages of development ( https://kotlinlang.slack.com/archives/CDFP59223/p1574742350008100?thread_ts=1574739056.007900&cid=CDFP59223 ).
👍 2
s
Current Kotlin/Native Wasm target development is suspended. We want to replace it with a dedicated Kotlin/Wasm platform, but it might take some time. We are focusing on browser embedders initially, and those need a small code size, browser APIs and JS interop. That’s why we are aiming for Wasm with future featues like GC, which would help with browser needs. I’d like to ask how browserless WASI-enabled mode can be useful to you. What advantages do you want it to have over JVM or Native platforms? What kind of VMs are you planning to run it on? Would those VMs be willing to support Wasm GC?
👍 4
a
Maybe we can setup a quick DM or Hangout or other chat…
b
@alex snaps sorry for the delay, we would happy to chat with you to get more about your cases and requirements you have, and to answer to your questions.