-
Notifications
You must be signed in to change notification settings - Fork 275
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
New alloc feature #300
New alloc feature #300
Conversation
src/lib.rs
Outdated
#[cfg(feature = "alloc")] extern crate alloc; | ||
|
||
#[cfg(all(feature = "std", feature = "alloc"))] | ||
compile_error!("std and alloc are mutually exclusive"); |
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've done the same in another PR rust-bitcoin/bitcoin_hashes#127
however, this causes an issue with how current resolver threat dependencies, taking the union of features if different crates specify different features. New resolver fixes this issue https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#cargos-new-feature-resolver but it's much more modern than our MSRV
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.
so are you thinking that if they are both set, then we should act as if std
only is set?
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.
added a fixup for this
needs rebase |
Allows use of `Secp256k1::new` and related API if an allocator is available
rebased |
Reminder that when our MSRV hits 1.36 we could simplify and remove a bunch of these cfg conditions and use |
Allows use of
Secp256k1::new
and related API, if an allocator is available