Skip to content

feat(rumqttc): update async-tungstenite to 0.32, remove ws_stream_tungstenite - #1033

Open
michelhe wants to merge 1 commit into
bytebeamio:mainfrom
michelhe:pr/update-async-tungstenite
Open

michelhe wants to merge 1 commit into
bytebeamio:mainfrom
michelhe:pr/update-async-tungstenite

Conversation

@michelhe

@michelhe michelhe commented Feb 19, 2026 •

Copy link
Copy Markdown

async-tungstenite 0.32 includes a built-in bytes module with ByteReader and ByteWriter types that provide tokio::io::AsyncRead/AsyncWrite over WebSocket streams. This makes the ws_stream_tungstenite crate redundant, and that crate pins async-tungstenite ^0.29, blocking the upgrade.

Changes:

  • Update async-tungstenite from 0.29 to 0.32
  • Remove ws_stream_tungstenite dependency
  • Add a custom WsStream adapter in websockets.rs that wraps async-tungstenite's ByteReader/ByteWriter to provide tokio IO traits
  • Add futures-io and pin-project-lite as optional websocket dependencies
  • Update v4 and v5 eventloop imports accordingly

Type of change

  • Miscellaneous (related to maintenance)

Checklist:

  • Formatted with cargo fmt
  • Make an entry to CHANGELOG.md if it's relevant to the users of the library. If it's not relevant mention why. - Not relevant, this is an internal implementation detail.

…gstenite

async-tungstenite 0.32 includes a built-in bytes module with ByteReader
and ByteWriter types that provide tokio::io::AsyncRead/AsyncWrite over
WebSocket streams. This makes the ws_stream_tungstenite crate redundant,
and that crate pins async-tungstenite ^0.29, blocking the upgrade.

Changes:
- Update async-tungstenite from 0.29 to 0.32
- Remove ws_stream_tungstenite dependency
- Add a custom WsStream adapter in websockets.rs that wraps
  async-tungstenite's ByteReader/ByteWriter to provide tokio IO traits
- Add futures-io and pin-project-lite as optional websocket dependencies
- Update v4 and v5 eventloop imports accordingly
@thehouseisonfire

Copy link
Copy Markdown

pin_project! is actually better than my current approach if the downstream transport is !Unpin, though from what I can tell most today are Unpin (like tokio::net::TcpStream and quinn's RecvStream/SendStream).

Would you (or anyone reading) happen to have a reference or use case for supporting !Unpin?

@thehouseisonfire

Copy link
Copy Markdown

Also noting that the dependency tree does include proc-macro2 somewhat extensively, so pin-project could also be used per pin-project-lite's maintainer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants