Skip to content

Commit

Permalink
Add tls-rust-no-provider crate feature (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
daxpedda authored Jul 31, 2024
1 parent 0830eaa commit 749d60a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ version = "0.7.0"

[features]
default = []
tls-rustls = ["arc-swap", "rustls", "rustls-pemfile", "tokio/fs", "tokio/time", "tokio-rustls", "rustls-pki-types"]
tls-rustls = ["tls-rustls-no-provider", "rustls/aws-lc-rs"]
tls-rustls-no-provider = ["arc-swap", "rustls", "rustls-pemfile", "tokio/fs", "tokio/time", "tokio-rustls", "rustls-pki-types"]
tls-openssl = ["arc-swap", "openssl", "tokio-openssl"]

[dependencies]
Expand All @@ -34,10 +35,10 @@ tower = { version = "0.4", features = ["util"] }
# optional dependencies
## rustls
arc-swap = { version = "1", optional = true }
rustls = { version = "0.23", optional = true }
rustls = { version = "0.23", default-features = false, optional = true }
rustls-pki-types = { version = "1.7", optional = true }
rustls-pemfile = { version = "2.1", optional = true }
tokio-rustls = { version = "0.26", optional = true }
tokio-rustls = { version = "0.26", default-features = false, optional = true }

## openssl
openssl = { version = "0.10", optional = true }
Expand Down
5 changes: 3 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
//! # Features
//!
//! * `tls-rustls` - activate [rustls] support.
//! * `tls-rustls-no-provider` - activate [rustls] support without a default provider.
//! * `tls-openssl` - activate [openssl] support.
//!
//! # Example
Expand Down Expand Up @@ -107,12 +108,12 @@ pub use self::{
server::{bind, from_tcp, Server},
};

#[cfg(feature = "tls-rustls")]
#[cfg(feature = "tls-rustls-no-provider")]
#[cfg_attr(docsrs, doc(cfg(feature = "tls-rustls")))]
pub mod tls_rustls;

#[doc(inline)]
#[cfg(feature = "tls-rustls")]
#[cfg(feature = "tls-rustls-no-provider")]
pub use self::tls_rustls::export::{bind_rustls, from_tcp_rustls};

#[cfg(feature = "tls-openssl")]
Expand Down

0 comments on commit 749d60a

Please sign in to comment.