# 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.94"
name = "hyperi-rustlib"
version = "2.4.5"
build = "build.rs"
exclude = [
    ".claude/",
    ".github/",
    "ci/",
    "ai/",
    "docs/",
    "examples/",
    "benches/",
    "scripts/",
]
publish = true
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Opinionated Rust framework for high-throughput data pipelines at PB scale. Auto-wiring config, logging, metrics, tracing, health, and graceful shutdown — built from many years of production infrastructure experience."
readme = "README.md"
keywords = [
    "config",
    "logging",
    "metrics",
    "prometheus",
    "opentelemetry",
]
categories = ["development-tools"]
license = "FSL-1.1-ALv2"
repository = "https://github.com/hyperi-io/hyperi-rustlib"

[features]
cache = [
    "moka",
    "serde_json",
]
cli = [
    "clap",
    "tracing",
]
config = [
    "figment",
    "dotenvy",
    "serde_yaml_ng",
    "serde_json",
    "toml",
    "dirs",
    "tracing",
]
config-postgres = [
    "config",
    "sqlx",
    "tokio",
    "serde_json",
]
config-reload = [
    "config",
    "parking_lot",
    "tokio",
    "tracing",
]
database = ["serde_json"]
default = [
    "config",
    "logger",
    "metrics",
    "runtime",
    "shutdown",
    "health",
]
deployment = [
    "serde_yaml_ng",
    "serde_json",
]
directory-config = [
    "serde_yaml_ng",
    "tokio",
    "tracing",
    "fs4",
]
directory-config-git = [
    "directory-config",
    "git2",
]
dlq = [
    "io",
    "base64",
    "serde_json",
    "tokio",
    "async-trait",
    "tracing",
]
dlq-http = [
    "dlq",
    "reqwest",
]
dlq-kafka = [
    "dlq",
    "transport-kafka",
]
dlq-redis = [
    "dlq",
    "transport-redis",
]
expression = [
    "cel-interpreter",
    "serde_json",
]
full = [
    "config",
    "config-reload",
    "logger",
    "metrics",
    "metrics-dfe",
    "otel",
    "otel-metrics",
    "runtime",
    "shutdown",
    "health",
    "http",
    "http-server",
    "spool",
    "tiered-sink",
    "resilience",
    "database",
    "cache",
    "transport-all",
    "transport-grpc-vector-compat",
    "secrets-all",
    "directory-config",
    "directory-config-git",
    "deployment",
    "version-check",
    "scaling",
    "memory",
    "worker",
    "cli",
    "io",
    "dlq",
    "dlq-kafka",
    "dlq-http",
    "dlq-redis",
    "output-file",
    "expression",
]
health = []
http = [
    "reqwest",
    "reqwest-middleware",
    "reqwest-retry",
    "serde_json",
]
http-server = [
    "axum",
    "tower",
    "tower-http",
    "tokio",
]
io = [
    "file-rotate",
    "parking_lot",
    "chrono",
    "tracing",
]
logger = [
    "tracing",
    "tracing-subscriber",
    "owo-colors",
    "serde_json",
    "tracing-throttle",
]
memory = [
    "sysinfo",
    "tracing",
]
metrics = [
    "dep:metrics",
    "metrics-exporter-prometheus",
    "sysinfo",
    "tokio",
    "serde_json",
]
metrics-dfe = ["metrics"]
otel = [
    "opentelemetry",
    "opentelemetry_sdk",
    "opentelemetry-otlp",
    "tracing-opentelemetry",
    "tracing",
]
otel-metrics = [
    "otel",
    "dep:metrics",
    "metrics-util",
    "metrics-exporter-opentelemetry",
    "sysinfo",
    "tokio",
    "tracing",
]
otel-tracing = ["otel"]
output-file = [
    "io",
    "serde_json",
    "tracing",
]
resilience = [
    "tower-resilience",
    "tower",
]
runtime = ["dirs"]
scaling = [
    "parking_lot",
    "tracing",
]
secrets = [
    "tokio",
    "serde_json",
    "async-trait",
    "parking_lot",
    "base64",
    "dirs",
    "tracing",
]
secrets-all = [
    "secrets-vault",
    "secrets-aws",
]
secrets-aws = [
    "secrets",
    "aws-config",
    "aws-sdk-secretsmanager",
]
secrets-vault = [
    "secrets",
    "vaultrs",
]
shutdown = [
    "tokio",
    "tokio-util",
]
spool = [
    "yaque",
    "zstd",
]
tiered-sink = [
    "yaque",
    "zstd",
    "lz4_flex",
    "snap",
    "tokio",
    "tower-resilience",
    "libc",
]
top = [
    "cli",
    "ratatui",
]
transport = [
    "tokio",
    "serde_json",
    "rmp-serde",
    "chrono",
    "async-trait",
]
transport-all = [
    "transport-memory",
    "transport-kafka",
    "transport-grpc",
    "transport-file",
    "transport-pipe",
    "transport-http",
    "transport-redis",
]
transport-file = [
    "transport",
    "io",
]
transport-grpc = [
    "transport",
    "dep:tonic",
    "dep:tonic-prost",
    "dep:prost",
    "dep:prost-types",
    "dep:tonic-prost-build",
    "dep:prost-build",
]
transport-grpc-vector-compat = ["transport-grpc"]
transport-http = [
    "transport",
    "http",
]
transport-kafka = [
    "transport",
    "rdkafka",
    "regex",
    "tokio-util",
]
transport-memory = ["transport"]
transport-pipe = ["transport"]
transport-redis = [
    "transport",
    "redis",
]
version-check = [
    "reqwest",
    "tokio",
    "serde_json",
    "tracing",
    "uuid",
    "chrono",
]
worker = [
    "rayon",
    "config",
    "metrics",
    "tokio",
    "sysinfo",
    "parking_lot",
    "tracing",
    "sonic-rs",
    "dashmap",
    "bytes",
]
worker-msgpack = [
    "worker",
    "rmp-serde",
]

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

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

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

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

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

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

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

[dependencies.async-trait]
version = ">=0.1.88, <0.2"
optional = true

[dependencies.aws-config]
version = ">=1.8, <2"
optional = true

[dependencies.aws-sdk-secretsmanager]
version = ">=1.102, <2"
optional = true

[dependencies.axum]
version = ">=0.8.8, <0.9"
optional = true

[dependencies.base64]
version = ">=0.22, <0.23"
optional = true

[dependencies.bytes]
version = ">=1.10, <2"
optional = true

[dependencies.cel-interpreter]
version = ">=0.10.0, <0.11"
features = ["json"]
optional = true

[dependencies.chrono]
version = ">=0.4.43, <0.5"
optional = true

[dependencies.clap]
version = ">=4.5, <5"
features = [
    "derive",
    "env",
]
optional = true

[dependencies.dashmap]
version = ">=6.1, <7"
optional = true

[dependencies.dirs]
version = ">=6.0.0, <7"
optional = true

[dependencies.dotenvy]
version = ">=0.15.7, <0.16"
optional = true

[dependencies.figment]
version = ">=0.10.19, <0.11"
features = [
    "yaml",
    "toml",
    "json",
    "env",
]
optional = true

[dependencies.file-rotate]
version = ">=0.7, <0.9"
optional = true

[dependencies.fs4]
version = ">=0.12, <0.14"
features = ["sync"]
optional = true

[dependencies.git2]
version = ">=0.20.0, <0.21"
optional = true

[dependencies.libc]
version = ">=0.2, <0.3"
optional = true

[dependencies.lz4_flex]
version = ">=0.11, <0.14"
optional = true

[dependencies.metrics]
version = ">=0.24.3, <0.25"
optional = true

[dependencies.metrics-exporter-opentelemetry]
version = ">=0.2.1, <0.3"
optional = true

[dependencies.metrics-exporter-prometheus]
version = ">=0.16, <0.19"
optional = true

[dependencies.metrics-util]
version = ">=0.20.1, <0.21"
optional = true

[dependencies.moka]
version = ">=0.12, <0.13"
features = ["future"]
optional = true

[dependencies.opentelemetry]
version = ">=0.31.0, <0.32"
optional = true

[dependencies.opentelemetry-otlp]
version = ">=0.31.0, <0.32"
features = [
    "grpc-tonic",
    "http-proto",
    "metrics",
    "logs",
]
optional = true

[dependencies.opentelemetry_sdk]
version = ">=0.31.0, <0.32"
features = ["rt-tokio"]
optional = true

[dependencies.owo-colors]
version = ">=4.2.3, <5"
optional = true

[dependencies.parking_lot]
version = ">=0.12.3, <0.13"
optional = true

[dependencies.prost]
version = ">=0.14, <0.15"
optional = true

[dependencies.prost-types]
version = ">=0.14, <0.15"
optional = true

[dependencies.ratatui]
version = ">=0.29, <0.32"
optional = true

[dependencies.rayon]
version = ">=1.10, <2"
optional = true

[dependencies.rdkafka]
version = ">=0.39.0, <0.40"
features = ["dynamic-linking"]
optional = true

[dependencies.redis]
version = ">=1.0, <2"
features = [
    "tokio-comp",
    "streams",
]
optional = true

[dependencies.regex]
version = ">=1.11, <2"
optional = true

[dependencies.reqwest]
version = ">=0.12, <0.13"
features = ["json"]
optional = true

[dependencies.reqwest-middleware]
version = ">=0.4, <0.5"
optional = true

[dependencies.reqwest-retry]
version = ">=0.7, <0.8"
optional = true

[dependencies.rmp-serde]
version = ">=1.3.1, <2"
optional = true

[dependencies.serde]
version = ">=1.0.228, <2"
features = ["derive"]

[dependencies.serde_json]
version = ">=1.0.149, <2"
optional = true

[dependencies.serde_yaml_ng]
version = ">=0.10.0, <0.11"
optional = true

[dependencies.snap]
version = ">=1.1.1, <2"
optional = true

[dependencies.sonic-rs]
version = ">=0.5, <1"
optional = true

[dependencies.sqlx]
version = ">=0.8, <0.9"
features = [
    "runtime-tokio",
    "tls-rustls-ring-webpki",
    "postgres",
    "json",
]
optional = true

[dependencies.sysinfo]
version = ">=0.38.0, <0.39"
optional = true

[dependencies.thiserror]
version = ">=2.0.18, <3"

[dependencies.time]
version = ">=0.3.45, <0.4"
optional = true

[dependencies.tokio]
version = ">=1.50.0, <2"
features = [
    "rt-multi-thread",
    "net",
    "sync",
    "time",
    "macros",
    "signal",
    "fs",
    "io-std",
    "io-util",
]
optional = true

[dependencies.tokio-util]
version = ">=0.7.14, <0.8"
optional = true

[dependencies.toml]
version = ">=0.8, <2"
optional = true

[dependencies.tonic]
version = ">=0.14, <0.15"
features = ["gzip"]
optional = true

[dependencies.tonic-prost]
version = ">=0.14.5, <0.15"
optional = true

[dependencies.tower]
version = ">=0.5.3, <0.6"
optional = true

[dependencies.tower-http]
version = ">=0.6.8, <0.7"
features = [
    "timeout",
    "trace",
]
optional = true

[dependencies.tower-resilience]
version = ">=0.4.0, <0.10"
optional = true

[dependencies.tracing]
version = ">=0.1.44, <0.2"
optional = true

[dependencies.tracing-opentelemetry]
version = ">=0.32.1, <0.33"
optional = true

[dependencies.tracing-subscriber]
version = ">=0.3.22, <0.4"
features = [
    "json",
    "env-filter",
    "fmt",
    "time",
    "local-time",
]
optional = true

[dependencies.tracing-throttle]
version = ">=0.4.2, <0.5"
optional = true
default-features = false

[dependencies.uuid]
version = ">=1.10, <2"
features = ["v4"]
optional = true

[dependencies.vaultrs]
version = ">=0.7, <0.9"
optional = true

[dependencies.yaque]
version = ">=0.6.6, <0.7"
optional = true

[dependencies.zstd]
version = ">=0.13.3, <0.14"
optional = true

[dev-dependencies.async-trait]
version = ">=0.1.88, <0.2"

[dev-dependencies.criterion]
version = ">=0.5, <0.9"
features = ["html_reports"]

[dev-dependencies.git2]
version = ">=0.20.0, <0.21"

[dev-dependencies.pretty_assertions]
version = ">=1.4.1, <2"

[dev-dependencies.temp-env]
version = ">=0.3.6, <0.4"

[dev-dependencies.tempfile]
version = ">=3.24.0, <4"

[dev-dependencies.tokio]
version = ">=1.50.0, <2"
features = [
    "full",
    "test-util",
]

[build-dependencies.prost-build]
version = ">=0.14, <0.15"
optional = true

[build-dependencies.tonic-prost-build]
version = ">=0.14.5, <0.15"
optional = true

[lints.clippy]
await_holding_lock = "allow"
doc_markdown = "allow"
inefficient_to_string = "allow"
items_after_statements = "allow"
needless_raw_string_hashes = "allow"
redundant_closure = "allow"
redundant_closure_for_method_calls = "allow"
unnecessary_debug_formatting = "allow"
unwrap_used = "allow"

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

[lints.rust]
unsafe_code = "deny"
