#websocket #mio #event-driven #io #web


Tetsy Lightweight, event-driven WebSockets for Rust

Show the crate…

1 unstable release

Uses old Rust 2015

0.10.0 Mar 13, 2021
0.0.0 Mar 13, 2021

#36 in #event-driven

Download history 17/week @ 2023-05-18 43/week @ 2023-05-25 71/week @ 2023-06-01 2/week @ 2023-06-08 75/week @ 2023-06-15 79/week @ 2023-06-22 45/week @ 2023-06-29 151/week @ 2023-07-06 37/week @ 2023-07-13 71/week @ 2023-07-20 58/week @ 2023-07-27 32/week @ 2023-08-03 49/week @ 2023-08-10 97/week @ 2023-08-17 35/week @ 2023-08-24 26/week @ 2023-08-31

215 downloads per month
Used in 26 crates (via tetsy-jsonrpc-ws-server)

MIT license

5.5K SLoC


Lightweight, event-driven WebSockets for Rust.

/// A WebSocket echo server
listen("", |out| {
    move |msg| {

This fork

Note this is (hopefuly) a temporary fork of the original crate until https://github.com/housleyjk/ws-rs/pull/328 gets merged.


Build Status MIT licensed Crate


API Documentation

This library provides an implementation of WebSockets, RFC6455 using MIO. It allows for handling multiple connections on a single thread, and even spawning new client connections on the same thread. This makes for very fast and resource efficient WebSockets. The API design abstracts away the menial parts of the WebSocket protocol and allows you to focus on application code without worrying about protocol conformance. However, it is also possible to get low-level access to individual WebSocket frames if you need to write extensions or want to optimize around the WebSocket protocol.

Getting Started

For detailed installation and usage instructions, check out the guide.


WS-RS provides a complete implementation of the WebSocket specification. There is also support for ssl and permessage-deflate.


WS-RS is thoroughly tested and passes the Autobahn Test Suite for WebSockets, including the tests for permessage-deflate. Visit ws-rs.org to view the results of the latest test run.


Please report bugs and make feature requests here.


~205K SLoC