[package]
name = "chainfire-server"
version.workspace = true
edition.workspace = true
license.workspace = true
rust-version.workspace = true
description = "Chainfire distributed KVS server"

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

[[bin]]
name = "chainfire"
path = "src/main.rs"

[dependencies]
chainfire-types = { workspace = true }
chainfire-storage = { workspace = true }
chainfire-raft = { workspace = true, default-features = false, features = ["custom-raft"] }
chainfire-gossip = { workspace = true }
chainfire-watch = { workspace = true }
chainfire-api = { workspace = true }

# Async
tokio = { workspace = true }
futures = { workspace = true }
async-trait = { workspace = true }

# gRPC
tonic = { workspace = true }
tonic-health = { workspace = true }

# HTTP
axum = { workspace = true }
tower = { workspace = true }
tower-http = { workspace = true }
http = { workspace = true }
http-body-util = { workspace = true }

# REST API dependencies
uuid = { version = "1.11", features = ["v4", "serde"] }
chrono = { version = "0.4", features = ["serde"] }
serde_json = "1.0"
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }

# Configuration
clap.workspace = true
config.workspace = true
toml = { workspace = true }
serde = { workspace = true }

# Logging
tracing = { workspace = true }
tracing-subscriber = { workspace = true }

# Metrics
metrics = { workspace = true }
metrics-exporter-prometheus = { workspace = true }

# Utilities
anyhow = { workspace = true }

[dev-dependencies]
tempfile = { workspace = true }
chainfire-client = { workspace = true }
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "time"] }
criterion = { workspace = true }

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

[lints]
workspace = true
