# 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 = "2021"
rust-version = "1.75"
name = "phantom-protocol"
version = "0.1.1"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Post-quantum-secure L4/L6 universal transport framework — hybrid X25519+ML-KEM-768 / Ed25519+ML-DSA-65, multi-path, UniFFI bindings"
documentation = "https://docs.rs/phantom-protocol"
readme = "README.md"
keywords = [
    "post-quantum",
    "transport",
    "cryptography",
    "networking",
    "ml-kem",
]
categories = [
    "network-programming",
    "cryptography",
    "no-std",
]
license = "Apache-2.0"
repository = "https://github.com/snaart/phantom_protocol"

[features]
bindings = [
    "std",
    "dep:uniffi",
]
compression-zstd = [
    "dep:zstd",
    "std",
]
default = [
    "compression-zstd",
    "std",
    "bindings",
]
embedded = [
    "dep:embedded-io-async",
    "dep:async-lock",
]
fips = [
    "std",
    "dep:aws-lc-rs",
]
no-std = []
std = [
    "dep:tokio",
    "dep:tokio-util",
    "dep:futures",
    "dep:async-trait",
    "dep:parking_lot",
    "dep:dashmap",
    "dep:arc-swap",
    "dep:env_logger",
    "dep:tracing",
    "dep:time",
    "dep:argon2",
    "dep:crossbeam-queue",
    "dep:crossbeam-utils",
    "dep:lz4_flex",
    "dep:base64",
    "dep:once_cell",
    "dep:anyhow",
    "dep:thiserror",
    "dep:rand",
    "dep:ring",
    "dep:x25519-dalek",
    "dep:ed25519-dalek",
    "dep:ml-kem",
    "dep:ml-dsa",
    "dep:log",
    "dep:hmac",
    "dep:borsh",
    "dep:hex",
    "dep:bitflags",
    "dep:zeroize",
    "dep:subtle",
    "dep:blake3",
    "dep:hkdf",
    "dep:sha2",
    "dep:getrandom",
    "dep:kcp-tokio",
    "dep:socket2",
    "bytes/std",
    "serde/std",
]
telemetry-otel = [
    "std",
    "dep:opentelemetry",
    "dep:opentelemetry_sdk",
    "dep:tracing-opentelemetry",
]
uniffi-cli = [
    "bindings",
    "uniffi/cli",
]
wasi-leg = [
    "std",
    "dep:wasi",
]

[lib]
name = "phantom_protocol"
crate-type = [
    "lib",
    "cdylib",
]
path = "src/lib.rs"

[[bin]]
name = "uniffi-bindgen"
path = "src/bin/uniffi-bindgen.rs"
required-features = ["uniffi-cli"]

[[example]]
name = "crypto_bench"
path = "examples/crypto_bench.rs"

[[example]]
name = "embedded_demo"
path = "examples/embedded_demo.rs"
required-features = ["embedded"]

[[example]]
name = "loopback_demo"
path = "examples/loopback_demo.rs"

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[[bench]]
name = "buffer_pool_bench"
path = "benches/buffer_pool_bench.rs"
harness = false

[[bench]]
name = "observability_bench"
path = "benches/observability_bench.rs"
harness = false

[[bench]]
name = "protocol_comparison"
path = "benches/protocol_comparison.rs"
harness = false

[[bench]]
name = "syn_flood_bench"
path = "benches/syn_flood_bench.rs"
harness = false

[[bench]]
name = "transport_bench"
path = "benches/transport_bench.rs"
harness = false

[dependencies.anyhow]
version = "1"
optional = true

[dependencies.arc-swap]
version = "1"
optional = true

[dependencies.argon2]
version = "0.5.3"
optional = true

[dependencies.async-lock]
version = ">=3, <3.5"
optional = true
default-features = false

[dependencies.async-trait]
version = "0.1"
optional = true

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

[dependencies.bitflags]
version = "2.13"
optional = true

[dependencies.blake3]
version = "1.5"
optional = true

[dependencies.borsh]
version = "=1.6.1"
features = ["derive"]
optional = true
default-features = false

[dependencies.bytes]
version = "1"
features = ["serde"]
default-features = false

[dependencies.crossbeam-queue]
version = "0.3.12"
optional = true

[dependencies.crossbeam-utils]
version = "0.8"
optional = true

[dependencies.dashmap]
version = "6.1.0"
optional = true

[dependencies.ed25519-dalek]
version = "2"
features = [
    "zeroize",
    "rand_core",
]
optional = true

[dependencies.embedded-io-async]
version = "0.6"
optional = true

[dependencies.env_logger]
version = "0.11"
optional = true

[dependencies.futures]
version = "0.3"
optional = true

[dependencies.getrandom]
version = "0.2"
optional = true

[dependencies.hex]
version = "0.4"
features = ["alloc"]
optional = true
default-features = false

[dependencies.hkdf]
version = "0.13"
optional = true

[dependencies.hmac]
version = "0.13"
optional = true

[dependencies.log]
version = "0.4"
optional = true

[dependencies.lz4_flex]
version = "0.13.1"
optional = true

[dependencies.ml-dsa]
version = "0.1.1"
optional = true

[dependencies.ml-kem]
version = "0.2"
features = ["deterministic"]
optional = true

[dependencies.once_cell]
version = "1.18"
optional = true

[dependencies.opentelemetry]
version = "0.32"
features = [
    "metrics",
    "trace",
]
optional = true
default-features = false

[dependencies.opentelemetry_sdk]
version = "0.32"
features = [
    "metrics",
    "trace",
    "rt-tokio",
]
optional = true
default-features = false

[dependencies.parking_lot]
version = "0.12"
optional = true

[dependencies.rand]
version = "0.8"
optional = true

[dependencies.ring]
version = "0.17"
optional = true

[dependencies.serde]
version = "1"
features = [
    "derive",
    "alloc",
]
default-features = false

[dependencies.sha2]
version = "0.11"
optional = true

[dependencies.subtle]
version = "2.5"
optional = true
default-features = false

[dependencies.thiserror]
version = "2"
optional = true

[dependencies.time]
version = "0.3"
optional = true

[dependencies.tokio]
version = "1.36"
features = [
    "sync",
    "macros",
    "rt",
    "time",
    "io-util",
]
optional = true
default-features = false

[dependencies.tokio-util]
version = "0.7"
features = ["codec"]
optional = true

[dependencies.tracing]
version = "0.1"
optional = true

[dependencies.tracing-opentelemetry]
version = "0.33"
features = ["tracing-log"]
optional = true
default-features = false

[dependencies.uniffi]
version = "0.31"
features = ["tokio"]
optional = true

[dependencies.x25519-dalek]
version = "2"
features = [
    "static_secrets",
    "zeroize",
]
optional = true

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

[dependencies.zstd]
version = "0.13"
optional = true

[dev-dependencies.blake3]
version = "1.5"

[dev-dependencies.criterion]
version = "0.5"
features = [
    "html_reports",
    "async_tokio",
]

[dev-dependencies.ed25519-dalek]
version = "2"
features = ["rand_core"]

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

[dev-dependencies.rand]
version = "0.8"

[dev-dependencies.serde_json]
version = "1"

[dev-dependencies.tokio-test]
version = "0.4"

[dev-dependencies.uniffi]
version = "0.31"
features = ["bindgen-tests"]

[build-dependencies.uniffi]
version = "0.31"
features = ["build"]

[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies.getrandom]
version = "0.2"
features = ["js"]

[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies.getrandom04]
version = "0.4"
features = ["wasm_js"]
package = "getrandom"

[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies.js-sys]
version = "0.3"

[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies.wasm-bindgen]
version = "0.2"

[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies.wasm-bindgen-futures]
version = "0.4"

[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies.web-sys]
version = "0.3"
features = [
    "BinaryType",
    "Blob",
    "CloseEvent",
    "console",
    "ErrorEvent",
    "Event",
    "MessageEvent",
    "WebSocket",
]

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.aws-lc-rs]
version = "1.17"
features = ["fips"]
optional = true
default-features = false

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.kcp-tokio]
version = "0.6"
optional = true

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.socket2]
version = "0.6"
optional = true

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio]
version = "1.36"
features = [
    "net",
    "rt-multi-thread",
    "signal",
    "process",
    "fs",
    "io-std",
]
optional = true

[target.'cfg(target_os = "linux")'.dependencies.libc]
version = "0.2"

[target.'cfg(target_os = "wasi")'.dependencies.wasi]
version = "0.14"
optional = true
