Hello all! I'm currently looking to build a PDK fo...
# webassembly
l
Hello all! I'm currently looking to build a PDK for Extism (https://extism.org) in Kotlin. The problem I'm running into currently is the GC proposal requirement, as the Wasm runtimes Extism uses don't yet support the GC proposal. I was wondering if there was a way to resolve this, either by circumventing the GC requirement and managing my own memory, or somehow polyfilling it in. I'm open to any thoughts or suggestions on the topic, I believe Kotlin support would be a big win for Extism! If you're interested in my implementation of the PDK so far, you can find it at https://github.com/lizainslie/extism-kotlin-pdk I really appreciate your help and insight!
K 4
👀 2
j
Zipline is our attempt at a similar problem https://github.com/cashapp/zipline/ It’s less ambitious than Extism, and supports only Kotlin as host and guest. Due to the lack of a small embeddable runtime we’re using a JavaScript engine (QuickJS) instead of a WASM runtime. We’re planning to switch to WASM when an appropriate runtime exists!
You might wanna borrow code or ideas from Zipline in your project. In particular the Kotlin compiler plugin to do bridging isn’t specific to our implementation differences
l
This is actually awesome! I had been thinking of a compiler plugin or a Gradle plugin initially, but I wasn't sure about how much I would be capable of changing when using compiler plugins (since I don't have any experience with them), and I knew that Gradle wasn't going to solve the whole problem. I'll definitely be taking a look at how zipline is implemented, are there any resources you can recommend me to look at before I write a compiler plugin? PS: It's also really cool to see that Cash App is using Kotlin!
a
Extism looks awesome, didn’t hear about it before. Regarding the GC proposal, this would be the Github issue to track its implementation progress in wasmtime (looks like Extism is using that runtime): https://github.com/bytecodealliance/wasmtime/issues/5032 Not sure if there is any timeline though…
👀 1
j
🙌 1