(doc) Explain how and why to opt out of native_tls

Also point out the examples/rustlts.rs file for pure Rust TLS goodness
This commit is contained in:
Bryce Fisher-Fleig 2019-09-20 23:37:02 -07:00
parent 29fece1221
commit 97671062ee

View file

@ -57,6 +57,22 @@
//! Ok(Some(body))
//! }
//! ```
//!
//! ## Opting out of `native_tls`
//!
//! For situations where using openssl becomes problematic, you can disable the
//! default feature which provides integration with the `native_tls` crate. One major
//! reason you might want to do this is cross-compiling. To opt out of native_tls, add
//! this to your Cargo.toml file:
//!
//! ```toml
//! [dependencies.imap]
//! version = "<some version>"
//! default-features = false
//! ```
//!
//! Even without `native_tls`, you can still use TLS by leveraging the pure Rust `rustls`
//! crate. See the example/rustls.rs file for a working example.
#![deny(missing_docs)]
#![warn(rust_2018_idioms)]