Cargo Features
[dependencies]
sapio-bitcoin = { version = "0.28.2", default-features = false, features = ["base64", "unstable", "rand", "use-serde", "secp-lowmemory", "secp-recovery", "use-schemars", "std", "no-std", "bitcoinconsensus"] }
Please don't forget to add relevant features to docs.rs below
- default = secp-recovery, std
-
These default features are set whenever
sapio-bitcoin
is added without
somewhere in the dependency tree.default-features = false - base64 = base64-compat
- unstable
- rand
-
Enables rand-std of sapio-secp256k1
- use-serde = serde
-
Enables serde of bitcoin_hashes ^0.10.0 and sapio-secp256k1
- secp-lowmemory
-
Enables lowmemory of sapio-secp256k1
- secp-recovery default
-
Enables recovery of sapio-secp256k1
- use-schemars = schemars
-
Enables schemars of bitcoin_hashes ^0.10.0 and sapio-secp256k1
- std default
-
At least one of std, no-std must be enabled.
The no-std feature doesn't disable std - you need to turn off the std feature for that by disabling default.
Instead no-std enables additional features required for this crate to be usable without std.
As a result, both can be enabled without conflict.Enables std of bech32 ^0.8.1, bitcoin_hashes ^0.10.0, and sapio-secp256k1
Affects
network::address
,network::message
,network::message_blockdata
,network::message_bloom
,network::message_network
,network::message_filter
,network::stream_reader
… - no-std = hashbrown
-
Enables alloc of bitcoin_hashes ^0.10.0, core2 ^0.3.0, and sapio-secp256k1
sapio-secp256k1:
allow use of Secp256k1::new and related API that requires an allocator
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.
- core2 no-std?
-
Enables core2 ^0.3.0
- base64-compat base64?
- bitcoinconsensus implicit feature
-
Enables bitcoinconsensus ^0.19.0-3
bitcoinconsensus:
Bitcoin's libbitcoinconsensus with Rust binding
Affects
script::BitcoinConsensusError
… - serde use-serde?
-
Affects
amount::serde
… - hashbrown no-std?
-
Enables hashbrown ^0.8
- schemars use-schemars?