swactor/crates/distribution/Cargo.toml

83 lines
2.8 KiB
TOML
Raw Normal View History

[package]
name = "distribution"
version = "0.1.0"
edition = "2024"
[features]
default = []
2026-05-26 08:09:22 +00:00
# `dep:iroh-relay` is pulled in here (with only the empty `test-utils` feature)
# so the client side can name `CaRootsConfig::insecure_skip_verify()` for a
# custom relay's self-signed QAD cert. iroh already depends on iroh-relay
# transitively, so this adds no real weight — it only flips the cfg gate.
iroh = ["dep:iroh", "dep:tokio", "dep:iroh-metrics", "dep:iroh-relay"]
2026-05-20 07:41:30 +00:00
relay = [
"iroh",
2026-05-25 18:19:06 +00:00
"collector",
2026-05-26 08:09:22 +00:00
# The standalone relay binary additionally needs the (heavy) server side.
"iroh-relay/server",
2026-05-20 07:41:30 +00:00
"tokio/macros",
"tokio/signal",
]
# Standalone HTTP collector binary plus the post-processor for
# finalized bundles. Pulls axum + the file/tar/flate2 stack; library
# consumers that do not enable this feature stay free of those deps.
collector = [
"dep:axum",
"dep:tokio",
2026-05-28 07:05:41 +00:00
"dep:tokio-stream",
2026-05-20 07:41:30 +00:00
"tokio/macros",
"tokio/net",
"tokio/sync",
"tokio/time",
"tokio/fs",
"tokio/io-util",
"tokio/signal",
"dep:tar",
"dep:flate2",
]
[dependencies]
swactor = { path = "../..", features = ["serde", "transport"] }
swactor-transport = { path = "../transport" }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
2026-05-20 07:41:30 +00:00
uuid = { version = "1", features = ["v4", "serde"] }
2026-05-22 07:06:58 +00:00
iroh = { version = "0.98", optional = true }
2026-05-26 08:09:22 +00:00
# `test-utils` (an empty feature) exposes two cfg-gated APIs we rely on:
# - client: `CaRootsConfig::insecure_skip_verify()` (trust a custom relay's
# self-signed QAD cert) — needs only `test-utils`.
# - relay binary: `server::testing::self_signed_tls_certs_and_config()` for
# the QAD cert — needs `test-utils` + `server` (the latter via the `relay`
# feature). Using the helper keeps the `rustls::ServerConfig` version in
# lockstep with what `QuicConfig` expects.
iroh-relay = { version = "0.98", features = ["test-utils"], optional = true }
2026-05-20 07:41:30 +00:00
iroh-metrics = { version = "0.38", optional = true }
tokio = { version = "1", features = ["rt-multi-thread"], optional = true }
2026-05-20 07:41:30 +00:00
axum = { version = "0.8", optional = true }
2026-05-28 07:05:41 +00:00
tokio-stream = { version = "0.1", features = ["sync"], optional = true }
2026-05-20 07:41:30 +00:00
tar = { version = "0.4", optional = true }
flate2 = { version = "1", optional = true }
[target.'cfg(target_os = "linux")'.dependencies]
libc = "0.2"
[dev-dependencies]
serde_json = "1"
2026-05-22 07:06:58 +00:00
iroh-relay = { version = "0.98", features = ["server", "test-utils"] }
2026-05-20 07:41:30 +00:00
tokio = { version = "1", features = ["rt-multi-thread", "macros", "net", "io-util", "time"] }
[[bin]]
name = "swactor-diag-collector"
path = "src/bin/swactor-diag-collector.rs"
required-features = ["collector"]
[[bin]]
name = "swactor-diag-postproc"
path = "src/bin/swactor-diag-postproc.rs"
required-features = ["collector"]
[[bin]]
name = "swactor-iroh-relay"
path = "src/bin/swactor-iroh-relay.rs"
required-features = ["relay"]