Commit 64eed44
committed
Merge #987: fix(manifest): correct serde feature configuration for no-std
c7adcfd fix(manifest): correct serde feature configuration for no-std (Rishit Modi)
Pull request description:
### 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"`)
ACKs for top commit:
trevarj:
Nice find. ACK c7adcfd
apoelstra:
ACK c7adcfd; successfully ran local tests
Tree-SHA512: 33c2993856cfa70cba83f4b0f95b5bd9df04d6a50db3485d13ec18ea4d7c9f613f50ad86e6b53f1ad9cf7642165cd67d736a3e81f8f9b480084bb38a67ad728d1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
0 commit comments