Crate features / tokio-tungstenite
Feature flags · tokio-tungstenite 0.30.0 · from crates.io 2026-10-24
tokio-tungstenite features: what each one does, and the line to copy
Short answertokio-tungstenite 0.30.0 has 9 features. By default it turns on connect, handshake; add default-features = false to start from nothing. It needs Rust 1.85 or newer.
Pick features
Every feature
| Feature | In default | Turns on |
|---|---|---|
__rustls-tls | rustls, rustls-pki-types, tokio-rustls, stream, tungstenite/__rustls-tls, handshake | |
connect | yes | stream, tokio/net, handshake |
handshake | yes | tungstenite/handshake |
native-tls | native-tls-crate, tokio-native-tls, stream, tungstenite/native-tls, handshake | |
native-tls-vendored | native-tls, native-tls-crate/vendored, tungstenite/native-tls-vendored | |
rustls-tls-native-roots | __rustls-tls, rustls-native-certs | |
rustls-tls-webpki-roots | __rustls-tls, webpki-roots | |
stream | nothing else (a switch the code checks) | |
url | tungstenite/url |
dep:x turns on the optional dependency x; x/y turns on feature y of dependency x (with ?, only if x is already on).
MSRV history
The minimum Rust version tokio-tungstenite declares (rust-version), and the release that changed it:
- 0.19.0 (2023-05-15): Rust 1.63
- 0.30.0 (2026-07-11): Rust 1.85
Stuck on an older compiler? Pin the last version that supports it, for example cargo update -p tokio-tungstenite --precise <version>, or use resolver 3, which picks compatible versions for you.
More on tokio-tungstenite
Real downloads, dependents and alternatives: tokio-tungstenite crate data (1M real downloads a day, 3,629 dependents).
docs.rs feature list · crates.io · license MIT · edition 2018
Up next
Before you depend on ittokio-tungstenite crate dataReal downloads, dependents, alternatives.Read it next →Did this answer your question?