rust: Pick up std feature by default for x509 and tls crate It could be a major footgun to commit to no_std by default on these crates, given that callbacks could still panic-unwind into C frames. - If a user wants to use these crates in `no_std`, it would be better for them to explicitly opt-out and install their own panic handler. - It is also very rare to have any use for these crates in `no_std`. Signed-off-by: Xiangfei Ding <xfding@google.com> Change-Id: Id05c90822774da711dbfe9649fbb51026a6a6964 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/90747 Reviewed-by: Adam Langley <agl@google.com> Reviewed-by: Rudolf Polzer <rpolzer@google.com>
diff --git a/rust/bssl-tls/Cargo.toml b/rust/bssl-tls/Cargo.toml index 5271a13..7482a7f 100644 --- a/rust/bssl-tls/Cargo.toml +++ b/rust/bssl-tls/Cargo.toml
@@ -16,7 +16,7 @@ tracing-subscriber = "0.3" [features] -default = [] +default = ["std"] # `std` depends on the Rust `std` crate, but adds some useful trait impls if # available. std = ["bssl-crypto/std"]
diff --git a/rust/bssl-x509/Cargo.toml b/rust/bssl-x509/Cargo.toml index 85a0166..a84c9e3 100644 --- a/rust/bssl-x509/Cargo.toml +++ b/rust/bssl-x509/Cargo.toml
@@ -16,7 +16,7 @@ path = "../bssl-sys" [features] -default = [] +default = ["std"] # `std` depends on the Rust `std` crate, but adds some useful trait impls if # available. std = ["bssl-crypto/std"]