[package]
name = "rag-rat-core"
version = "0.4.0"
description = "Repository evidence engine for source chunks, symbols, graph edges, Git history, GitHub rationale, and source-bound memories."
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
readme = "../../README.md"
keywords.workspace = true
categories.workspace = true

[dependencies]
anyhow.workspace = true
fastembed = { workspace = true, optional = true }
gix.workspace = true
model2vec-rs = { version = "0.2.1", default-features = false, features = ["hf-hub", "fancy-regex"], optional = true }
notify = "8.2.0"
rayon.workspace = true
regex.workspace = true
rusqlite.workspace = true
serde.workspace = true
serde_json.workspace = true
sha2.workspace = true
thiserror.workspace = true
toml.workspace = true
tree-sitter.workspace = true
tree-sitter-c.workspace = true
tree-sitter-cpp.workspace = true
tree-sitter-kotlin.workspace = true
tree-sitter-rust.workspace = true
tree-sitter-typescript.workspace = true

[target.'cfg(unix)'.dependencies]
libc.workspace = true

[features]
default = ["fastembed", "model2vec"]
fastembed = ["dep:fastembed"]
model2vec = ["dep:model2vec-rs"]

[dev-dependencies]
# Instruction-count benchmarking (deterministic, CI-noise-immune). Needs the matching
# `iai-callgrind-runner` binary on PATH + valgrind installed. See benches/rag_pipeline.rs.
iai-callgrind = "0.16"
# Wall-clock benchmarking (full-index time on a larger corpus). default-features off to skip the
# plotting deps — Bencher parses criterion's stdout estimates.
criterion = { version = "0.5", default-features = false }

# iai-callgrind: deterministic instruction counts (index + cold/warm query).
[[bench]]
name = "rag_pipeline"
harness = false

# criterion: wall-clock full-index time.
[[bench]]
name = "index_time"
harness = false
