For a library for implementing WebSockets in Rust, the strongest matches are snapview/tokio-tungstenite (This library provides a high-performance, asynchronous WebSocket implementation built), actix/actix-web (Actix Web is a high-performance asynchronous web framework that) and seanmonstar/warp (Warp is a high-performance, asynchronous web framework that provides). joewalnes/websocketd and uwebsockets/uwebsockets round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.
We curate open-source GitHub repositories matching “best rust websocket libraries”. Results are ranked by relevance to your query — pick filters below to narrow, or refine with AI.
Future-based Tungstenite for Tokio. Lightweight stream-based WebSocket implementation
This library provides a high-performance, asynchronous WebSocket implementation built on top of the Tokio ecosystem, offering both low-level protocol control and integration with TLS/SSL for production-ready communication.
Actix Web is an asynchronous web framework designed for building high-performance network services. It provides a foundation for processing concurrent requests through a non-blocking execution model, utilizing an actor-based concurrency system to manage lightweight processes and message passing. The framework includes a low-level networking layer that handles the parsing and serialization of HTTP traffic according to standard specifications. The framework distinguishes itself through a type-safe routing engine that enforces strict data types at compile time, ensuring that request parameters a
Actix Web is a high-performance asynchronous web framework that includes robust, production-ready support for WebSockets as a core feature, though it is a broader web framework rather than a dedicated, standalone WebSocket library.
Warp is a Rust HTTP web framework designed for building high-performance web servers. It provides a system for managing request pipelines, implementing WebSocket servers for bidirectional communication, and serving static assets from the local filesystem. The framework is characterized by its use of type-safe request pipelines and routing. It utilizes a filter-based approach to extract and validate metadata from headers, query strings, and request bodies before they reach the application handler. Broad capability areas include HTTP API development, asynchronous task execution, and state-base
Warp is a high-performance, asynchronous web framework that provides built-in support for WebSocket connections, making it a suitable choice for implementing production-ready communication servers in Rust.
websocketd is a CGI web server and process-to-WebSocket wrapper that transforms command line programs into WebSocket servers by bridging standard input and output streams to remote clients. It functions as a TLS-secured gateway that routes traffic to backend processes, allowing any executable using standard IO to be exposed via a web interface. The project uses directory-based endpoint mapping to automate the creation of URL paths from local executable files. It employs a process-per-connection model to isolate execution and forwards HTTP request metadata, such as cookies and query parameters
This is a standalone WebSocket gateway and process wrapper written in Go, rather than a Rust library or framework for developers to build their own WebSocket applications.
uWebSockets is a C++ networking framework that serves as a high-performance WebSocket server library, HTTP web server, and pub-sub messaging system. It provides the infrastructure necessary to handle standard web requests and maintain low-latency, bidirectional connections between clients and servers. The framework is distinguished by its use of template meta-programming for compile-time optimization and zero-copy buffer management to minimize memory latency. It utilizes a backend-agnostic event loop and static route resolution to process network traffic with minimal runtime overhead. The pr
This is a high-performance C++ networking framework rather than a Rust library, meaning it cannot be used directly in a Rust project without FFI bindings.
Hyper is a low-level networking library designed for building high-performance HTTP clients and servers. It provides a foundational toolkit for creating network services that leverage asynchronous execution and memory-safe data handling, supporting both HTTP/1 and HTTP/2 protocols. The library distinguishes itself through a protocol-agnostic architecture that separates transport logic from HTTP semantics. It utilizes a service-trait abstraction to decouple network logic from the underlying transport, enabling developers to inject custom middleware for request interception and response transfo
Hyper is a foundational HTTP library for building network services, but it does not provide a native WebSocket implementation, making it a building block rather than the specific WebSocket library requested.
uWebSockets is a high-performance networking engine providing an HTTP web server and a WebSocket server framework. It implements a multi-threaded event loop architecture to deploy isolated application instances across multiple CPU cores and includes an SSL/TLS network layer for secure, encrypted communication. The project features a dedicated WebSocket pub/sub engine for distributing messages to specific groups of connected clients. It optimizes network throughput through syscall corking to reduce kernel overhead and employs payload compression to minimize data transfer sizes. The system cov
This is a high-performance C++ networking engine, not a Rust library, and therefore does not provide the native Rust integration or idiomatic API required for your project.
grpc-rust is a native gRPC framework for Rust designed for building high-performance remote procedure call clients and servers. It provides an asynchronous communication stack and a protocol buffers implementation for encoding, decoding, and generating type-safe code from service definitions. The project enables the implementation of unary and bi-directional data streaming over the HTTP/2 protocol. It includes specialized support for gRPC-Web integration, allowing browser-based clients to communicate with services through protocol translation. The infrastructure covers a broad range of distr
This is a gRPC framework for remote procedure calls rather than a general-purpose WebSocket library, though it does support streaming over HTTP/2 and gRPC-Web translation.
rustls is a memory-safe implementation of the Transport Layer Security protocol written in Rust. It provides a cryptographic stack for secure network communication, supporting both TLS 1.3 and 1.2 standards for client and server implementations. The project is designed as a modular cryptographic library that allows swapping underlying cryptographic backends and primitive providers to meet specific security or performance requirements. It incorporates a post-quantum cryptography stack, utilizing hybrid key exchanges and signatures to protect data against future quantum computing threats. The
This is a cryptographic library for TLS/SSL implementation rather than a WebSocket framework, though it serves as a critical building block for securing WebSocket connections in Rust.