# 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"
name = "lean-ctx"
version = "2.21.2"
build = "build.rs"
exclude = [
    "examples/",
    "tests/",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Context Intelligence Engine with CCP. 28 MCP tools, 90+ compression patterns, cross-session memory (CCP), persistent AI knowledge with temporal facts + contradiction detection, multi-agent context sharing + diaries, LITM-aware positioning, AAAK compact format. Supports 24 AI tools. Reduces LLM token consumption by up to 99%."
homepage = "https://leanctx.com"
readme = "README.md"
keywords = [
    "mcp",
    "llm",
    "tokens",
    "compression",
    "ai",
]
categories = [
    "command-line-utilities",
    "development-tools",
]
license = "MIT"
repository = "https://github.com/yvgude/lean-ctx"

[features]
default = ["tree-sitter"]
neural = [
    "dep:rten",
    "dep:rten-tensor",
]
tree-sitter = [
    "dep:tree-sitter",
    "dep:tree-sitter-rust",
    "dep:tree-sitter-typescript",
    "dep:tree-sitter-javascript",
    "dep:tree-sitter-python",
    "dep:tree-sitter-go",
    "dep:tree-sitter-java",
    "dep:tree-sitter-c",
    "dep:tree-sitter-cpp",
    "dep:tree-sitter-ruby",
    "dep:tree-sitter-c-sharp",
    "dep:tree-sitter-kotlin-ng",
    "dep:tree-sitter-swift",
    "dep:tree-sitter-php",
    "dep:tree-sitter-bash",
    "dep:tree-sitter-dart",
    "dep:tree-sitter-scala",
    "dep:tree-sitter-elixir",
    "dep:tree-sitter-zig",
]

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

[[bin]]
name = "lean-ctx"
path = "src/main.rs"

[dependencies.anyhow]
version = "1"

[dependencies.chrono]
version = "0.4"
features = ["serde"]

[dependencies.dirs]
version = "5"

[dependencies.flate2]
version = "1"

[dependencies.futures]
version = "0.3"

[dependencies.glob]
version = "0.3.3"

[dependencies.ignore]
version = "0.4"

[dependencies.md-5]
version = "0.10"

[dependencies.regex]
version = "1"

[dependencies.rmcp]
version = "1"
features = [
    "server",
    "transport-io",
]

[dependencies.rten]
version = "0.24"
optional = true

[dependencies.rten-tensor]
version = "0.24"
optional = true

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

[dependencies.serde_json]
version = "1"

[dependencies.similar]
version = "2"

[dependencies.tar]
version = "0.4.45"

[dependencies.thiserror]
version = "2"

[dependencies.tiktoken-rs]
version = "0.6"

[dependencies.tokio]
version = "1"
features = [
    "rt",
    "rt-multi-thread",
    "macros",
    "io-std",
    "io-util",
    "net",
    "sync",
    "time",
]

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

[dependencies.toml]
version = "0.8"

[dependencies.tracing]
version = "0.1"

[dependencies.tracing-subscriber]
version = "0.3"
features = ["env-filter"]

[dependencies.tree-sitter]
version = "0.26"
optional = true

[dependencies.tree-sitter-bash]
version = "0.25"
optional = true

[dependencies.tree-sitter-c]
version = "0.24"
optional = true

[dependencies.tree-sitter-c-sharp]
version = "0.23"
optional = true

[dependencies.tree-sitter-cpp]
version = "0.23"
optional = true

[dependencies.tree-sitter-dart]
version = "0.1"
optional = true

[dependencies.tree-sitter-elixir]
version = "0.3"
optional = true

[dependencies.tree-sitter-go]
version = "0.25"
optional = true

[dependencies.tree-sitter-java]
version = "0.23"
optional = true

[dependencies.tree-sitter-javascript]
version = "0.25"
optional = true

[dependencies.tree-sitter-kotlin-ng]
version = "1.1"
optional = true

[dependencies.tree-sitter-php]
version = "0.24"
optional = true

[dependencies.tree-sitter-python]
version = "0.25"
optional = true

[dependencies.tree-sitter-ruby]
version = "0.23"
optional = true

[dependencies.tree-sitter-rust]
version = "0.24"
optional = true

[dependencies.tree-sitter-scala]
version = "0.25"
optional = true

[dependencies.tree-sitter-swift]
version = "0.7"
optional = true

[dependencies.tree-sitter-typescript]
version = "0.23"
optional = true

[dependencies.tree-sitter-zig]
version = "1.1"
optional = true

[dependencies.ureq]
version = "3.3.0"

[dependencies.walkdir]
version = "2"

[dependencies.zip]
version = "8.4.0"

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

[profile.release]
opt-level = "z"
lto = true
codegen-units = 1
panic = "abort"
strip = true
