pchickey opened PR #15286 from pchickey:wasmtime-wasi-io-type-names to bytecodealliance:main:
This PR adds a type_name method to Pollable, which in turn adds it to InputStream and OutputStream transitively. The default implementation dispatches to core::any::type_name::<Self>(), so users of wasmtime-wasi-io shouldn't need to make code changes as part of upgrading wasmtime-wasi-io, and embedders will only need to override that method if theyre doing some additional indirection inside Pollable (highly doubtful).
In order to get the type name onto DynPollable, we need to look it up in subscribe and save it in a private struct member, with a pub method.
see related: https://github.com/bytecodealliance/wasmtime/pull/15276. The idea is that for well-known types like wasmtime-wasi-io's, an embedder iterating through the table debugging ResourceTableEntrys can first dispatch to entry().downcast_ref::<DynInputStream>, DynOutputStream, DynPollable and call .type_name() on those, before falling back on .type_name() on the ResourceTableEntry.
pchickey removed the review request for wasmtime-wasi-reviewers from PR #15286.
pchickey requested rvolosatovs for a review on PR #15286.
pchickey requested wasmtime-wasi-reviewers for a review on PR #15286.
pchickey added the label wasi:api on PR #15286.
:thumbs_up: alexcrichton submitted PR review.
alexcrichton added PR #15286 wasmtime-wasi-io: add Pollable::type_name method for debugging to the merge queue.
:check: alexcrichton merged PR #15286.
alexcrichton removed PR #15286 wasmtime-wasi-io: add Pollable::type_name method for debugging from the merge queue.
Last updated: Nov 19 2026 at 20:05 UTC