I wanted to start a discussion here about whether we should remove the interface types support in wasmtime today. I think there's a few strong technical reasons we should do this:
wasmtime-interface-types
crate is basically entirely tech debtwasmtime
's CI, so this breaks oftenwasm-bindgen
supports a different version of wasm interface typeswasm-bindgen
to work with wasmtime
, but now with wasm-webidl-bindings
being updated in wasmtime
it's not possible to find a matching wasm-bindgen
version to match the binary encodingOr, put another way, the current support is all tech debt, there's no tests, and it's impossible to get working today. On a technical level what needs to happen is that we need to update the wasmtime
crate (and C API) with support for interface types. At the bare minimum to get the Rust examples work again we need to update the wasmtime
crate. I started this work a long time ago but didn't get too too far. It wouldn't be too hard to get it up and working again but filling it out to implement all of interface types (or at least what wasm-bindgen
supports) will be a good chunk of time.
So, this leads us to the question, what do we do? With everything broken right now I feel like we need to do something, but our options seem to be either (a) remove all support and document that support will come back soon or (b) I should take time to fully integrate the next iteration of interface types in to wasmtime
.
@Till Schneidereit you're likely interested in this topic
I've also taken a bit of time to rebase what I had awhile back and post https://github.com/bytecodealliance/wasmtime/pull/1013, although it has a number of "hard" items it doesn't implement which may take significant time to plan out
Thank you for working on this!
I agree that removing Interface Types (from hereon: itypes, because) for now probably makes sense. Two things I think would be good to do:
@Alex Crichton How much time does it seem likely to take to fully implement the current version of interface types?
Or update the code that's currently there and move it into wasmtime?
@Josh Triplett my guess would be a week or so, there's a lot of design to do around things like strings
Given how critically important interface types are, might it make sense to not remove the old implementation until we have a new implementation?
Well that's sort of the question I'm posing. I'm also pointing out, however, that basically nothing works today, so no matter how critical we want it to be it's not too too critical because of how broken it is sorta (at least at this time)
That's fair, I'm just wondering how much sense it makes to go through a detailed removal (including cli error messages) in the interim period.
I would agree with Till that we should do this (and it should be pretty easy to do). We still get a good number of folks testing things out and bug reports about how the interface types examples don't work, so it'd be good to try to head that off if we can.
which reminds me: wherever we have documentation about this, we should add a note at the top about the state of play
fully implement the current version of interface types
note that this requires both the reference-types and bulk-memory proposals, which I'm working on, but is going to take longer than "a week or so" :laughing:
@Luke Wagner I'd also be interested in your thoughts on this topic
Last updated: Dec 23 2024 at 13:07 UTC