From 29d1f5b971b2aea155ef56146df3eba88c6cf4b6 Mon Sep 17 00:00:00 2001 From: Rishit Modi Date: Sat, 13 Jun 2026 04:41:57 +0530 Subject: [PATCH] fix(chain,core): prevent serde from implicitly leaking std into no_std environments --- crates/chain/Cargo.toml | 2 +- crates/core/Cargo.toml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/chain/Cargo.toml b/crates/chain/Cargo.toml index 949f177c8..7c230bf01 100644 --- a/crates/chain/Cargo.toml +++ b/crates/chain/Cargo.toml @@ -18,7 +18,7 @@ workspace = true [dependencies] bitcoin = { version = "0.32.0", default-features = false } bdk_core = { path = "../core", version = "0.6.2", default-features = false } -serde = { version = "1", optional = true, features = ["derive", "rc"] } +serde = { version = "1", optional = true, default-features = false, features = ["derive", "rc", "alloc"] } miniscript = { version = "13.0.0", optional = true, default-features = false } # Feature dependencies diff --git a/crates/core/Cargo.toml b/crates/core/Cargo.toml index ed313f3ae..30f46a781 100644 --- a/crates/core/Cargo.toml +++ b/crates/core/Cargo.toml @@ -12,12 +12,12 @@ readme = "README.md" [dependencies] bitcoin = { version = "0.32", default-features = false } -serde = { version = "1", optional = true, features = ["derive", "rc"] } +serde = { version = "1", optional = true, default-features=false, features = ["derive"] } hashbrown = { version = "0.14.5", optional = true, default-features = false, features = ["ahash", "inline-more"] } [features] default = ["std"] -std = ["bitcoin/std"] +std = ["bitcoin/std", "serde?/std"] serde = ["dep:serde", "bitcoin/serde", "hashbrown?/serde"] [dev-dependencies]