Skip to content

fix(manifest): correct serde feature configuration for no-std#987

Merged
apoelstra merged 1 commit into
rust-bitcoin:masterfrom
EliteCoder18:fix/serde-no-std
Jun 14, 2026
Merged

fix(manifest): correct serde feature configuration for no-std#987
apoelstra merged 1 commit into
rust-bitcoin:masterfrom
EliteCoder18:fix/serde-no-std

Conversation

@EliteCoder18

Copy link
Copy Markdown
Contributor

Description

This PR fixes a bug where the optional serde dependency implicitly leaks the standard library into no-std builds.

Previously, serde was missing default-features = false in the [dependencies] block. When downstream crates attempted to compile miniscript for bare-metal targets (e.g., thumbv7m-none-eabi) using minimal-version dependency resolution, Cargo would resolve serde with its default "std" feature enabled, causing immediate compilation failures.

Notes to the reviewers

I encountered this feature leakage while working on integrating cargo-rbmt CI checks over in bdk_wallet (specifically in this PR: bitcoindevkit/bdk_wallet#494).

When the rbmt matrix runs its minimal dependency sweep on no-std bare-metal targets, it exposes this missing feature configuration. Applying this fix locally allowed the embedded target compilation to pass cleanly.

Changelog notice

  • Added default-features = false to the optional serde dependency.
  • Explicitly opted into the alloc feature for serde.
  • Updated the std feature array to use the weak dependency activation syntax ("serde?/std")

@trevarj

trevarj commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Nice find. ACK c7adcfd

@apoelstra

Copy link
Copy Markdown
Member

Thanks. Agreed, great fix. In future please do not post so many words. I think this bug was self-evident from the fix itself.

@apoelstra apoelstra left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK c7adcfd; successfully ran local tests

@apoelstra apoelstra merged commit 64eed44 into rust-bitcoin:master Jun 14, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants