salvo-websocket

Installation
SKILL.md

Salvo WebSocket

WebSocketUpgrade from salvo-extra turns a GET handler into a WebSocket endpoint. WebSocket implements Stream<Item = Result<Message, Error>> + Sink<Message, Error = Error>, so StreamExt::split(), recv(), and send() all work.

Setup

[dependencies]
salvo = { version = "0.94.0", features = ["websocket"] }
futures-util = "0.3"
tokio = { version = "1", features = ["full"] }
tokio-stream = "0.1"

Echo server

use salvo::prelude::*;
use salvo::websocket::WebSocketUpgrade;
Installs
26
GitHub Stars
20
First Seen
Feb 10, 2026
salvo-websocket — salvo-rs/salvo-skills