rust-bitcoin-unsafe-fast/bitcoin
Martin Habovstiak b6f9e47dba Fix `no_std` when `bitcoinconsensus` is enabled
`default-features = false` was missing previously but blindly adding it
would lead to subtle risk of breaking when a crate not needing `std`
depends on `bitcoinconsensus` and simultaneously another crate not
needing `bitcoinconsensus` depends on `std` and another crate depends on
them both.

This change fixes it by introducing `bitcoinconsensus-std` feature flag
and provides a fallback if the flag is off. Unfortunately the fallback
has to use a bit of reasonable `unsafe` due to limitations of upcasting.

The only safe alternatives are not do it and provide worse experience
for crates that are affected by the problem above or break the API,
which couldn't be backported and would be more annoying to use.

Closes #1343
2022-10-25 15:01:58 +02:00
..
contrib ci: Remove serde version pinning 2022-10-25 09:32:01 +11:00
examples Use new PSBT signing API in example 2022-10-20 06:07:53 +11:00
src Fix `no_std` when `bitcoinconsensus` is enabled 2022-10-25 15:01:58 +02:00
test_data Add a workspace to the top level directory. 2022-09-13 08:44:57 +10:00
Cargo.toml Fix `no_std` when `bitcoinconsensus` is enabled 2022-10-25 15:01:58 +02:00