5 unstable releases

Uses old Rust 2015

0.11.1 Oct 28, 2021
0.11.0 Jul 14, 2021
0.10.1 Jul 8, 2021
0.10.0 Sep 17, 2020
0.8.0 Jan 28, 2019

#133 in WebSocket

Download history 1150/week @ 2024-06-19 1102/week @ 2024-06-26 126/week @ 2024-07-03 1046/week @ 2024-07-10 1794/week @ 2024-07-17 1473/week @ 2024-07-24 835/week @ 2024-07-31 1524/week @ 2024-08-07 1577/week @ 2024-08-14 1664/week @ 2024-08-21 1663/week @ 2024-08-28 1387/week @ 2024-09-04 1140/week @ 2024-09-11 1501/week @ 2024-09-18 1679/week @ 2024-09-25 824/week @ 2024-10-02

5,318 downloads per month
Used in 25 crates (4 directly)

MIT license

250KB
5.5K SLoC

WS-RS

Lightweight, event-driven WebSockets for Rust.


/// A WebSocket echo server
listen("127.0.0.1:3012", |out| {
    move |msg| {
        out.send(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.

Introduction

Build Status MIT licensed

Homepage

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.

Features

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

Testing

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.

Contributing

Please report bugs and make feature requests here.

Dependencies

~4–14MB
~196K SLoC