[workspace]
members = [
    "crates/flaredb-types",
    "crates/flaredb-proto",
    "crates/flaredb-storage",
    "crates/flaredb-raft",
    "crates/flaredb-server",
    "crates/flaredb-pd",
    "crates/flaredb-client",
    "crates/flaredb-cli", "crates/flaredb-sql",
]
resolver = "2"

[workspace.package]
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
rust-version = "1.75"

[workspace.dependencies]
# Async runtime
tokio = { version = "1.40", features = ["full"] }
tokio-stream = "0.1"
futures = "0.3"
async-trait = "0.1"

# Distributed Consensus
openraft = { version = "0.9", features = ["serde", "storage-v2"] }

# Storage
rocksdb = { version = "0.24", default-features = false, features = ["multi-threaded-cf", "zstd", "lz4", "snappy"] }

# gRPC
tonic = { version = "0.12", features = ["tls", "tls-roots"] }
tonic-build = "0.12"
tonic-health = "0.12"
prost = "0.13"
prost-types = "0.13"

# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
bincode = "1.3"

# Logging & Tracing
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

# Metrics
metrics = "0.23"
metrics-exporter-prometheus = "0.15"

# Error handling
thiserror = "1.0"
anyhow = "1.0"

# CLI
clap = { version = "4.5", features = ["derive"] }
toml = "0.8"
config = { version = "0.13", features = ["toml", "yaml"] } # Explicitly add config-rs with toml and env features

# Utilities
sha2 = "0.10"
bytes = "1.5"
sqlparser = "0.39"

# Testing
tempfile = "3"
criterion = { version = "0.5", features = ["html_reports"] }

[profile.release]
lto = true
opt-level = 3
codegen-units = 1
