Stream: git-wasmtime

Topic: wasmtime / PR #12155 fix(bindgen): futures and stream are...


view this post on Zulip Wasmtime GitHub notifications bot (Dec 11 2025 at 18:55):

rvolosatovs requested alexcrichton for a review on PR #12155.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 11 2025 at 18:55):

rvolosatovs opened PR #12155 from rvolosatovs:fix/bindgen-async-clone to bytecodealliance:main:

Discovered this trying to generate bindings for an interface containing something like:

record test {
   rx: stream<u8>,
   tx: stream<u8>,
}

which failed with:

error[E0277]: the trait bound `StreamReader<u8>: Clone` is not satisfied
   --> crates/wasi-tls/src/p3/bindings.rs:5:5
    |
  5 | /     wasmtime::component::bindgen!({
  6 | |         path: "src/p3/wit",
  7 | |         world: "wasi:tls/imports",
  8 | |         imports: {
...   |
 14 | |         },
 15 | |     });
    | |______^ the trait `Clone` is not implemented for `StreamReader<u8>`

The change is fairly minimal and straightforward, so did not work on a test or anything like that.

I do not like this field name, but splitting into has_future and has_stream would require splitting also the TypeDefKind match cases (which are currently unified) and it did not quite feel right to include this in has_handle either.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 11 2025 at 18:55):

rvolosatovs requested wasmtime-core-reviewers for a review on PR #12155.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 13 2025 at 18:09):

alexcrichton submitted PR review:

Thanks! Could you add a test for this as well?

I think it would be reasonable to add Clone too, but I think that might require some careful handling on the runtime side of things as I don't think it's quite ready for clone/copy just yet.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 13 2025 at 18:10):

alexcrichton submitted PR review.


Last updated: Dec 13 2025 at 19:03 UTC