rvolosatovs requested alexcrichton for a review on PR #12155.
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_futureandhas_streamwould require splitting also theTypeDefKindmatch cases (which are currently unified) and it did not quite feel right to include this inhas_handleeither.
rvolosatovs requested wasmtime-core-reviewers for a review on PR #12155.
alexcrichton submitted PR review:
Thanks! Could you add a test for this as well?
I think it would be reasonable to add
Clonetoo, 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.
alexcrichton submitted PR review.
Last updated: Dec 13 2025 at 19:03 UTC