Skip to content

Commit

Permalink
Make threading feature optional and do not include platform_time.h if…
Browse files Browse the repository at this point in the history
… time feature is no active
  • Loading branch information
DrTobe committed Jul 20, 2023
1 parent 74eeb22 commit 3d06edc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mbedtls-platform-support/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ zeroize = { version = "1.6.0", default-features = false }
[dependencies.mbedtls-sys-auto]
version = "3.5.0-alpha.1+0b3de6f"
default-features = false
features = ["threading", "custom_printf"]
features = ["custom_printf"]
path = "../mbedtls-sys"

[build-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion mbedtls-sys/build/headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use crate::features::FEATURES;
#[cfg_attr(rustfmt, rustfmt_skip)]
pub const ORDERED: &'static [(Option<&'static str>, &'static str)] = &[
(None, "build_info.h"),
(None, "platform_time.h"),
(Some("time"), "platform_time.h"),
(None, "private_access.h"),
(None, "platform_util.h"),
(None, "bignum.h"),
Expand Down
5 changes: 3 additions & 2 deletions mbedtls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ rs-libc = "0.2.4"
[dependencies.mbedtls-sys-auto]
version = "3.5.0-alpha.1+0b3de6f"
default-features = false
features = ["trusted_cert_callback", "threading"]
features = ["trusted_cert_callback"]
path = "../mbedtls-sys"

[dependencies.mbedtls-platform-support]
Expand All @@ -61,7 +61,7 @@ cc = "1.0"

[features]
# Features are documented in the README
default = ["std", "aesni", "time", "padlock"]
default = ["std", "aesni", "time", "threading", "padlock"]
std = ["byteorder/std", "mbedtls-sys-auto/std", "serde/std", "yasna", "mbedtls-platform-support/std"]
debug = ["mbedtls-sys-auto/debug"]
no_std_deps = ["mbedtls-platform-support/no_std_deps", "serde/alloc"]
Expand All @@ -70,6 +70,7 @@ mpi_force_c_code = ["mbedtls-sys-auto/mpi_force_c_code"]
rdrand = ["mbedtls-platform-support/rdrand"]
aesni = ["mbedtls-platform-support/aesni"]
time = ["mbedtls-platform-support/time"]
threading = ["mbedtls-platform-support/threading"]
padlock = ["mbedtls-sys-auto/padlock"]
dsa = ["std", "yasna", "num-bigint", "bit-vec"]
async = ["std", "tokio", "tokio/net", "tokio/io-util", "tokio/macros"]
Expand Down

0 comments on commit 3d06edc

Please sign in to comment.