Is there a way with the c wasmtime API (or planned) to get the interface-type information?
Not at this time, no, but wasmtime
-the-crate-or-C-API don't implement interface types right now.
there's currently no binary format for interface types so nothing either creates that or consumes it yet
Thank you! That's what I thought. In my scenario, I'm the one both creating the wasm module and also the piece that is going to be the runtime, so I have a lot of options for how I encode this info, e.g. create a variable with the witx string and use something to decode, create a "types" table with indexes and information for each type, etc. How would you encode the type information today? Once there's a binary format for interface-types, whatever hack is in place could be dropped.
The general thinking awhile back was to pair a wasm and a witx file together, but it never really got off the ground. In that sense I don't think anyone or anything has something implemented which does this today so there's not really precedent set.
I'm also interested in this.
Until a binary format for WITX, would a custom section with a bespoke serialization format for the WITX file work?
(of course, pointing out that this is a temporary hack)
Last updated: Nov 22 2024 at 17:03 UTC