# 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"
name = "liter-llm-proxy"
version = "1.9.0-rc.2"
authors = ["Na'aman Hirschfeld <naaman@xberg.io>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "OpenAI-compatible LLM proxy server — model routing, virtual keys, rate limiting, cost tracking."
homepage = "https://xberg.io"
readme = false
keywords = [
    "llm",
    "proxy",
    "openai",
    "gateway",
    "xberg",
]
license = "MIT"
repository = "https://github.com/xberg-io/liter-llm"
resolver = "2"

[package.metadata.cargo-machete]
ignored = [
    "opentelemetry",
    "tracing-opentelemetry",
    "notify",
    "tracing-test",
]

[features]
default = ["proxy"]
etcd-watch = ["dep:etcd-client"]
full = [
    "otel",
    "opendal-cache",
    "proxy",
    "secrets-aws",
    "secrets-vault",
    "etcd-watch",
]
opendal-cache = ["liter-llm/opendal-cache"]
otel = [
    "liter-llm/otel",
    "dep:opentelemetry",
    "dep:tracing-opentelemetry",
]
proxy = []
secrets-aws = [
    "dep:aws-config",
    "dep:aws-sdk-secretsmanager",
]
secrets-vault = [
    "dep:vaultrs",
    "dep:chrono",
]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[dependencies.aws-config]
version = "1"
features = ["rustls"]
optional = true
default-features = false

[dependencies.aws-sdk-secretsmanager]
version = "1"
features = ["rustls"]
optional = true
default-features = false

[dependencies.axum]
version = "0.8"
features = [
    "macros",
    "ws",
]

[dependencies.base64]
version = "0.22"

[dependencies.bytes]
version = "1"

[dependencies.chrono]
version = "0.4"
features = ["std"]
optional = true
default-features = false

[dependencies.dashmap]
version = "6"

[dependencies.etcd-client]
version = "0.15"
optional = true
default-features = false

[dependencies.futures-util]
version = "0.3"

[dependencies.http]
version = "1"

[dependencies.liter-llm]
version = "1.9.0-rc.2"
features = [
    "native-http",
    "tower",
    "tracing",
]

[dependencies.notify]
version = "8"
features = ["macos_kqueue"]

[dependencies.opendal]
version = "0.57"
features = [
    "services-memory",
    "services-redis",
    "services-fs",
    "services-s3",
]
default-features = false

[dependencies.opentelemetry]
version = "0.32"
features = ["metrics"]
optional = true

[dependencies.rmcp]
version = "1.7"
features = [
    "server",
    "macros",
    "transport-io",
    "transport-streamable-http-server",
    "server-side-http",
]

[dependencies.rust_decimal]
version = "1"
features = ["serde"]

[dependencies.schemars]
version = "1"

[dependencies.secrecy]
version = "0.10"
features = ["serde"]

[dependencies.serde]
version = "1"
features = ["derive"]

[dependencies.serde_json]
version = "1"

[dependencies.subtle]
version = "2.6"

[dependencies.thiserror]
version = "2"

[dependencies.tokio]
version = "1"
features = ["full"]

[dependencies.tokio-tungstenite]
version = "0.26"
features = [
    "connect",
    "handshake",
    "rustls-tls-native-roots",
]
default-features = false

[dependencies.tokio-util]
version = "0.7"
features = ["rt"]

[dependencies.toml]
version = "1.1"

[dependencies.tower]
version = "0.5"
features = [
    "retry",
    "limit",
    "timeout",
    "buffer",
    "load-shed",
    "steer",
    "util",
    "discover",
    "ready-cache",
]

[dependencies.tower-http]
version = "0.6"
features = [
    "follow-redirect",
    "set-header",
    "sensitive-headers",
    "trace",
    "request-id",
    "cors",
    "compression-gzip",
    "catch-panic",
    "limit",
]

[dependencies.tracing]
version = "0.1"

[dependencies.tracing-opentelemetry]
version = "0.33"
optional = true

[dependencies.url]
version = "2.5"

[dependencies.utoipa]
version = "5.5"
features = ["axum_extras"]

[dependencies.vaultrs]
version = "0.8"
features = ["rustls"]
optional = true
default-features = false

[dev-dependencies.ctor]
version = "1.0"

[dev-dependencies.http-body-util]
version = "0.1"

[dev-dependencies.reqwest]
version = "0.13"
features = [
    "json",
    "stream",
    "multipart",
    "form",
]
default-features = false

[dev-dependencies.tempfile]
version = "3"

[dev-dependencies.tokio]
version = "1"
features = [
    "full",
    "test-util",
]

[dev-dependencies.tracing-test]
version = "0.2"

[dev-dependencies.wiremock]
version = "0.6"

[lints.clippy]
missing-errors-doc = "allow"
missing-panics-doc = "allow"
module-name-repetitions = "allow"
needless-pass-by-value = "allow"
unused-unit = "allow"

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

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

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

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

[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = ["cfg(alef)"]
