Merge rust-bitcoin/rust-bitcoin#1711: Add README docs for proper use of std and no-std features

33ee7a58af Add README build docs for std and no-std (Steve Myers)

Pull request description:

  Building this crate requires the `std` and/or `no-std` features be enabled. This PR documents this build constraint in the README ~~and gives an error is anyone tries to build without enabling one or both of these features~~.

  See discussion in rust-bitcoin/rust-miniscript#533.

ACKs for top commit:
  tcharding:
    ACK 33ee7a58af
  Kixunil:
    ACK 33ee7a58af
  apoelstra:
    ACK 33ee7a58af

Tree-SHA512: 4c0f46681ee09a1d63d269c84ec69bd12944129c94a62f62f78694ae428566f3dfee9a36ac2742e02502b184c4ec0d6aec60a0c0760df3d75587700cb8a76ad2
This commit is contained in:
Andrew Poelstra 2023-03-17 14:24:42 +00:00
commit 51251557ad
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
1 changed files with 4 additions and 0 deletions

View File

@ -93,6 +93,10 @@ versions than the current stable one (see MSRV section).
## Building ## Building
The cargo feature `std` is enabled by default. At least one of the features `std` or `no-std` or both must be enabled.
Enabling the `no-std` feature does not disable `std`. To disable the `std` feature you must disable default features. The `no-std` feature only enables additional features required for this crate to be usable without `std`. Both can be enabled without conflict.
The library can be built and tested using [`cargo`](https://github.com/rust-lang/cargo/): The library can be built and tested using [`cargo`](https://github.com/rust-lang/cargo/):
``` ```