$ tungstenite
v0.29.0MAJOR UPDATELightweight stream-based WebSocket implementation
Latest Update Summary
Crate
Name: tungstenite New version: 0.29.0 Release date: 2026-03-17T15:28:15.557155Z
Crate readme
Short description Lightweight stream-based WebSocket implementation for Rust.
Long description This library provides an implementation of WebSockets, RFC6455. It allows for both synchronous (like TcpStream) and asynchronous usage and is easy to integrate into any third-party event loops including MIO. The API design abstracts away all the internals of the WebSocket protocol but still makes them accessible for those who want full control over the network.
Features • native-tls • native-tls-vendored • rustls-tls-native-roots • rustls-tls-webpki-roots
Code Examples WebSocket echo server
use std::net::TcpListener;
use std::thread::spawn;
use tungstenite::accept;
fn main () {
let server = TcpListener::bind("127.0.0.1:9001").unwrap();
for stream in server.incoming() {
spawn (move || {
let mut websocket = accept(stream.unwrap()).unwrap();
loop {
let msg = websocket.read().unwrap();
if msg.is_binary() || msg.is_text() {
websocket.send(msg).unwrap();
}
}
});
}
}
Links • https://crates.io/crates/tungstenite • https://docs.rs/tungstenite • https://github.com/snapview/tungstenite • https://github.com/crossbario/autobahn-testsuite • https://github.com/snapview/tungstenite-rs/issues
https://docs.rs/tungstenite/0.29.0
Release info
Release version: N/A
Release description N/A
Code Examples N/A
Minor update: 0.28.0 → 0.29.0
$ DOWNLOADS TREND
$ VERSION HISTORY
$ LINKS
$ INSTALL
cargo add tungsteniteOr add to Cargo.toml: tungstenite = "0.29.0"