bitcoindevkit / bitcoindevkit/bdk

[core] Set `default-features = false` for `serde` dependency

Open
#2,208 1 comment 3 reactions 0 assignees View on GitHub
dependencies
Dominant language
Rust
Stars
1.1k
Forks
483
Avg merge
20d 3h
Merged PRs (30d)
3

Description

Both `bdk_core` and `bdk_chain` declare their `serde` dependency without `default-features = false`.

Because serde's default feature set includes `std`, enabling the `bdk_chain/serde` feature in a downstream `no_std` crate activates `serde/std` via Cargo's feature unification. On bare-metal targets where `std` is unavailable this produces a compile error in `serde_core`.

**Expected behavior**

Enabling `bdk_chain/serde` in a `no_std + alloc` project should not activate `serde/std`. The fix is straightforward: add `default-features = false` to the `serde` dep in both `bdk_core` and `bdk_chain`, and propagate `serde/std` through their existing `std` feature.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.