Cargo Features
[dependencies]
sp-core = { version = "39.0.0", default-features = false, features = ["std", "serde", "full_crypto", "bls-experimental", "bandersnatch-experimental"] }
- default = std
-
The
stdfeature is set by default wheneversp-coreis added withoutsomewhere in the dependency tree.default-features = false - std default = full_crypto, itertools, parking_lot, rand, thiserror, tracing
-
Enables rand and std of bip39, std and thread-pool of futures, byteorder, rustc-hex, serde and std of primitive-types ^0.13.1, alloc and std of zeroize, std of scale-info and schnorrkel, std of blake2, bounded-collections, bs58, parity-scale-codec, and ed25519-zebra and global-context and std of secp256k1 ^0.28.0
secp256k1 crate, better performance, intended to be used on host side (std)
and std of hash-db, hash256-std-hasher, impl-serde, k256, libsecp256k1, log, and merlin
k256:
k256 crate, better portability, intended to be used in substrate-runtimes (no-std)
bandersnatch crypto
and std of serde, sp-crypto-hashing, sp-debug-derive, sp-externalities, sp-std, sp-storage, ss58-registry, substrate-bip39, optional sha2, and optional w3f-bls
sha2:
bls crypto
Affects
crypto::Ss58Codec.from_string,crypto::Ss58Codec.from_string_with_version,crypto::Pair.generate,crypto::Pair.generate_with_phrase,hexdisplay::ascii_format,offchain::storage,offchain::testing,testing::TaskExecutor… - serde std = blake2, impl-serde
-
Serde support without relying on std features.
Enables serde, serde of bounded-collections, alloc of bs58, serde of k256, serde_no_std of primitive-types ^0.13.1, serde of scale-info, serde of sp-storage
Affects
crypto::Ss58Codec.from_ss58check,crypto::Ss58Codec.from_ss58check_with_version,crypto::Ss58Codec.to_ss58check_with_version,crypto::Ss58Codec.to_ss58check,crypto::Derive.derive,crypto::default_ss58_version,crypto::unwrap_or_default_ss58_version,crypto::set_default_ss58_version,crypto::PublicError… - full_crypto std = blake2
-
This feature enables all crypto primitives for
no_stdbuilds like microcontrollers or Intel SGX. For the regular wasm runtime builds this should not be used.Affects
crypto::Pair.sign,proof_of_possession::ProofOfPossessionGenerator.generate_proof_of_possession,crypto::PublicError… - bls-experimental = sha2, w3f-bls
-
This feature adds BLS crypto primitives.
It should not be used in production since the implementation and interface may still be subject to significant changes.Affects
sp-core::bls,paired_crypto::ecdsa_bls377,paired_crypto::ecdsa_bls381… - bandersnatch-experimental = ark-vrf
-
This feature adds Bandersnatch crypto primitives.
It should not be used in production since the implementation and interface may still be subject to significant changes.Affects
sp-core::bandersnatch…
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.
- bs58 serde? std
- futures std
- impl-serde serde? std
- itertools std
-
Enables itertools ^0.11
- parking_lot std
- rand std
-
Enables rand ^0.8.5
- sp-externalities std
- thiserror std
-
Enables thiserror ^1.0.64
- tracing std
- blake2 full_crypto? serde? std
- secp256k1 std
-
Enables secp256k1 ^0.28.0
- sha2 bls-experimental?
- w3f-bls bls-experimental?
- ark-vrf bandersnatch-experimental?