(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:
parent
29fece1221
commit
97671062ee
1 changed files with 18 additions and 2 deletions
16
src/lib.rs
16
src/lib.rs
|
|
@ -57,6 +57,22 @@
|
||||||
//! Ok(Some(body))
|
//! 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)]
|
#![deny(missing_docs)]
|
||||||
#![warn(rust_2018_idioms)]
|
#![warn(rust_2018_idioms)]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue