FYI, I trad-coded a `.wit` parser in Kotlin. It’s ...
# webassembly
j
FYI, I trad-coded a
.wit
parser in Kotlin. It’s about 2,000 lines of code and it successfully decodes all the WASI
.wit
files. I’m intending to use this to built a host-side component model support, to complement Kotlin 2.4’s guest-side component model support. https://github.com/wasmcomputercompany/wasmo/tree/main/support/wit This is not yet a standalone open source project, but if anybody wants that, I’m happy to do that work.
❇️ 8
👀 2
👍 2
🦠 1
c
TIL trad-coding.
3
And TIL wasmo. Of all the ways you could have announced the project to the world, this is the one you choose? 😄
😆 1
j
I'll do a proper announcement when it does something useful! We're not there quite yet
👍🏽 1
🙌 1
b
@jessewilson 👍 Thanks for sharing! We will need something like that in the future. (cc @Jim Teichgräber)
👍 1
j
I’ve extracted this project into a standalone GitHub here: github.com/wasmcomputercompany/brevity
We hit a nice milestone today: 1. We declared a
concatenate()
in
.wit
, 2. Brevity generated a
commonMain
interface plus lots of tricky bridging code 3. We implemented it in
wasmWasiMain
4. We called it from
jvmMain
via Chicory.
Although that works, that’s a pretty thin spike and there’s a lot of important work to do before this is useful. For example, we don’t yet cover such types as
future
or
tuple
or even
bool
.
Medium-term goal is to replace Chicory with either Endive or Cranelift (via Java FFM)
I’d also like to somehow make
async
work, though I need to wrap my head around the semantics of that
👍 1
If this is at all useful in Kotlin’s own implementation of the component model, I’d love to contribute it. When it’s ready.
👍 2