[package]
name = "symforge"
version = "8.2.0"
edition = "2024"
description = "SymForge — in-memory code intelligence MCP server for Claude Code, Codex, and Gemini CLI"
license-file = "LICENSE"
repository = "https://github.com/special-place-ai-heaven/symforge"

[lints.rust]
unsafe_code = "deny"
warnings = "deny"

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

[[bin]]
name = "symforge"
path = "src/main.rs"
required-features = ["server"]

[features]
default = ["server"]
# Full MCP server + CLI surface: daemon, sidecar, protocol server, watcher,
# analytics, version registry, and the heavy server-only deps (axum, rmcp, clap,
# reqwest, socket2, notify, tracing-subscriber).
server = [
    "dep:rmcp",
    "dep:axum",
    "dep:clap",
    "dep:reqwest",
    "dep:socket2",
    "dep:notify",
    "dep:notify-debouncer-full",
    "dep:tracing-subscriber",
]
# Engine-only build for library embedders (e.g. AAP): parsing + live_index +
# query + git, exposed via the `symforge::embed` facade. Compiles NONE of the
# daemon/sidecar/protocol-server/CLI surface, so server-side breakage (unsafe
# syscalls, axum, rmcp, process signaling) structurally cannot reach an embedder.
embed = []

[dependencies]
aho-corasick = "1.1"
anyhow = "1.0"
arc-swap = "1"
ast-grep-core = "0.43"
automod = "1"
sha2 = "0.11"
parking_lot = "0.12"
rayon = "1.10"
schemars = "1"
# REVIEW P3-C (deferred): version requirement is "1.1.0" but the lockfile
# resolves >=1.7 (the `allowed_hosts` DNS-rebinding behavior depends on >=1.7
# APIs). Future fix: pin an exact/min version (or treat Cargo.lock as the source
# of truth) and add a minimum-version / deny check so a downgrade can't slip in.
rmcp = { version = "1.1.0", features = ["transport-io", "transport-streamable-http-server"], optional = true }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
# Maintained libyaml-lineage YAML backend. The previous `serde_yml 0.0.13` fork
# enforced a spec-strict flow-indent rule that mainstream parsers (PyYAML/libyaml,
# dtolnay serde-yaml) relax, hard-failing real production CI configs (SF-STRESS-016).
# `serde_yaml_ng` is the maintained continuation of dtolnay's serde-yaml and exposes
# the same `Value`/`Mapping`/`Sequence` API; aliased to `serde_yml` to keep call sites stable.
serde_yml = { package = "serde_yaml_ng", version = "0.10" }
toml_edit = "0.25"
thiserror = "2.0"
tokio = { version = "1.48", features = ["io-std", "macros", "rt-multi-thread", "time", "sync", "signal"] }
postcard = { version = "1.1", features = ["use-std"] }
axum = { version = "0.8", optional = true }
clap = { version = "4", features = ["derive"], optional = true }
chrono = "0.4"
dirs = "6"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"], optional = true }
tree-sitter = "=0.26.9"
streaming-iterator = "0.1"
tree-sitter-rust = "=0.24.2"
tree-sitter-python = "0.25"
tree-sitter-javascript = "0.25"
tree-sitter-typescript = "0.23.2"
tree-sitter-go = "0.25"
tree-sitter-java = "0.23.5"
tree-sitter-c = "0.24.1"
tree-sitter-cpp = "0.23.4"
tree-sitter-c-sharp = "0.23.1"
tree-sitter-ruby = "0.23.1"
tree-sitter-php = "0.24.2"
tree-sitter-swift = "0.7.1"
tree-sitter-perl = "1.1.2"
tree-sitter-kotlin-sg = "0.4.0"
# 0.1.0+ is the nielsenko lineage (crates.io name taken over 2026-03):
# spec-native grammar, co-owned by the ast-grep author, adopted by ast-grep
# itself. Exact-pinned against pre-1.0 node-kind churn. Empirical basis in
# docs/dart-parser-investigation.md: 100% clean on 2,805 real Flutter files
# and all Dart 3.0-3.12 syntax; the abandoned 0.0.4 fails every Dart 3
# construct and the orchard crate fails 2.6% of the same corpus.
tree-sitter-dart = "=0.2.0"
tree-sitter-elixir = "0.3.5"
tree-sitter-html = "0.23.2"
tree-sitter-css = "0.25.0"
tree-sitter-scss = "1.0.0"
ignore = "0.4"
notify = { version = "8", optional = true }
notify-debouncer-full = { version = "0.7", optional = true }
regex = "1.11"
reqwest = { version = "0.13", default-features = false, features = ["json", "query", "rustls"], optional = true }
globset = "0.4"
git2 = { version = "0.21", default-features = false, features = ["vendored-libgit2"] }
rusqlite = { version = "0.40", features = ["bundled"] }
tempfile = "3"
libc = "0.2.183"
dunce = "1"
socket2 = { version = "0.6", optional = true }

[dev-dependencies]
tempfile = "3"
once_cell = "1"
postcard = { version = "1.1", features = ["use-std"] }
# Cross-platform mtime backdating for tee retention age-pruning tests.
filetime = "0.2"

[patch.crates-io]
# Upstream build.rs uses `-Wno-unused-parameter` which MSVC rejects.
# Patched copy uses `flag_if_supported` so the flag is silently skipped on MSVC.
tree-sitter-scss = { path = "vendor/tree-sitter-scss" }

[profile.release]
lto = true
codegen-units = 1
strip = true
