Cargo Features
[dependencies]
sapio-secp256k1 = { version = "0.28.1", default-features = false, features = ["std", "alloc", "hashes-std", "rand-std", "recovery", "lowmemory", "global-context", "global-context-less-secure", "json", "serde"] }
- default = std
-
The
std
feature is set by default wheneversapio-secp256k1
is added without
somewhere in the dependency tree.default-features = false - std default global-context? hashes-std? rand-std? = alloc
-
Enables std of sapio-secp256k1-sys
Affects
context::global
… - alloc std
-
allow use of Secp256k1::new and related API that requires an allocator
Enables alloc of sapio-secp256k1-sys
- hashes-std = std
-
Enables std of bitcoin_hashes >=0.12, <=0.13
You likely only want to enable these if you explicitly do not want to use "std", otherwise enable the respective -std feature e.g., hashes-std
- rand-std = rand, std
- recovery
-
Enables recovery of sapio-secp256k1-sys
- lowmemory
-
Enables lowmemory of sapio-secp256k1-sys
- global-context global-context-less-secure? = std
-
Affects
context::global
,sapio-secp256k1::generate_keypair
… - global-context-less-secure = global-context
-
disable re-randomization of the global context, which provides some defense-in-depth against sidechannel attacks. You should only use this feature if you expect the
rand
crate's thread_rng to panic. (If you are sure therand-std
feature will not be enabled, e.g. if you are doing a no-std build, then this feature does nothing and is not necessary.) - json = schemars
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.
- serde implicit feature
-
Enables serde
serde:
A generic serialization/deserialization framework
- hashes hashes-std?
-
Enables bitcoin_hashes >=0.12, <=0.13
- rand rand-std?
-
Affects
sapio-secp256k1::generate_keypair
… - schemars json?
-
Affects
ecdsa::schemas
…