[package]
name = "tici-search-lib"
edition = "2024"
version = "0.0.1"

[lib]
crate-type = ["staticlib", "rlib"]

[features]
bench = ["tici_shard/bench"]

[dependencies]
anyhow = { workspace = true }
async-channel = { workspace = true }
async-trait = { workspace = true }
cxx = "=1.0.138"
flexi_logger = { workspace = true }
futures = { workspace = true }
hex = { workspace = true }
lazy_static = { workspace = true }
log = { workspace = true }
mysql_async = { workspace = true }
num_cpus = { workspace = true }
parking_lot = { workspace = true }
prometheus = { workspace = true }
protobuf = { git = "https://github.com/pingcap/rust-protobuf", branch = "v2.8" }
rustls = { version = "0.23", features = ["aws-lc-rs"] }
scopeguard = { workspace = true }
serde = { workspace = true }
storage_backend = { workspace = true }
tantivy = { workspace = true }
tici_common = { workspace = true }
tici_grpc = { workspace = true }
tici_shard = { path = "../tici_shard", default-features = false }
tici_system = { workspace = true }
tipb = { workspace = true }
tokio = { workspace = true }
tokio-util = { workspace = true }
toml = { workspace = true }
tonic = { workspace = true }

[build-dependencies]
cxx-build = "=1.0.138"

[dev-dependencies]
criterion = { workspace = true }
log = { workspace = true }
tantivy = { workspace = true }
tempfile = { workspace = true }
# enable testexport for searchlib unit tests only
tici_shard = { path = "../tici_shard", default-features = false, features = [
    "testexport",
] }
tici_system = { workspace = true }
tokio = { workspace = true }

[[bench]]
name = "bench_search_shard_reader"
harness = false
required-features = ["bench"]

[lints.clippy]
expect_used = "deny"
unwrap_used = "deny"
