# 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.92"
name = "llm-kernel"
version = "0.11.0"
build = false
exclude = [
    ".github/",
    "target/",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Foundation library for Rust AI-native apps — provider catalog, LLM client, MCP server, search, telemetry, and safety"
homepage = "https://github.com/epicsagas/llm-kernel"
documentation = "https://docs.rs/llm-kernel"
readme = "README.md"
keywords = [
    "llm",
    "ai",
    "mcp",
    "provider",
    "embedding",
]
categories = [
    "api-bindings",
    "asynchronous",
    "science",
]
license = "Apache-2.0"
repository = "https://github.com/epicsagas/llm-kernel"

[features]
cache = [
    "client-async",
    "store",
]
catalog-sync = [
    "provider",
    "discovery",
    "dep:clap",
]
client-async = [
    "dep:reqwest",
    "dep:serde_json",
    "dep:async-trait",
    "dep:tokio",
    "dep:tokio-stream",
    "dep:futures-core",
]
config = ["dep:toml"]
default = ["provider"]
discovery = [
    "provider",
    "dep:ureq",
]
discovery-async = [
    "discovery",
    "dep:reqwest",
    "dep:async-trait",
    "dep:tokio",
]
elastic = [
    "embedding",
    "dep:reqwest",
    "dep:serde_json",
]
embedding = ["dep:async-trait"]
embedding-fastembed = [
    "embedding",
    "dep:fastembed",
    "dep:indexmap",
]
embedding-fastembed-directml = [
    "embedding-fastembed",
    "dep:ort",
]
embedding-fastembed-nomic-moe = [
    "embedding-fastembed",
    "fastembed/nomic-v2-moe",
    "dep:candle-core",
]
embedding-fastembed-qwen3 = [
    "embedding-fastembed",
    "fastembed/qwen3",
    "dep:candle-core",
]
embedding-openai = [
    "embedding",
    "dep:ureq",
    "dep:serde_json",
]
eval = [
    "dep:clap",
    "tokens",
    "safety",
    "embedding",
    "search",
]
eval-full = [
    "eval",
    "graph",
]
federation = [
    "search",
    "embedding",
    "dep:tokio",
    "dep:futures-util",
]
full = [
    "provider",
    "discovery",
    "discovery-async",
    "client-async",
    "cache",
    "secrets",
    "store",
    "config",
    "graph",
    "graph-async",
    "graph-pool",
    "graph-cjk",
    "graph-pg",
    "graph-pg-tls",
    "mcp",
    "mcp-http",
    "tokens",
    "install",
    "search",
    "embedding",
    "embedding-openai",
    "embedding-fastembed",
    "embedding-fastembed-qwen3",
    "embedding-fastembed-nomic-moe",
    "vector-index",
    "qdrant",
    "elastic",
    "federation",
    "telemetry",
    "safety",
    "catalog-sync",
]
graph = [
    "store",
    "dep:serde_json",
]
graph-async = [
    "graph",
    "dep:tokio",
]
graph-cjk = ["graph"]
graph-pg = [
    "graph",
    "dep:postgres",
    "dep:clap",
]
graph-pg-tls = [
    "graph-pg",
    "dep:postgres-native-tls",
    "dep:native-tls",
]
graph-pool = [
    "graph",
    "dep:tokio",
]
install = ["dep:serde_json"]
mcp = [
    "dep:serde_json",
    "dep:async-trait",
]
mcp-http = [
    "mcp",
    "dep:axum",
    "dep:tokio",
    "dep:tokio-stream",
    "tokio/net",
    "tokio/io-util",
]
provider = ["dep:serde_json"]
qdrant = [
    "embedding",
    "dep:qdrant-client",
    "dep:serde_json",
]
safety = ["dep:regex"]
search = ["dep:serde_json"]
secrets = ["dep:tempfile"]
store = ["dep:rusqlite"]
telemetry = ["dep:serde_json"]
tokens = []
vector-index = [
    "embedding",
    "dep:turbovec",
    "dep:serde_json",
]

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

[[bin]]
name = "llm-kernel-eval"
path = "src/bin/eval.rs"
required-features = ["eval"]

[[bin]]
name = "llm-kernel-migrate-graph"
path = "src/bin/migrate.rs"
required-features = ["graph-pg"]

[[bin]]
name = "llm-kernel-sync-catalog"
path = "src/bin/sync-catalog.rs"
required-features = ["catalog-sync"]

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

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

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

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

[[bench]]
name = "compute_bench"
path = "benches/compute_bench.rs"
harness = false
required-features = [
    "search",
    "tokens",
    "embedding",
]

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

[dependencies.anyhow]
version = "1"

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

[dependencies.axum]
version = "0.8"
features = [
    "http1",
    "json",
    "tokio",
]
optional = true
default-features = false

[dependencies.candle-core]
version = "0.10"
optional = true

[dependencies.clap]
version = "4"
features = ["derive"]
optional = true

[dependencies.fastembed]
version = "5"
features = [
    "hf-hub-rustls-tls",
    "ort-download-binaries-rustls-tls",
]
optional = true
default-features = false

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

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

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

[dependencies.native-tls]
version = "0.2"
optional = true

[dependencies.ort]
version = "=2.0.0-rc.12"
optional = true
default-features = false

[dependencies.postgres]
version = "0.19"
optional = true

[dependencies.postgres-native-tls]
version = "0.5"
optional = true

[dependencies.qdrant-client]
version = "1"
optional = true

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

[dependencies.reqwest]
version = "0.13"
features = [
    "json",
    "rustls",
    "stream",
]
optional = true
default-features = false

[dependencies.rusqlite]
version = "0.40"
features = ["bundled"]
optional = true

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

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

[dependencies.tempfile]
version = "3"
optional = true

[dependencies.thiserror]
version = "2"

[dependencies.tokio]
version = "1"
features = [
    "rt-multi-thread",
    "macros",
    "sync",
    "time",
]
optional = true

[dependencies.tokio-stream]
version = "0.1"
optional = true

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

[dependencies.tracing]
version = "0.1"

[dependencies.turbovec]
version = "0.9"
optional = true

[dependencies.ureq]
version = "3"
features = ["json"]
optional = true

[dev-dependencies.criterion]
version = "0.8"
features = ["html_reports"]

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

[dev-dependencies.tokio]
version = "1"
features = [
    "macros",
    "rt",
    "rt-multi-thread",
]

[target.'cfg(any(target_os = "windows", target_os = "linux"))'.dependencies.fastembed]
version = "5"
features = [
    "hf-hub-rustls-tls",
    "ort-download-binaries-rustls-tls",
    "ort-load-dynamic",
]
optional = true
default-features = false

[profile.dev]
opt-level = 0
debug = 1

[profile.dist]
lto = "thin"
inherits = "release"

[profile.release]
opt-level = 3
lto = "thin"
codegen-units = 1
panic = "abort"
strip = "symbols"

[profile.release.package."*"]
opt-level = 3
codegen-units = 4
