[package]
name = "hwhkit"
version.workspace = true
edition.workspace = true
authors.workspace = true
description = "一个用于快速构建 Web 服务的 Rust 工具库"
license.workspace = true
repository.workspace = true
homepage.workspace = true
readme = "README.md"
keywords = ["web", "framework", "axum", "middleware", "builder"]
categories = ["web-programming", "web-programming::http-server"]

[dependencies]
axum.workspace = true
tokio.workspace = true
serde.workspace = true
serde_json.workspace = true
toml.workspace = true
tower.workspace = true
tower-http.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
thiserror.workspace = true
anyhow.workspace = true
tera = { version = "1.19", optional = true }
jsonwebtoken = { version = "9.2", optional = true }
chrono = { version = "0.4", features = ["serde"], optional = true }
tempfile = { version = "3.8", optional = true }

hwhkit-config = { version = "0.2.0-alpha.2", path = "../hwhkit-config", optional = true }
hwhkit-core = { version = "0.2.0-alpha.2", path = "../hwhkit-core", optional = true }
hwhkit-observability = { version = "0.2.0-alpha.2", path = "../hwhkit-observability", optional = true }
hwhkit-transport = { version = "0.2.0-alpha.2", path = "../hwhkit-transport", optional = true }
hwhkit-macros = { version = "0.2.0-alpha.2", path = "../hwhkit-macros", optional = true }
hwhkit-integration-postgres = { version = "0.2.0-alpha.2", path = "../hwhkit-integration-postgres", optional = true }
hwhkit-integration-redis = { version = "0.2.0-alpha.2", path = "../hwhkit-integration-redis", optional = true }
hwhkit-integration-mongodb = { version = "0.2.0-alpha.2", path = "../hwhkit-integration-mongodb", optional = true }
hwhkit-integration-nats = { version = "0.2.0-alpha.2", path = "../hwhkit-integration-nats", optional = true }
hwhkit-integration-qdrant = { version = "0.2.0-alpha.2", path = "../hwhkit-integration-qdrant", optional = true }
hwhkit-integration-neo4j = { version = "0.2.0-alpha.2", path = "../hwhkit-integration-neo4j", optional = true }

[features]
default = []
templates = ["tera"]
jwt = ["jsonwebtoken", "chrono"]
testing = ["tempfile"]

config-v2 = ["dep:hwhkit-config", "dep:hwhkit-core", "dep:hwhkit-observability"]
transport-grpc = ["dep:hwhkit-transport", "hwhkit-transport/grpc"]
transport-ws = ["dep:hwhkit-transport", "hwhkit-transport/ws"]
transport-p2p = ["dep:hwhkit-transport", "hwhkit-transport/p2p"]
macros = ["dep:hwhkit-macros"]

postgres = ["dep:hwhkit-integration-postgres"]
redis = ["dep:hwhkit-integration-redis"]
mongodb = ["dep:hwhkit-integration-mongodb"]
nats = ["dep:hwhkit-integration-nats"]
qdrant = ["dep:hwhkit-integration-qdrant"]
neo4j = ["dep:hwhkit-integration-neo4j"]

full = ["templates", "jwt", "config-v2", "transport-grpc", "transport-ws", "postgres", "redis", "mongodb", "nats", "qdrant", "neo4j", "macros"]

[dev-dependencies]
tempfile = "3.8"
tokio-test = "0.4"
chrono = { version = "0.4", features = ["serde"] }
