I’m attempting to deploy Kotlin code into <Spin>. ...
# webassembly
j
I’m attempting to deploy Kotlin code into Spin. Here’s a thread on my effort...
.wasm 3
👍 1
👀 2
❤️ 3
The first challenge is writing Kotlin bindings for
proxy.wit
so my Kotlin code can receive an incoming HTTP call https://github.com/WebAssembly/WASI/blob/main/proposals/http/wit/proxy.wit
And therefore the 2nd challenge is getting wit-bindgen to generate Kotlin files. So @bashor’s I’m looking at your wit-bindgen fork.
I’ve got a branch that rebases it on
main
. My code isn’t good; it’s the first Rust I’ve ever written! https://github.com/swankjesse/wit-bindgen/tree/jessewilson.1202.update_
I think the Big Effort next steps here are probably something like this... 1. Land a high-quality Kotlin generator in the official wit-bindgen repo. 2. Create a kotlin-wasi library that publishes a Kotlin artifact for each WASI module. That way normal Kotlin developers can do WASI stuff without touching wit-bindgen!
b
Hey! Thanks for PR. What’s the status of your deployment into the Spin? Do you know if they on GC and EH on their side?
1. Land a high-quality Kotlin generator in the official wit-bindgen repo.
I also considering using wit-bindgen ability to generate json and writing pure kotlin solution. It might be easer for us to support and to integrate into our tools. Later we can fully replace wit-bindgen by supporting wit on our side.
j
oooh, going from wit to JSON is clever
I would certainly prefer something that’s all in Kotlin
oh hell yes
🔥 2
Actually deploying this requires a change in the platform! https://github.com/spinframework/spin/issues/3364