Skip to content

Improve feature usage bitcoin-hashes[-std]#509

Merged
apoelstra merged 1 commit intorust-bitcoin:masterfrom
tcharding:11-10-bitcoin-hashes-feature
Nov 14, 2022
Merged

Improve feature usage bitcoin-hashes[-std]#509
apoelstra merged 1 commit intorust-bitcoin:masterfrom
tcharding:11-10-bitcoin-hashes-feature

Conversation

@tcharding
Copy link
Copy Markdown
Member

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)

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`)
@tcharding tcharding force-pushed the 11-10-bitcoin-hashes-feature branch from 3f95ad0 to b0d0b2a Compare November 9, 2022 23:56
@apoelstra
Copy link
Copy Markdown
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.

Copy link
Copy Markdown
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK b0d0b2a

@apoelstra apoelstra merged commit 8508680 into rust-bitcoin:master Nov 14, 2022
@tcharding tcharding deleted the 11-10-bitcoin-hashes-feature branch November 16, 2022 02:48
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
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.

2 participants