[package]
name = "pubky-homeserver"
description = "Pubky core's homeserver."
version = "0.9.3"
edition.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
keywords = ["web", "dht", "dns", "decentralized", "identity"]
categories = [
    "network-programming",
    "cryptography",
    "web-programming",
    "authentication",
]

[dependencies]
anyhow.workspace = true
axum = { workspace = true, features = ["macros"] }
axum-extra = { version = "0.10.0", features = [
    "typed-header",
    "async-read-body",
] }
base32 = "0.5.1"
base64 = "0.22.1"
bytes = "^1.10.0"
clap = { workspace = true, features = ["derive"] }
flume = "0.11.1"
futures-lite = "2.6.1"
futures-util = "0.3.31"
hex = "0.4.3"
httpdate = "1.0.3"
pkarr = { workspace = true, features = ["default", "dht", "tls"] }
pubky-common = { path = "../pubky-common" , version = "0.9.3" }
serde = { version = "1.0.217", features = ["derive"] }
serde_json = "1"
tokio = { workspace = true, features = ["full"] }
toml = "0.8.20"
tower-cookies = "0.11.0"
tower-http = { workspace = true, features = ["cors", "trace"] }
tracing.workspace = true
tracing-subscriber = { workspace = true, features = ["env-filter"] }
url = { workspace = true, features = ["serde"] }
axum-server = { workspace = true, features = ["tls-rustls-no-provider"] }
tower = "0.5.2"
thiserror.workspace = true
dirs = "6.0.0"
hostname-validator = "1.1.1"
axum-test = "17.2.0"
tempfile = { version = "3.10.1" }
dyn-clone = "1.0.19"
reqwest = { workspace = true, features = [
    "rustls",
] }
governor = "0.10.0"
fast-glob = "0.4.5"
tokio-util = "0.7.15"
percent-encoding = "2.3.1"
serde_valid = "1.0.5"
opendal = { version = "0.54.0", features = ["services-fs"] }
infer = "0.19.0"
mime_guess = "2.0.5"
dav-server-opendalfs = "0.6.2"
dav-server = "0.8.0"
sea-query = { version = "0.32.6", features = ["with-chrono", "postgres-array"] }
sea-query-binder = { version = "0.7.0", features = [
    "with-chrono",
    "runtime-tokio",
    "sqlx-postgres",
    "postgres-array",
] }
sqlx = { version = "0.8.6", features = [
    "runtime-tokio",
    "postgres",
    "chrono",
    "tls-rustls",
    "json",
] }
dashmap = "6"
async-trait = "0.1"
async-dropper = { version = "0.3", features = ["tokio", "simple"] }
async-stream = "0.3"
uuid = { version = "1.7.0", features = ["v4"] }
pubky_test_utils = { path = "../test_utils/pubky_test", version = "0.1.0" }
opentelemetry = "0.29"
opentelemetry_sdk = { version = "0.29", features = ["rt-tokio", "metrics"] }
opentelemetry-prometheus = "0.29"
prometheus = "0.14"

[dev-dependencies]
temp-env = { version = "0.3.6", features = ["async_closure"] }


[features]
default = ["storage-gcs"]
# Optional storage types
storage-gcs = ["opendal/services-gcs"]
storage-memory = ["opendal/services-memory"]

# Optional testing methods
testing = ["storage-memory"]
