# Tungstenite

Lightweight stream-based WebSocket implementation for Rust.

Repository: https://github.com/snapview/tungstenite-rs
Canonical: https://ross.abutalabs.com/products/tungstenite
Language: Rust
License: Apache-2.0
License Family: permissive
Topics: rust, websockets
Last push: 2026-07-11T12:10:26+00:00

## Health v2 (maintenance only)
Score: 74/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 92, release rhythm 35, longevity 100
- inputs: {"age_days": 3456, "days_push": 53, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2384, forks 290 (observed 2026-08-28T04:06:42.523798+00:00)

## What it is
tokio-tungstenite is a Rust library providing asynchronous WebSocket client and server support built on top of the lightweight tungstenite-rs implementation, with Tokio bindings for non-blocking streams. It supports TLS via native-tls or rustls feature flags for secure wss:// connections.

## Use cases
- add websocket support to a tokio server
- connect to a websocket api from rust asynchronously
- build a real-time chat backend in rust
- stream messages over wss with rustls
- implement a lightweight websocket client without heavy frameworks

## When to choose
- you are already using the Tokio async runtime
- you want a lightweight, stream-based WebSocket implementation in Rust
- you need TLS support via native-tls or rustls feature flags
- you need a mature, widely used WebSocket crate with production track record

## When to avoid
- you need maximum WebSocket throughput and prefer fastwebsockets
- you use an async runtime other than Tokio
- you want a full-featured web framework with WebSockets built in

## Facets
- artifact type: library
- maturity: stable
- function: websocket, http-server, http-client, networking
- domain: web-development, backend, networking
- platform: rust, cross-platform
- tags: websocket, tokio, async, rust, tls, wss, real-time

## Member repositories
- snapview/tungstenite-rs (main) score 74
- snapview/tokio-tungstenite (plugin) score 74

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:42.523798+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:27:00.749508+00:00, confidence not recorded.
  - readme: https://github.com/snapview/tungstenite-rs (fetched 2026-08-28T04:06:42.523798+00:00, sha b8ea6ae580cb)
  - registry_crates: https://crates.io/api/v1/crates/tokio-tungstenite (fetched 2026-08-29T10:09:14.419847+00:00, sha 7e436109e9eb)
- Data as of 2026-08-30T08:39:29.467469+00:00.
