Rustls vs NativeTls
⚓ Rust 📅 2025-06-23 👤 surdeus 👁️ 16Hi, just a quick small question.
The difference between rustls and native-tls is that the former is a pure-Rust implementation of the TLS protocol while the latter is just a wrapper communicating with the TLS implementation provided by the system (e.g OpenSSL).
Are these assumptions correct?
- Because
rustlsdoes not depend on the system it is more portable. - Code using
native-tlsmight not work on some systems missing dependencies. rustlsis more secure thennative-tlsbecause it is pure-Rust (memory safe).rustlsis a suitable solution for software which needs to work on different systems out-of-the-box, whilenative-tlswould be preferred when making system-specific software.rustlsis more performant.rustlsoften "just works" whilenative-tlsmight give portability issues.
And is it also true that when using rustls you have to specify the root certificates manually?
7 posts - 3 participants
🏷️ rust_feed