# 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"
version = "1.9.3"
authors = ["Na'aman Hirschfeld <naaman@xberg.io>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Universal LLM API client — 142+ providers, streaming, tool calling. Rust-powered, type-safe, compiled."
homepage = "https://xberg.io"
readme = "README.md"
keywords = [
    "llm",
    "openai",
    "api-client",
    "ai",
    "xberg",
]
categories = [
    "api-bindings",
    "web-programming::http-client",
]
license = "MIT"
repository = "https://github.com/xberg-io/liter-llm"
resolver = "2"

[package.metadata.cargo-machete]
ignored = [
    "dashmap",
    "tower-http",
]

[features]
azure-auth = ["native-http"]
bedrock = [
    "native-http",
    "dep:aws-credential-types",
    "dep:aws-sigv4",
]
bedrock-auth = ["native-http"]
copilot-auth = ["native-http"]
default = ["native-http"]
etcd-key-resolver = [
    "dep:etcd-client",
    "dep:hex",
    "dep:sha2",
]
full = [
    "native-http",
    "tower",
    "tracing",
    "otel",
    "bedrock",
    "tokenizer",
    "azure-auth",
    "copilot-auth",
    "vertex-auth",
    "vertex-adc",
    "bedrock-auth",
    "opendal-cache",
]
guardrail-cel = ["dep:cel-interpreter"]
http3 = ["native-http"]
lite = ["native-http"]
native-http = [
    "dep:reqwest",
    "reqwest/http2",
    "dep:rustls",
    "dep:tokio",
    "dep:tokio-util",
    "dep:memchr",
    "dep:gcp_auth",
]
opendal-cache = [
    "dep:opendal",
    "tower",
]
otel = [
    "tracing",
    "dep:tracing-opentelemetry",
    "dep:opentelemetry",
]
tokenizer = ["dep:tokenizers"]
tower = [
    "dep:tower",
    "dep:tower-http",
    "dep:futures-util",
    "tracing",
]
tracing = ["dep:tracing"]
vertex-adc = ["native-http"]
vertex-auth = [
    "native-http",
    "dep:jsonwebtoken",
]
wasm-http = [
    "dep:reqwest",
    "dep:memchr",
    "dep:gloo-timers",
    "dep:web-time",
]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[dependencies.ahash]
version = "0.8"

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

[dependencies.aws-credential-types]
version = "1"
optional = true

[dependencies.aws-sigv4]
version = "1"
features = [
    "sign-http",
    "http1",
]
optional = true

[dependencies.base64]
version = "0.22"

[dependencies.bytes]
version = "1"

[dependencies.cel-interpreter]
version = "0.10"
optional = true

[dependencies.dashmap]
version = "6"

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

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

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

[dependencies.gcp_auth]
version = "0.12"
features = ["ring"]
optional = true
default-features = false

[dependencies.gloo-timers]
version = "0.4"
features = ["futures"]
optional = true

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

[dependencies.jsonwebtoken]
version = "10"
features = ["use_pem"]
optional = true
default-features = false

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

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

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

[dependencies.pin-project-lite]
version = "0.2"

[dependencies.regex]
version = "1"

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

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

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

[dependencies.serde_json]
version = "1"

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

[dependencies.thiserror]
version = "2"

[dependencies.tokenizers]
version = "0.23"
features = [
    "http",
    "fancy-regex",
]
optional = true
default-features = false

[dependencies.tokio]
version = "1"
features = [
    "full",
    "time",
    "rt",
    "macros",
]
optional = true

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

[dependencies.toml]
version = "1.1"

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

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

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

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

[dependencies.url]
version = "2.5"

[dependencies.web-time]
version = "1"
optional = true

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

[dev-dependencies.etcd-client]
version = "0.19"
default-features = false

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

[dev-dependencies.jsonschema]
version = "0.46"

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

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

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

[target.'cfg(not(target_os = "windows"))'.dependencies.reqwest]
version = "0.13"
features = [
    "json",
    "stream",
    "multipart",
    "form",
    "rustls-no-provider",
]
optional = true
default-features = false

[target.'cfg(not(target_os = "windows"))'.dependencies.rustls]
version = "0.23"
features = [
    "ring",
    "logging",
    "std",
    "tls12",
]
optional = true
default-features = false

[target.'cfg(target_os = "windows")'.dependencies.reqwest]
version = "0.13"
features = [
    "json",
    "stream",
    "multipart",
    "form",
    "native-tls",
]
optional = true
default-features = false

[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)"]
