# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.95.0"
name = "cesr-rs"
version = "0.1.3"
authors = ["Joel DSouza <joel@devrandom.co>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "CESR + KERI primitives for Rust as a single feature-gated, no_std-capable crate"
readme = "README.md"
keywords = [
    "cesr",
    "keri",
    "identity",
    "cryptography",
]
categories = [
    "cryptography",
    "encoding",
    "no-std",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/devrandom-labs/cesr"

[features]
alloc = [
    "serde?/alloc",
    "serde_json?/alloc",
    "base64?/alloc",
    "zeroize?/alloc",
    "ed25519-dalek?/alloc",
    "k256?/alloc",
    "p256?/alloc",
]
async = [
    "stream",
    "dep:tokio-util",
    "dep:futures-core",
]
core = [
    "utils",
    "dep:base64",
    "dep:num-traits",
    "dep:strum",
    "dep:terrors",
    "dep:zeroize",
]
crypto = [
    "core",
    "dep:blake2",
    "dep:blake3",
    "dep:digest",
    "dep:ed25519-dalek",
    "dep:k256",
    "dep:p256",
    "dep:rand_core",
    "rand_core?/getrandom",
    "dep:getrandom",
    "dep:sha2",
    "dep:sha3",
    "dep:signature",
]
default = [
    "std",
    "core",
    "utils",
]
internals = []
keri = ["core"]
serder = [
    "keri",
    "crypto",
    "stream",
    "internals",
    "dep:serde",
    "dep:serde_json",
]
std = [
    "alloc",
    "serde?/std",
    "serde_json?/std",
    "thiserror/std",
    "rand_core?/std",
    "ed25519-dalek?/std",
    "k256?/std",
    "p256?/std",
    "base64?/std",
]
stream = [
    "core",
    "utils",
    "dep:bytes",
]
test-utils = []
utils = ["dep:num-traits"]

[lib]
name = "cesr"
path = "src/lib.rs"

[[test]]
name = "frozen_surface"
path = "tests/frozen_surface.rs"

[[bench]]
name = "counter"
path = "benches/counter.rs"
harness = false
required-features = ["stream"]

[[bench]]
name = "matter"
path = "benches/matter.rs"
harness = false
required-features = ["stream"]

[[bench]]
name = "stream"
path = "benches/stream.rs"
harness = false
required-features = ["stream"]

[dependencies.base64]
version = "0.22.1"
optional = true
default-features = false

[dependencies.blake2]
version = "0.10.6"
optional = true
default-features = false

[dependencies.blake3]
version = "1.8.3"
optional = true
default-features = false

[dependencies.bytes]
version = "1.10.1"
optional = true
default-features = false

[dependencies.digest]
version = "0.11.1"
optional = true
default-features = false

[dependencies.ed25519-dalek]
version = "2.2.0"
features = ["rand_core"]
optional = true
default-features = false

[dependencies.futures-core]
version = "0.3.31"
optional = true
default-features = false

[dependencies.k256]
version = "0.13.4"
features = ["ecdsa"]
optional = true
default-features = false

[dependencies.num-traits]
version = "0.2.19"
optional = true
default-features = false

[dependencies.p256]
version = "0.13.2"
features = ["ecdsa"]
optional = true
default-features = false

[dependencies.rand_core]
version = "0.6"
optional = true
default-features = false

[dependencies.serde]
version = "1.0.228"
features = ["derive"]
optional = true
default-features = false

[dependencies.serde_json]
version = "1.0.149"
features = ["preserve_order"]
optional = true
default-features = false

[dependencies.sha2]
version = "0.10.9"
optional = true
default-features = false

[dependencies.sha3]
version = "0.10.8"
optional = true
default-features = false

[dependencies.signature]
version = "2.2.0"
optional = true
default-features = false

[dependencies.strum]
version = "0.28.0"
features = [
    "derive",
    "phf",
]
optional = true
default-features = false

[dependencies.terrors]
version = "0.3.3"
optional = true

[dependencies.thiserror]
version = "2.0.18"
default-features = false

[dependencies.tokio-util]
version = "0.7.15"
features = ["codec"]
optional = true
default-features = false

[dependencies.zeroize]
version = "1.8.2"
features = ["derive"]
optional = true
default-features = false

[dev-dependencies.criterion]
version = "5.0.1"
features = ["cargo_bench_support"]
default-features = false
package = "codspeed-criterion-compat"

[dev-dependencies.proptest]
version = "1.10.0"

[dev-dependencies.rstest]
version = "0.26.1"

[dev-dependencies.tokio]
version = "1.49.0"
features = [
    "rt",
    "macros",
]
default-features = false

[target.'cfg(target_arch = "wasm32")'.dependencies.getrandom]
version = "0.2"
features = ["js"]
optional = true
default-features = false

[lints.clippy]
allow_attributes_without_reason = "deny"
as_conversions = "deny"
clone_on_ref_ptr = "deny"
dbg_macro = "deny"
disallowed_methods = "deny"
disallowed_types = "deny"
expect_used = "deny"
implicit_clone = "deny"
panic = "deny"
print_stderr = "deny"
print_stdout = "deny"
shadow_reuse = "deny"
shadow_same = "deny"
shadow_unrelated = "deny"
str_to_string = "deny"
todo = "deny"
unimplemented = "deny"
unwrap_used = "deny"

[lints.clippy.all]
level = "deny"
priority = -1

[lints.clippy.nursery]
level = "deny"
priority = -1

[lints.clippy.pedantic]
level = "deny"
priority = -1

[lints.rust]
dead_code = "deny"
missing_docs = "warn"
unreachable_pub = "deny"
unsafe_code = "deny"

[profile.release]
opt-level = 3
lto = true
codegen-units = 1
