Recently I've been playing around with Interface Types using wit-bindgen and this already works pretty well with a Rust host and Rust module. However, it seems like wit-bindgen does not support assemblyscript as an output option.
Looking through GitHub, I found https://github.com/jedisct1/witx-codegen, which seems to attempt to generate Interface Type compatible assemblyscript from witx description files, but that didn't seem particularly helpful to me since it doesn't provide bindings like canonical_abi_realloc
and thus the generated files only help with the type conversion.
So I'm curious if anyone has experience and maybe shareable examples of how Interface Types can be used in assemblyscripts today. Is the best practice to use witx-bindgen to generate the conversion code? If so, where do people get the other functionality from (canonical_abi_*
), do I have to write this myself?
I have no problem with converting pointers to Assemblyscript types by hand, like witx-bindgen tries to do for some types already. But I struggle with implementing the surrounding infrastructure like canonical_abi_*
stuff since documentation for this seems sparse.
Last updated: Dec 23 2024 at 12:05 UTC