[package]
name = "tidaldb"
version = "0.1.0"
edition = "2024"
rust-version = "1.91"
description = "Embeddable database for personalized content ranking"
license = "MIT"

[features]
default = ["metrics"]
test-utils = ["dep:tempfile"]
metrics = []   # hand-rolled HTTP, no new crate deps

[dependencies]
base64 = "0.22"
blake3 = "1"
crossbeam = "0.8"
dashmap = "6"
fjall = "3"
lru = "0.12"
fs4 = "0.8"
rand = "0.9"
roaring = "0.10"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
thiserror = "2"
tantivy = "0.22"
tempfile = { version = "3", optional = true }
tracing = "0.1"
usearch = "2.24.0"

[dev-dependencies]
actix-web = "4"
axum = "0.8"
criterion = { version = "0.5", features = ["html_reports"] }
proptest = "1"
tempfile = "3"
tokio = { version = "1", features = ["macros", "rt-multi-thread", "signal"] }
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

[lints.rust]
unsafe_code = "forbid"

[lints.clippy]
all = { level = "deny", priority = -1 }
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
cast_possible_truncation = "allow"
module_name_repetitions = "allow"
unwrap_used = "deny"

[[example]]
name = "quickstart"

[[example]]
name = "axum_embedding"

[[example]]
name = "actix_embedding"

[[example]]
name = "cli_embedding"

[[test]]
name = "sandboxed_storage"
required-features = ["test-utils"]

[[test]]
name = "metrics_integration"
required-features = ["metrics"]

[[test]]
name = "m7_crash_property"
required-features = ["test-utils"]

[[test]]
name = "m7p2_load"
required-features = ["test-utils"]

[[test]]
name = "m7_uat"
required-features = ["test-utils"]

[[test]]
name = "tantivy_merge"

[[test]]
name = "backup"
required-features = ["test-utils"]

[[test]]
name = "m7p3_social_scale"

[[test]]
name = "m8p2_replication"

[[test]]
name = "m8p3_crdt"

[[test]]
name = "m8p4_session"

[[test]]
name = "m8p5_multitenancy"

[[test]]
name = "m8_uat"
required-features = ["test-utils"]

[[test]]
name = "vector_usearch"

[[bench]]
name = "signals"
harness = false

[[bench]]
name = "storage"
harness = false

[[bench]]
name = "vector"
harness = false

[[bench]]
name = "filters"
harness = false

[[bench]]
name = "ranking"
harness = false

[[bench]]
name = "diversity"
harness = false

[[bench]]
name = "query"
harness = false

[[bench]]
name = "session"
harness = false

[[bench]]
name = "text_index"
harness = false

[[bench]]
name = "fusion"
harness = false

[[bench]]
name = "search"
harness = false

[[bench]]
name = "social"
harness = false

[[bench]]
name = "recovery"
harness = false

[[bench]]
name = "scale"
harness = false

[[bench]]
name = "sort"
harness = false
