A modern, memory-safe TLS library written in Rust, implementing TLS 1.2 and 1.3 for clients and servers.
Rustls is a modern Transport Layer Security (TLS) library written in the Rust programming language. It implements TLS 1.2 and 1.3 protocols for both client and server applications, providing a secure-by-default alternative to traditional TLS libraries. The library is designed to eliminate memory safety vulnerabilities and configuration errors that can lead to security flaws.
Developers building networked applications in Rust that require secure TLS connections, including web servers, clients, proxies, and embedded systems where memory safety and correct cryptography are critical.
Developers choose Rustls for its memory safety guarantees due to Rust, its secure-by-default configuration that prevents misconfiguration, and its modern, actively maintained codebase that avoids obsolete cryptography. Its pluggable crypto provider system offers flexibility for different platform and compliance requirements.
A modern TLS library in Rust
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Written in Rust, rustls eliminates entire classes of memory safety vulnerabilities common in C/C++ TLS implementations, as emphasized in its key features and value proposition.
Requires no configuration to achieve high cryptographic security and excludes obsolete features by default, preventing common misconfiguration pitfalls highlighted in the README's approach section.
Implements both TLS 1.2 and 1.3 for clients and servers, ensuring comprehensive coverage of current standards, as listed in the protocol features documentation.
The CryptoProvider system allows swapping cryptographic primitives for compliance or performance, with multiple first-party and third-party options detailed in the README, enhancing flexibility.
Starting from version 0.24, rustls requires explicit configuration of a crypto provider when building ClientConfig or ServerConfig, adding an extra step compared to older versions or libraries with built-in defaults.
The recommended aws-lc-rs provider can be harder to build on some platforms, as acknowledged in its FAQ, potentially complicating deployment on certain architectures without custom providers.
Some providers, like rustls-ring, lack support for post-quantum algorithms, which may limit future-proofing for security-sensitive applications, as noted in the provider comparisons.
rustls is an open-source alternative to the following products: