Improve feature usage bitcoin-hashes[-std]#509
Merged
apoelstra merged 1 commit intorust-bitcoin:masterfrom Nov 14, 2022
Merged
Conversation
Currently we have a feature `bitcoin-hashes-std` and a dependency `bitcoin_hashes`, this means one has to think about and change the `_` and `-` when coding. The underscore in `bitcoin_hashes` is an artifact of days gone by and we cannot fix it but we can cover it up and make our lives easier, especially now we have `bitcoin-hashes-std`. Improve feature usage of the `bitcoin_hashes` library by: - Add a feature `bitcoin-hashes` that enables `bitcoin_hashes`. - Use the new feature in all feature gated code - Use `bitcoin-hashes-std` in feature gated code that includes other `std` features (e.g. `rand-std`)
3f95ad0 to
b0d0b2a
Compare
Member
|
Looks good to me. I think when we hit rustc 1.62 or whatever will let us have conditional dependencies, we may want to rename the crate entirely. (And that this should block 1.0.) We could maybe even do it as part of crate smashing. |
apoelstra
approved these changes
Nov 14, 2022
chain-forgexcr45
added a commit
to chain-forgexcr45/rust-secp256k1
that referenced
this pull request
Sep 28, 2025
…hashes[-std]
b0d0b2afcbb9a7b918b7e75707b9f8015b642ae6 Improve feature usage bitcoin-hashes[-std] (Tobin C. Harding)
Pull request description:
Currently we have a feature `bitcoin-hashes-std` and a dependency `bitcoin_hashes`, this means one has to think about and change the `_` and `-` when coding. The underscore in `bitcoin_hashes` is an artifact of days gone by and we cannot fix it but we can cover it up and make our lives easier, especially now we have `bitcoin-hashes-std`.
Improve feature usage of the `bitcoin_hashes` library by:
- Add a feature `bitcoin-hashes` that enables `bitcoin_hashes`.
- Use the new feature in all feature gated code
- Use `bitcoin-hashes-std` in feature gated code that includes other `std` features (e.g. `rand-std`)
ACKs for top commit:
apoelstra:
ACK b0d0b2afcbb9a7b918b7e75707b9f8015b642ae6
Tree-SHA512: e6a86fe2c5b249a6c32b0fdedaeb8e25c47a30a4709f4fc4020cc1762747fe5d25883e2340ff77698079c9ee397491984889d3c1aaf195ca27eec09a77f62978
william2332-limf
added a commit
to william2332-limf/rust-secp256k1
that referenced
this pull request
Oct 2, 2025
…hashes[-std]
b0d0b2afcbb9a7b918b7e75707b9f8015b642ae6 Improve feature usage bitcoin-hashes[-std] (Tobin C. Harding)
Pull request description:
Currently we have a feature `bitcoin-hashes-std` and a dependency `bitcoin_hashes`, this means one has to think about and change the `_` and `-` when coding. The underscore in `bitcoin_hashes` is an artifact of days gone by and we cannot fix it but we can cover it up and make our lives easier, especially now we have `bitcoin-hashes-std`.
Improve feature usage of the `bitcoin_hashes` library by:
- Add a feature `bitcoin-hashes` that enables `bitcoin_hashes`.
- Use the new feature in all feature gated code
- Use `bitcoin-hashes-std` in feature gated code that includes other `std` features (e.g. `rand-std`)
ACKs for top commit:
apoelstra:
ACK b0d0b2afcbb9a7b918b7e75707b9f8015b642ae6
Tree-SHA512: e6a86fe2c5b249a6c32b0fdedaeb8e25c47a30a4709f4fc4020cc1762747fe5d25883e2340ff77698079c9ee397491984889d3c1aaf195ca27eec09a77f62978
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently we have a feature
bitcoin-hashes-stdand a dependencybitcoin_hashes, this means one has to think about and change the_and-when coding. The underscore inbitcoin_hashesis an artifact of days gone by and we cannot fix it but we can cover it up and make our lives easier, especially now we havebitcoin-hashes-std.Improve feature usage of the
bitcoin_hasheslibrary by:bitcoin-hashesthat enablesbitcoin_hashes.bitcoin-hashes-stdin feature gated code that includes otherstdfeatures (e.g.rand-std)