Registry / networking / async-tungstenite

async-tungstenite

JSON →
library0.34.1rscratesunverified

Async binding for Tungstenite, the Lightweight stream-based WebSocket implementation

# Cargo.toml [dependencies] async-tungstenite = "0.34.1"
INSTALL
IMPORT
SIG · ASYNC-TUNGSTENITE
A
async-tungstenite
networkingrustv0.34.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

connect_async
use async_tungstenite::tokio::connect_async;

Connect to a WebSocket server using async-tungstenite with Tokio runtime

use async_tungstenite::tokio::connect_async; use futures_util::StreamExt; #[tokio::main] async fn main() { let (ws_stream, _) = connect_async("wss://echo.websocket.org").await.unwrap(); println!("WebSocket connected"); }
Debug
Known issues
gotchaRequires an async runtime (Tokio or async-std) and the corresponding feature flag
fix
Add `features = ["tokio-runtime"]` or `features = ["async-std-runtime"]` to your Cargo.toml dependency
affects: >=0.10
Upgrade
Version history
0.34.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
58 hits · last 30 days
node
50
Resources
async-tungstenite — cargo add async-tungstenite · libregistry