rustls
A modern, memory-safe TLS library for Rust with no unsafe code and no legacy crypto by default.
Repository Health
Technical Analysis
Rustls is a TLS library written in Rust that implements TLS 1.2 and TLS 1.3 for both clients and servers. It is designed to provide a good level of cryptographic security by default, requiring no configuration to achieve that security, and it deliberately avoids unsafe code and obsolete cryptographic algorithms.
Since version 0.22, Rustls supports pluggable cryptography providers via the CryptoProvider abstraction, letting users choose between aws-lc-rs (full feature set, including post-quantum algorithms) or ring (broader platform support). It is widely used in production, underpinning projects like curl, AWS-LC, and numerous Rust web servers and clients.
What You Get
- Full TLS 1.2 and TLS 1.3 protocol implementations for both client and server roles
- Pluggable cryptography providers (aws-lc-rs, ring, or third-party) via the CryptoProvider abstraction
- Secure-by-default configuration with no support for obsolete or insecure cipher suites
- Experimental post-quantum key exchange support via the rustls-post-quantum crate
- QUIC transport support for building HTTP/3 and other QUIC-based protocols
- No unsafe code in the core crate, reducing the risk of memory-corruption vulnerabilities
Common Use Cases
- Adding TLS termination to a custom Rust network server (e.g. via mio or Tokio)
- Building an HTTPS client for a Rust application without linking OpenSSL
- Providing the TLS layer underneath async runtimes via integrations like tokio-rustls
- Implementing QUIC-based protocols such as HTTP/3 that need a pluggable TLS backend
Under The Hood
Architecture - Rustls is organized as a Cargo workspace with the core rustls crate providing protocol state machines (client, server, tls12, tls13 modules) decoupled from cryptography via the crypto::CryptoProvider trait, with rustls-aws-lc-rs and rustls-ring crates supplying concrete implementations; message parsing lives in msgs, connection state in conn/common_state.rs, and QUIC support is threaded through quic.rs. Tech Stack - Written in Rust (98% of the codebase, edition 2024), with optional feature flags for webpki certificate verification, zlib-based compression, brotli compression, and log integration; the workspace also includes rustls-post-quantum for experimental algorithms, bogo and connect-tests for protocol conformance, and ci-bench/rustls-bench for performance regression tracking. Code Quality - The project maintains an extensive test suite including BoGo (Google’s TLS conformance) tests, OpenSSL interop tests, and network-based connect tests, plus binary test-vector fixtures under src/testdata; the crate excludes test data and tests from the packaged crate (exclude in Cargo.toml) and enforces deny.toml for dependency auditing. API Design - The public API centers on ClientConfig/ServerConfig builders that require an explicit CryptoProvider since 0.24, favoring explicitness over implicit defaults; documentation is thorough via docs.rs and a dedicated manual module covering supported features, and example programs (tlsclient-mio, tlsserver-mio) demonstrate real I/O integration patterns.
Used by 19 apps in this directory
AFFiNE
Productivity · Project Management · Note Taking
Write, draw, and plan in one infinite canvas — the open-source alternative to Notion and Miro that keeps your data yours.
Arroyo
Data Engineering · Analytics
A distributed stream processing engine written in Rust that lets you write SQL to run stateful, real-time computations over data streams with subsecond results.
bunqueue
Developer Tools · Devops
High-performance job queue for Bun — SQLite persistence, cron scheduling, DLQ, S3 backups, and a native MCP server, all without Redis.
cmux
Developer Tools · AI Development
A native, Ghostty-based macOS terminal with vertical tabs, agent-aware notifications, and a scriptable browser built for running many parallel AI coding agent sessions instead of juggling tmux panes.
fabro
Developer Tools · Devops
Define AI agent workflows as code graphs, route tasks across any LLM, and intervene only where it matters.
Hook0
Devops
Open-source Webhooks-as-a-Service: deliver events to your users with auto-retry, signed payloads, and a real-time subscriber dashboard — all without building the infrastructure yourself.
hoop
Security · Monitoring
A wire-protocol gateway that enforces data masking, command blocking, approval workflows, and full session recording for engineers and AI agents accessing production infrastructure.
Laminar
AI Development · Monitoring
Open-source observability platform purpose-built for AI agents — trace, evaluate, debug, and monitor at scale with SQL access and real-time replay.
LocalSend
Networking
An open-source, cross-platform AirDrop alternative that sends files and messages device-to-device over your local network with no internet, no account, and no cloud server involved.