Cargo Features
[dependencies]
jwt-compact = { version = "0.9.0-beta.1", default-features = false, features = ["std", "clock", "es256k", "rsa", "ciborium", "ed25519-compact", "ed25519-dalek", "exonum-crypto", "k256", "p256"] }
- default = ciborium, clock, std
-
These default features are set whenever
jwt-compact
is added without
somewhere in the dependency tree.default-features = false - std default
-
Enables
std
-specific functionality (such as error types implementing the standardError
trait).Enables std of anyhow, optional ciborium, and serde_json
anyhow:
Public dependencies (present in the public API).
- clock default
-
Enables getting the current time using
Utc::now()
fromchrono
. Without it, someTimeOptions
constructors, such as theDefault
impl, are not available. It is still possible to createTimeOptions
with an excplicitly specified clock function, or to set / verify time-relatedClaims
fields manually. - es256k = lazy_static, secp256k1
-
secp256k1
crypto backend;lazy_static
is required for internal initialization. - rsa
-
RSA algorithm and its dependencies (currently,
getrandom
-based RNG).
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.
- ciborium default
-
Affects
traits::AlgorithmExt.compact_token
… - lazy_static es256k?
-
Enables lazy_static
Private dependencies (not exposed in the public API).
- secp256k1 es256k?
-
Enables secp256k1 ^0.29
Crypto backends (all public dependencies).
- ed25519-compact implicit feature
-
Enables ed25519-compact
ed25519-compact:
A small, self-contained, wasm-friendly Ed25519 implementation
- ed25519-dalek implicit feature
-
Enables ed25519-dalek
ed25519-dalek:
Fast and efficient ed25519 EdDSA key generations, signing, and verification in pure Rust
- exonum-crypto implicit feature
-
Enables exonum-crypto
exonum-crypto:
Cryptography related types, constants, traits and functions
- k256 implicit feature
- p256 implicit feature