[workspace]
members = ["ffi", "star"]
[package]
name = "hydrant"
version = "0.1.0"
edition = "2024"
[features]
default = ["indexer", "indexer_stream", "alloc-jemalloc"]
alloc-mimalloc = ["dep:mimalloc"]
alloc-jemalloc = ["dep:tikv-jemallocator"]
alloc-snmalloc = ["dep:snmalloc-rs"]
__persist_sync_all = []
backlinks = []
relay = []
indexer = []
indexer_stream = ["indexer", "dep:zstd", "dep:dasl-star"]
jetstream = ["dep:zstd"]
user-keyspace = []
firehose-diagnostics = []
[dependencies]
tokio = { version = "1.0", features = ["full"] }
tokio-util = { version = "0.7", features = ["io"] }
socket2 = "0.6"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
miette = { version = "7", features = ["fancy"] }
serde = { version = "1.0", features = ["derive", "rc"] }
serde_bytes = "0.11"
serde_json = "1.0"
rmp-serde = { git = "https://github.com/90-008/msgpack-rust.git", rev = "19c54a922301d06310a816c3a6a097aeb73ea3ae" }
fjall = { git = "https://github.com/90-008/fjall.git", rev = "67604fb3f7454b9e9e4ec9501a5f555c611a8a19", features = ["lz4", "zstd"], version = "3.1.2" }
lsm-tree = { git = "https://github.com/90-008/lsm-tree.git", features = ["lz4", "zstd"] }
serde_ipld_dagcbor = "0.6"
serde_html_form = "0.4"
zstd = { version = "0.13", optional = true }
dasl-star = { path = "star", optional = true }
bytes = { version = "1.11.1", features = ["serde"] }
url = { version = "2.5", features = ["serde"] }
ipnet = "2.12.0"
smol_str = "0.3"
futures = "0.3"
reqwest = { version = "0.13.0", default-features = false, features = [
"json", "query", "rustls", "stream", "http2", "charset", "system-proxy",
"gzip", "brotli", "deflate", "zstd",
] }
axum = { version = "0.8.8", features = ["macros"] }
tower-http = { version = "0.6.6", features = ["cors", "fs", "trace"] }
jacquard-common = { git = "https://tangled.org/nonbinary.computer/jacquard", rev = "9046f2822f4685217300c4a03551b4484fcbc31d", default-features = false, features = ["std", "crypto"] }
hickory-resolver = { version = "0.26.2", features = ["system-config", "tokio"], default-features = false }
chrono = { version = "0.4.43", features = ["serde"] }
mimalloc = { version = "0.1", features = ["v3"], optional = true }
tikv-jemallocator = { version = "0.6", optional = true }
snmalloc-rs = { version = "0.3", optional = true }
scc = "3.6.6"
data-encoding = "2.10.0"
cid = "0.11.1"
thiserror = "2.0.18"
rand = "0.10.0"
arc-swap = "1.8.2"
rustls = { version = "0.23", features = ["aws-lc-rs"] }
tokio-websockets = { version = "0.13.2", default-features = false, features = ["client", "server", "rustls-native-roots", "aws_lc_rs", "rand"] }
multibase = "0.9.2"
# asm gates the armv8 sha2 instructions; without it aarch64 hashes in software
sha2 = { version = "0.10.9", features = ["asm"] }
parking_lot = { version = "0.12.5", features = ["arc_lock"] }
hyper = "1.8.1"
hyper-util = { version = "0.1", features = ["tokio"] }
http = "1"
aws-lc-rs = { version = "1", default-features = false }
ahash = "0.8.12"
# statvfs for the free-disk check before a backfill spills, already in the tree through tokio
libc = "0.2"
k256 = { version = "0.13", features = ["ecdsa"] }
p256 = { version = "0.13", features = ["ecdsa"] }
[dev-dependencies]
tempfile = "3.26.0"
criterion = { version = "0.8", default-features = false, features = ["cargo_bench_support"] }
syn = { version = "2", features = ["full", "visit"] }
[[bin]]
name = "replay_bench"
path = "src/bin/replay_bench.rs"
required-features = ["indexer_stream"]
[[bench]]
name = "repo"
harness = false
[[bench]]
name = "alloc"
harness = false
[[example]]
name = "statusphere"
required-features = ["indexer_stream"]
[[example]]
name = "chunk_load"
required-features = ["indexer_stream"]
[profile.dev]
opt-level = 1
[profile.bench]
opt-level = 3
lto = "thin"
[profile.release]
lto = "thin"
codegen-units = 1
[lints.clippy]
obfuscated_if_else = "allow"