From cc4c62268519633b53d9af96ff1999ecf757ffc6 Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Thu, 29 Feb 2024 00:50:15 +0000 Subject: [PATCH] Disable wasmbind feature by default This removes `wasmbind` from the default feature set, which stops chrono from implicitly depending upon wasm-bindgen and js-sys. This is helpful for a few reasons: * It reduces the default dependency set by default for non-wasm projects, which shrinks the download size. * Projects like Fuchsia have a policy where 3rd party crates need to be audited. While we don't use wasm-bindgen, we can't opt out of it by setting `default-features = false` because of [feature unification] ends up enabling chrono's default feature. See this [cargo issue] for more details. `wasm-bindgen` is large and complicated, so it's pretty expensive for us to update. Fixes #1164 [feature unification]: https://doc.rust-lang.org/cargo/reference/features.html#feature-unification [cargo issue]: https://github.com/rust-lang/cargo/issues/4463 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 1e5182d961..b73af200f6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ name = "chrono" [features] # Don't forget to adjust `ALL_NON_EXCLUSIVE_FEATURES` in CI scripts when adding a feature or an optional dependency. -default = ["clock", "std", "wasmbind"] +default = ["clock", "std"] alloc = [] libc = [] winapi = ["windows-targets"]