rocket_ws-community

Crates.iorocket_ws-community
lib.rsrocket_ws-community
version0.1.4
created_at2025-12-17 05:24:03.787766+00
updated_at2026-01-20 18:46:32.493932+00
descriptionWebSocket support for Rocket. (Community Fork)
homepagehttps://rocket.rs
repositoryhttps://github.com/rwf2/Rocket/tree/master/contrib/ws
max_upload_size
id1989314
size81,684
Martyn P (martynp)

documentation

https://api.rocket.rs/master/rocket_ws/

README

ws ci.svg crates.io docs.svg

This crate provides WebSocket support for Rocket via integration with Rocket's [connection upgrades] API.

Usage

  1. Depend on rocket_ws, renamed here to ws:

    [dependencies]
    ws = { package = "rocket_ws-community", version = "0.1.4" }
    
  2. 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.

Commit count: 2456

cargo fmt