Skip to content

Update tokio-tungstenite to 0.15#1201

Closed
Erk- wants to merge 1 commit intotwilight-rs:nextfrom
Erk-:update-tungstenite
Closed

Update tokio-tungstenite to 0.15#1201
Erk- wants to merge 1 commit intotwilight-rs:nextfrom
Erk-:update-tungstenite

Conversation

@Erk-
Copy link
Copy Markdown
Member

@Erk- Erk- commented Oct 18, 2021

This is a revive of #1028 as the parts for #1058 are yet to be published to crates.io.

@Erk- Erk- added c-gateway Affects the gateway crate c-lavalink Affects the lavalink crate t-chore labels Oct 18, 2021
7596ff
7596ff previously approved these changes Oct 18, 2021
@7596ff 7596ff dismissed their stale review October 18, 2021 18:09

rescinded

@Gelbpunkt
Copy link
Copy Markdown
Member

This is a wrap-up of discussions and research from the #dev channel on Discord:

  • tokio-tungstenite with rustls 0.15 depends on tungstenite 0.14's rustls feature, which pulls in rustls-native-certs dependencies, namingly: bitflags, core-foundation, core-foundation-sys, openssl-probe, rustls-native-certs, schannel, security-framework and security-framework-sys
  • These dependencies are not used, thus tokio-tungstenite 0.15 works in a webpki-dependent environment, but compile times and dependency bloat are increased
  • This has been fixed in a later release of tungstenite, 0.15
  • tokio-tungstenite's latest git tree depends on this new version and allows for choosing between webpki-roots and native-roots - which previously was not possible
  • It also removes a dependency on pin-project, which can significantly improve compile times

The only real upside in bumping tokio-tungstenite to 0.15 is a faster input buffer, but the impact of that might be negligible because network latency is the bottleneck here. It is probably not worth the dependency mess we'd put ourselves in by bumping it.

Rather, we should wait for 0.16 to release to allow fine-grained rustls feature flags on gateway and avoid this TLS dependency mess. This also can be done at any time, because tokio-tungstenite is not part of twilight's public API.

@7596ff 7596ff marked this pull request as draft October 24, 2021 14:22
@Erk- Erk- closed this Nov 20, 2021
@Erk- Erk- deleted the update-tungstenite branch December 30, 2021 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c-gateway Affects the gateway crate c-lavalink Affects the lavalink crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants