Skip to content

Commit

Permalink
Merge #690: BUG: Does not work with no_std under 1.29 (MSRV)
Browse files Browse the repository at this point in the history
7854bd7 Fix `no_std` MSRV Fixes #690, #947 (mcroad)

Pull request description:

  `rust-bitcoin` does not work with rust 1.29 under a `no_std` environment. This could be considered a bug. However, `no_std` support is a recent addition and this is likely not breaking anyone's builds.

  A decision needs to be made, either `no_std` MSRV is the current stable version while keeping the `std` MSRV as 1.29, or it needs to be fixed.

  This pr adds `no_std` to the 1.29 test suite.

  This came as I try to get rust-bitcoin/rust-miniscript#277 working and got stuck on the issue of testing `no_std` under 1.29.

ACKs for top commit:
  Kixunil:
    ACK 7854bd7
  tcharding:
    ACK 7854bd7
  sanket1729:
    ACK 7854bd7
  apoelstra:
    ACK 7854bd7

Tree-SHA512: 1614fb2193f760ed340592bdb94d076066f6f783bc1dc2b145d97f7151a28316e56b1975f1ad948460eb26db04e7e9382e60076686a681e46dcf33521fda5fca
  • Loading branch information
apoelstra committed Apr 30, 2022
2 parents 0dd2b43 + 7854bd7 commit ff6dc61
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/rust.yml
Expand Up @@ -28,6 +28,10 @@ jobs:
- rust: 1.41.1
env:
AS_DEPENDENCY: true
- rust: 1.47
env:
AS_DEPENDENCY: true
DO_NO_STD: true
steps:
- name: Checkout Crate
uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions .gitignore
@@ -1,5 +1,6 @@
target
Cargo.lock
dep_test

#fuzz
fuzz/hfuzz_target
Expand Down
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -77,7 +77,8 @@ please join us in

## Minimum Supported Rust Version (MSRV)

This library should always compile with any combination of features on **Rust 1.29**.
This library should always compile with any combination of features (minus
`no-std`) on **Rust 1.41.1** or **Rust 1.47** with `no-std`.

Because some dependencies have broken the build in minor/patch releases, to
compile with 1.29.0 you will need to run the following version-pinning command:
Expand Down
3 changes: 2 additions & 1 deletion src/util/bip32.rs
Expand Up @@ -74,7 +74,8 @@ impl fmt::Debug for ExtendedPrivKey {
.field("parent_fingerprint", &self.parent_fingerprint)
.field("child_number", &self.child_number)
.field("chain_code", &self.chain_code)
.finish_non_exhaustive()
.field("private_key", &"[SecretKey]")
.finish()
}
}

Expand Down

0 comments on commit ff6dc61

Please sign in to comment.