| Crates.io | rkt_ws |
| lib.rs | rkt_ws |
| version | 0.1.4 |
| created_at | 2026-01-24 18:38:39.459835+00 |
| updated_at | 2026-01-24 18:38:39.459835+00 |
| description | WebSocket support for rkt. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 2067200 |
| size | 80,374 |
ws This crate provides WebSocket support for Rocket via integration with Rocket's [connection upgrades] API.
Depend on rocket_ws, renamed here to ws:
[dependencies]
ws = { package = "rocket_ws-community", version = "0.1.4" }
Use it!
#[get("/echo")]
fn echo_stream(ws: ws::WebSocket) -> ws::Stream!['static] {
ws::Stream! { ws =>
for await message in ws {
yield message?;
}
}
}
See the crate docs for full details.