[package]
name = "sentinel-common"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
rust-version.workspace = true
description = "Common utilities and types for Sentinel reverse proxy"
keywords = ["proxy", "reverse-proxy", "utilities"]
categories = ["network-programming"]

[dependencies]
# Async runtime (not WASM-compatible)
tokio = { workspace = true, features = ["sync"], optional = true }

# Logging and tracing
tracing = { workspace = true }
tracing-subscriber = { workspace = true, optional = true }
prometheus = { workspace = true, optional = true }

# Error handling
thiserror = { workspace = true }
anyhow = { workspace = true }

# Serialization
serde = { workspace = true }
serde_json = { workspace = true }

# HTTP
http = { workspace = true }

# Utilities
uuid = { workspace = true, optional = true }
chrono = { workspace = true }
parking_lot = { workspace = true }

# System metrics (not WASM-compatible)
sysinfo = { version = "0.38", optional = true }

[features]
default = ["runtime"]
# Runtime features - not available in WASM
runtime = ["tokio", "tracing-subscriber", "prometheus", "sysinfo", "uuid"]

[dev-dependencies]
criterion = { workspace = true }
proptest = { workspace = true }
insta = { workspace = true }
