Cargo Features

libsecp256k1 = { version = "0.7.1", default-features = false, features = ["std", "hmac", "static-context", "lazy-static-context"] }
default = hmac, static-context, std

These default features are set whenever libsecp256k1 is added without default-features = false somewhere in the dependency tree.

std default lazy-static-context?

Enables std of base64 ^0.13, libsecp256k1-core, rand, serde, and sha2 ^0.9


Option (enabled by default): without "std" rand uses libcore; this option enables functionality expected to be available on a standard platform.

hmac default = hmac-drbg, sha2, typenum

Affects libsecp256k1::sign_with_context, libsecp256k1::sign

static-context default lazy-static-context?

Affects libsecp256k1::ECMULT_CONTEXT, libsecp256k1::ECMULT_GEN_CONTEXT, libsecp256k1::verify, libsecp256k1::recover, libsecp256k1::sign

lazy-static-context = lazy_static, static-context, std

Affects libsecp256k1::verify, libsecp256k1::recover, libsecp256k1::sign

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features.

hmac-drbg hmac
sha2 hmac std

Enables sha2 ^0.9

typenum hmac
lazy_static lazy-static-context?