[package]
name = "sochdb-grpc"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
documentation.workspace = true
keywords.workspace = true
categories.workspace = true
rust-version.workspace = true
description = "SochDB gRPC services for cross-language clients (Thick Server / Thin Client architecture)"
readme = "README.md"

[features]
# Opt-in async bridge module (blocking_pool::async_bridge). tokio is always a
# hard dependency of this crate; this feature gates the not-yet-wired ergonomic
# future-returning wrappers so the cfg is recognized rather than a phantom gate.
default = []
async = []

[dependencies]
sochdb-index = { version = "2.0.6", path = "../sochdb-index" }
sochdb-core = { version = "2.0.6", path = "../sochdb-core", features = ["analytics"] }
sochdb-kernel = { version = "2.0.6", path = "../sochdb-kernel" }
sochdb-storage = { version = "2.0.6", path = "../sochdb-storage" }
# Real SQL engine for the PostgreSQL wire protocol (DatabasePgExecutor).
sochdb-query = { version = "2.0.6", path = "../sochdb-query" }
sochdb-memory = { version = "2.0.6", path = "../sochdb-memory" }
sochdb-vector = { version = "2.0.6", path = "../sochdb-vector" }

# gRPC / Protocol Buffers
tonic = { version = "0.13", features = ["tls-ring", "transport"] }
tonic-health = "0.13"
prost = "0.13"

# TLS / mTLS (using rustls via tonic's built-in TLS)
rustls-pemfile = "2.2"

# Async runtime - gRPC server requires tokio
tokio = { version = "1.35", features = ["rt-multi-thread", "signal", "macros", "sync", "time"] }
tokio-stream = "0.1"

# Utilities
tracing = { workspace = true }
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
dashmap = { workspace = true }
parking_lot = { workspace = true }
thiserror = { workspace = true }
clap = { version = "4.5", features = ["derive", "env"] }
crossbeam-channel = { workspace = true }
num_cpus = { workspace = true }
rayon = "1.10"

# Additional dependencies for services
serde = { workspace = true }
serde_json = { workspace = true }
regex = "1.10"
uuid = { version = "1.0", features = ["v4"] }
base64 = "0.22"

# Cryptography / Auth (P0 security audit)
ring = { workspace = true }
jsonwebtoken = { workspace = true }
argon2 = { workspace = true }
sha2 = { workspace = true }
hmac = { workspace = true }
hex = { workspace = true }
rand = { workspace = true }

# Prometheus metrics HTTP endpoint (Task 8)
prometheus = "0.13"
lazy_static = "1.4"
tiny_http = "0.12"

# WebSocket gateway (Task 4)
tokio-tungstenite = "0.24"
futures-util = "0.3"

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

[[bin]]
name = "sochdb-grpc-server"
path = "src/main.rs"
