Cargo Features

[dependencies]
jwt-compact = { version = "0.8.0", 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 default-features = false somewhere in the dependency tree.

std default

Enables std-specific functionality (such as error types implementing the standard Error 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() from chrono. Without it, some TimeOptions constructors, such as the Default impl, are not available. It is still possible to create TimeOptions with an excplicitly specified clock function, or to set / verify time-related Claims fields manually.

Enables clock of chrono

es256k = lazy_static, secp256k1

secp256k1 crypto backend; lazy_static is required for internal initialization.

rsa

RSA algorithm and its dependencies (currently, getrandom-based RNG).

Enables rsa, getrandom of rand_core, oid of sha2

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.28

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