[package]
name = "rstmdb"
version = "0.2.0"
edition = "2021"
license = "BUSL-1.1"
description = "A state machine database with WAL durability"
readme = "README.md"
homepage = "https://github.com/rstmdb/rstmdb"
repository = "https://github.com/rstmdb/rstmdb"
keywords = ["state-machine", "database", "wal", "event-sourcing"]
categories = ["database", "data-structures"]

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

# Debian package configuration
[package.metadata.deb]
maintainer = "rstmdb maintainers"
copyright = "2026, rstmdb authors. Licensed under BSL-1.1"
extended-description = """\
rstmdb is a state machine database with Write-Ahead Log (WAL) durability. \
It provides a TCP-based command protocol (RCP) for managing versioned state \
machine definitions, creating instances, and applying events with guard conditions."""
section = "database"
priority = "optional"
assets = [
    ["target/release/rstmdb", "usr/bin/", "755"],
    ["target/release/rstmdb-cli", "usr/bin/", "755"],
]
conf-files = []

# RPM package configuration
[package.metadata.generate-rpm]
assets = [
    { source = "target/release/rstmdb", dest = "/usr/bin/rstmdb", mode = "0755" },
    { source = "target/release/rstmdb-cli", dest = "/usr/bin/rstmdb-cli", mode = "0755" },
]

[package.metadata.generate-rpm.requires]
# No runtime dependencies

[dependencies]
rstmdb-core.workspace = true
rstmdb-server.workspace = true
rstmdb-storage.workspace = true
rstmdb-wal.workspace = true
tokio.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true

[workspace]
resolver = "2"
members = [
    "rstmdb-protocol",
    "rstmdb-wal",
    "rstmdb-core",
    "rstmdb-storage",
    "rstmdb-server",
    "rstmdb-client",
    "rstmdb-cli",
    "rstmdb-bench",
]

[workspace.package]
version = "0.2.0"
edition = "2021"
repository = "https://github.com/rstmdb/rstmdb"

[workspace.dependencies]
# Internal crates
rstmdb-protocol = { version = "0.2.0", path = "rstmdb-protocol" }
rstmdb-wal = { version = "0.2.0", path = "rstmdb-wal" }
rstmdb-core = { version = "0.2.0", path = "rstmdb-core" }
rstmdb-storage = { version = "0.2.0", path = "rstmdb-storage" }
rstmdb-server = { version = "0.2.0", path = "rstmdb-server" }
rstmdb-client = { version = "0.2.0", path = "rstmdb-client" }
rstmdb-cli = { version = "0.2.0", path = "rstmdb-cli" }

# Async runtime
tokio = { version = "1.36", features = ["full"] }

# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9"

# Error handling
thiserror = "1.0"

# Checksums
crc32c = "0.6"

# Cryptography
sha2 = "0.10"
hex = "0.4"

# TLS
rustls = "0.23"
tokio-rustls = "0.26"
rustls-pemfile = "2.1"
webpki-roots = "0.26"
pin-project-lite = "0.2"

# Utilities
bytes = "1.5"
uuid = { version = "1.7", features = ["v4", "serde"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
parking_lot = "0.12"
dashmap = "5.5"
chrono = { version = "0.4", features = ["serde"] }

# CLI
clap = { version = "4.5", features = ["derive", "env"] }
rustyline = "12.0"
home = "=0.5.9"
colored = "2.1"

# Testing
proptest = "1.4"
tempfile = "3.10"
tokio-test = "0.4"
criterion = { version = "0.5", features = ["async_tokio"] }
