[package]
name = "bext-realtime"
version.workspace = true
edition = "2021"
license.workspace = true
repository.workspace = true
homepage.workspace = true
authors.workspace = true
rust-version.workspace = true
description = "Realtime pub/sub for bext — WebSocket and SSE with optional Redis relay"
readme = "README.md"
keywords = ["bext", "realtime", "websocket", "sse", "pubsub"]
categories = ["network-programming", "asynchronous"]

[dependencies]
tokio = { version = "1", features = ["full"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
dashmap = "6"
parking_lot = "0.12"
tracing = "0.1"
anyhow = "1"
chrono = { version = "0.4", features = ["serde"] }
futures-core = "0.3"

# Redis relay (optional)
redis = { version = "0.27", features = ["tokio-comp", "connection-manager"], optional = true }

[features]
default = []
redis = ["dep:redis"]

[dev-dependencies]
tokio = { version = "1", features = ["full", "test-util"] }
tempfile = "3"
