Stream: wasmtime

Topic: type inference for functions using interface-types


view this post on Zulip Bailey Hayes (Oct 06 2021 at 19:48):

Is there a way with the c wasmtime API (or planned) to get the interface-type information?

view this post on Zulip Alex Crichton (Oct 06 2021 at 19:52):

Not at this time, no, but wasmtime-the-crate-or-C-API don't implement interface types right now.

view this post on Zulip Alex Crichton (Oct 06 2021 at 19:53):

there's currently no binary format for interface types so nothing either creates that or consumes it yet

view this post on Zulip Bailey Hayes (Oct 06 2021 at 21:57):

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.

view this post on Zulip Alex Crichton (Oct 07 2021 at 14:05):

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.

view this post on Zulip Radu Matei (Oct 07 2021 at 18:15):

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