Found wiring lann:websocket into the spike guest alongside lann:webrtc-datachannels.
The behavior. Both sibling packages define a record named stream-message with the identical shape { kind: enum { binary, string }, length: u32, data: stream<u8> }. wit-bindgen 0.59 canonicalizes stream payload types by structural equality (get_representative_type) on the assumption that structurally equal types resolve to the same Rust type — but it still generates one Rust type per interface module, so only the representative gets its StreamPayload impl and the other package's send-via-stream/receive-via-stream bindings fail to compile (the trait StreamPayload is not implemented for websocket::types::StreamMessage).
The workaround in-tree. The guest's generate! skips the two websocket streaming methods it doesn't call (guest/src/lib.rs, with the rationale at the site). skip matches raw function names, so the webrtc package's identically-named methods are unaffected.
To do:
Note the trap this sets for the design: the family's packages deliberately mirror each other's shapes (the two stream-message records are twins by convention), which is exactly the condition that triggers the collision. Any future sibling with the same message-streaming idiom re-hits it.
Found wiring
lann:websocketinto the spike guest alongsidelann:webrtc-datachannels.The behavior. Both sibling packages define a record named
stream-messagewith the identical shape{ kind: enum { binary, string }, length: u32, data: stream<u8> }. wit-bindgen 0.59 canonicalizes stream payload types by structural equality (get_representative_type) on the assumption that structurally equal types resolve to the same Rust type — but it still generates one Rust type per interface module, so only the representative gets itsStreamPayloadimpl and the other package'ssend-via-stream/receive-via-streambindings fail to compile (the trait StreamPayload is not implemented for websocket::types::StreamMessage).The workaround in-tree. The guest's
generate!skips the two websocket streaming methods it doesn't call (guest/src/lib.rs, with the rationale at the site).skipmatches raw function names, so the webrtc package's identically-named methods are unaffected.To do:
bytecodealliance/wit-bindgenif still present.skiponce fixed — or sooner if the endpoint ever wants the streaming surfaces (bounded-memory bulk transfer will, at which point this stops being a dormant workaround).Note the trap this sets for the design: the family's packages deliberately mirror each other's shapes (the two
stream-messagerecords are twins by convention), which is exactly the condition that triggers the collision. Any future sibling with the same message-streaming idiom re-hits it.