[package]
name = "cruster"
version.workspace = true
edition.workspace = true
license.workspace = true
authors.workspace = true
repository.workspace = true
homepage.workspace = true
keywords.workspace = true
categories.workspace = true
description = "A Rust framework for building distributed, stateful entity systems with durable workflows"
readme = "../../README.md"

[dependencies]
# Async
tokio = { workspace = true }
async-trait = { workspace = true }
tokio-stream = { version = "0.1", features = ["sync"] }
tokio-util = { version = "0.7" }
futures = "0.3"

# Serialization
serde = { workspace = true }
rmp-serde = "1"
serde_json = { workspace = true }

# gRPC
tonic = "0.12"
prost = "0.13"

# Errors
thiserror = { workspace = true }

# Hashing
hashring = "0.3"

# Concurrency
dashmap = "6"
parking_lot = "0.12"
arc-swap = "1"

# Metrics
prometheus = { workspace = true }

# Time
chrono = { workspace = true }
cron = "0.13"

# Tracing
tracing = { workspace = true }

# Macros
cruster-macros = { workspace = true }

# SQL storage (optional)
sqlx = { version = "0.7", features = ["runtime-tokio", "postgres", "tls-rustls", "migrate", "chrono"], optional = true }

# etcd storage (optional)
etcd-client = { version = "0.14", optional = true }

[features]
default = []
sql = ["dep:sqlx"]
etcd = ["dep:etcd-client"]

[build-dependencies]
tonic-build = "0.12"

[dev-dependencies]
proptest = { workspace = true }
trybuild = "1"
