New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add README docs for proper use of std and no-std features #1711
Add README docs for proper use of std and no-std features #1711
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK the doc, NACK build error. Just remove it and it's OK.
Looking at it now, I think you meant to submit the compile error to |
9f711a5
to
1cc7376
Compare
Yes it first came up in the discussion about |
README.md
Outdated
@@ -93,6 +93,10 @@ versions than the current stable one (see MSRV section). | |||
|
|||
## 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` and both can be enabled without conflict. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammar nit. I'd break this into multiple sentences:
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.
This is identical to your text, I just split it into 3 sentences.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that does read more clearly. I've updated as your suggested.
1cc7376
to
33ee7a5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 33ee7a5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 33ee7a5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 33ee7a5
Building this crate requires the
std
and/orno-std
features be enabled. This PR documents this build constraint in the READMEand gives an error is anyone tries to build without enabling one or both of these features.See discussion in rust-bitcoin/rust-miniscript#533.