-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCargo.toml
More file actions
234 lines (225 loc) · 10.4 KB
/
Copy pathCargo.toml
File metadata and controls
234 lines (225 loc) · 10.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
[package]
name = "lb-integration-tests"
version = "0.1.0"
edition = "2024"
rust-version = "1.88"
publish = false
# S8 / M-D (verifier I3) — forward the lb-l7 `test-gauges` feature so the
# verifier's H2→H1 memory test can read
# `lb_l7::h2_proxy::H2_REQ_MAX_RETAINED_BODY_BYTES` from this integration
# crate. Off by default; the workspace gate enables it via `--all-features`.
[features]
test-gauges = ["lb-l7/test-gauges"]
[workspace]
resolver = "2"
members = [
"crates/lb-core",
"crates/lb-config",
"crates/lb-controlplane",
"crates/lb-cp-client",
"crates/lb-l4-xdp",
"crates/lb-io",
"crates/lb-h1",
"crates/lb-h2",
# S26: the hand-rolled H3 frame/QPACK codec. Production migrated to
# `quiche::h3` (S24/S25), so this is now a TEST-ONLY crate — linked ONLY as
# a dev-dependency (root + lb-quic) and a fuzz dependency; no production
# crate links it. (Relocated here from the original production codec crate,
# which was deleted in INC-C once the wire-test harnesses were re-pointed.)
"crates/lb-h3-testcodec",
"crates/lb-quic",
"crates/lb-grpc",
"crates/lb-l7",
"crates/lb-balancer",
"crates/lb-health",
"crates/lb-security",
# CODE-2-15 / L-001: `lb-compression` removed in Round-4 because the
# crate had no in-workspace consumers outside its own tests and the
# proxy is pass-through (does not decompress in either direction).
# The README claim "Compression: zstd, brotli, gzip, deflate with
# streaming and transcoding" is rel REL-2-01's doc-lint table-of-
# truth fix. Re-introduction notes (BREACH guard, gRPC max-message,
# JSON inspection) are in audit/deferred.md.
"crates/lb-observability",
"crates/lb",
# S20: chaos/soak suite (external-process soak apparatus + its own
# harness unit tests). Permanent infrastructure; links no product crates.
"crates/lb-soak",
]
# MSRV-pin / held-dep notes (refreshed S37-D):
# MSRV is 1.88 (quiche 0.29.1 + tokio-quiche 0.19.0 hard-require it).
# `foundations 4.5.0` is HELD-BY-UPSTREAM, not by choice: quiche 0.29.1 ->
# qlog 0.18 -> foundations ^4, so it cannot move to 5.x without a quiche/qlog
# bump (quiche 0.29.1 is already latest). foundations transitively pins
# prometheus 0.13.4 + object 0.37.3 + serde_yaml/yaml-rust, dual-versioned
# alongside our DIRECT prometheus 0.14 / object 0.39 (deny multiple-versions =
# warn). `idna_adapter 1.1.0` is a leaf transitive (idna/url) left as resolved.
# Re-evaluate both when quiche/qlog adopt foundations 5.x. (S37 also confirmed
# aya 0.13.1 is latest — 0.13.2 was yanked — and held reqwest at 0.12: its 0.13
# major renamed the rustls-tls feature + defaults to aws-lc, a dev-only churn.)
[workspace.package]
license = "GPL-3.0-only"
edition = "2024"
# MSRV moved to 1.88 at S31 (quiche 0.29.1 + tokio-quiche 0.19 hard-require it);
# see the MSRV-pin notes above. Member crates inherit this via rust-version =
# { workspace = true } (root lb-integration-tests already declares 1.88).
rust-version = "1.88"
[workspace.dependencies]
# Async runtime. HELD at 1.51.x (<1.52): S37-D measured tokio 1.52.x regressing the
# H2->H3 relay throughput ~10x (its 1.52.0 LIFO slot-stealing revert reschedules the
# relay) — tests/h2h3_md_streaming_verify.rs h2h3_fcap1 forwards only ~30 MiB / 60s on
# 1.52.3 (cap-arm never reached) vs 64 MiB / ~5.7s on 1.51.1. Reproduced 3/3 on a quiet
# box. Carry the 1.52 bump until upstream restores throughput (CF-S37-D-TOKIO-1.52-RELAY).
tokio = { version = ">=1.51, <1.52", features = ["full"] }
io-uring = "0.7"
# Error handling
thiserror = "2"
anyhow = "1"
# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "1"
# Networking
bytes = "1"
socket2 = { version = "0.6", features = ["all"] }
libc = "0.2"
# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["json", "env-filter"] }
# Concurrency
# CODE-2-12: arc-swap was declared in workspace.dependencies but had
# zero consumers (cargo machete + manual grep). Removed Round-4; if a
# real hot-swap site lands later (e.g. rel REL-2-03 cert rotation),
# re-add it at the crate level under lb-security or lb.
parking_lot = "0.12"
dashmap = "6"
# HTTP
http = "1"
# Pillar 3b.3b-1: real L7 H1 proxy. Full features cover client + server +
# tokio runtime adapters; http-body-util gives the Empty/Full body types
# used by the L7 module's tests and the binary's wiring code.
hyper = { version = "1", features = ["full"] }
hyper-util = { version = "0.1", features = ["full"] }
http-body-util = "0.1"
# QUIC + TLS
# Pillar 3b.1: lb-quic runs on quiche (BoringSSL) + tokio-quiche; see
# docs/decisions/quinn-to-quiche-migration.md. rustls stays for the
# TLS-over-TCP listener path + the Step 5b TicketRotator.
quiche = "0.29"
tokio-quiche = "0.19"
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12", "logging"] }
rustls-pki-types = "1"
# Pillar 3b.2: TLS-over-TCP listener wiring.
tokio-rustls = { version = "0.26", default-features = false, features = ["ring", "tls12", "logging"] }
rustls-pemfile = "2"
# Pillar 3b.3c-1: CancellationToken for graceful listener shutdown.
tokio-util = { version = "0.7", default-features = false, features = ["rt"] }
# Item 2: WebSocket proxy path (PROMPT.md §14). 0.24 keeps us on the same
# rustls 0.23 + tokio-rustls 0.26 stack already pinned above.
tokio-tungstenite = { version = "0.29", default-features = false, features = ["handshake"] }
# Item 2: `StreamExt` + `SinkExt` combinators over `tokio-tungstenite`'s
# `WebSocketStream`. `std` is the only default we need; we keep the pull
# light and skip the `compat` layer.
futures-util = { version = "0.3", default-features = false, features = ["std", "sink"] }
# Utilities
rand = "0.10"
# XDP / eBPF (Pillar 4a: aya userspace loader; Linux-only in consumers)
aya = "0.13"
# Pillar 4b-1: aya-obj gives us the kernel-free ELF parser (no CAP_BPF
# required) for the real_elf_parses integration test.
aya-obj = "0.2"
# Pillar 4b-1: CAP_BPF probe before attempting XDP attach.
caps = "0.5"
# Fuzzing (Step 6). Consumed only by the out-of-workspace `fuzz/` crate;
# declared here so the version travels with the workspace policy rather
# than being hidden inside the fuzz crate.
libfuzzer-sys = "0.4"
# Pillar 3b (Task #21): Prometheus exposition for the /metrics admin
# listener. `default-features = false` drops the protobuf family so we
# keep the text-format path only; `process` enables the
# `process_collector` for OS-level RSS/CPU samples.
prometheus = { version = "0.14", default-features = false, features = ["process"] }
# CODE-2-11: property-based testing for the H1 / H2 / H3 / QUIC parsers.
# Dev-only; never enters release. The default-features include
# `proptest-derive` machinery we do not need (regex-based generators)
# so we trim to the standard generators only.
proptest = { version = "1", default-features = false, features = ["std", "fork", "timeout"] }
# CODE-2-11: loom interleaving harness, gated behind `--cfg loom` so it
# never compiles into normal test builds. One harness in lb-balancer
# this round (atomic-counter race against scheduler); broader sweep is
# Wave-2 work.
loom = "0.7"
[dev-dependencies]
lb-core = { path = "crates/lb-core" }
lb-config = { path = "crates/lb-config" }
lb-controlplane = { path = "crates/lb-controlplane" }
lb-cp-client = { path = "crates/lb-cp-client" }
lb-l4-xdp = { path = "crates/lb-l4-xdp" }
lb-io = { path = "crates/lb-io" }
lb-h1 = { path = "crates/lb-h1" }
lb-h2 = { path = "crates/lb-h2" }
# S26: test-only codec for the H3 wire-test harnesses (dev-dep only).
lb-h3-testcodec = { path = "crates/lb-h3-testcodec" }
lb-quic = { path = "crates/lb-quic" }
lb-grpc = { path = "crates/lb-grpc" }
lb-l7 = { path = "crates/lb-l7" }
lb-balancer = { path = "crates/lb-balancer" }
lb-health = { path = "crates/lb-health" }
lb-security = { path = "crates/lb-security" }
# CODE-2-15: lb-compression removed (see [workspace.members] comment).
lb-observability = { path = "crates/lb-observability" }
tokio = { workspace = true, features = ["full", "test-util"] }
anyhow = { workspace = true }
bytes = { workspace = true }
http = { workspace = true }
hyper = { workspace = true }
hyper-util = { workspace = true }
http-body-util = { workspace = true }
rand = { workspace = true }
rustls = { workspace = true }
rustls-pki-types = { workspace = true }
tokio-rustls = { workspace = true }
parking_lot = { workspace = true }
# Pillar 3b.3b-2: reqwest for H2 integration tests. rustls-tls + http2
# only; no default features to avoid pulling native-tls and OpenSSL.
# reqwest HELD at 0.12 (latest 0.12.x, maintained): 0.13 renamed/removed the
# `rustls-tls` feature and defaults its rustls provider to aws-lc-rs (vs our
# ring standard) — a dev-only major not worth the crypto-provider churn (S37 D;
# carry CF-S37-D-REQWEST-0.13). dev-dependency: never enters the release binary.
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls", "http2"] }
# Item 1: raw h2 crate used as a malicious-client harness in
# tests/h2_security_live.rs. Pinned to the same minor hyper pulls.
h2 = "0.4"
quiche = { workspace = true }
tokio-util = { workspace = true }
ring = "0.17"
rcgen = { version = "0.14", features = ["pem"] }
# Item 2: integration tests for the WebSocket proxy. `connect` gives us
# `connect_async` (which dials over raw TCP, no TLS needed for the ws://
# echo tests). Stays on the same 0.24 pin as the workspace dep.
tokio-tungstenite = { workspace = true, features = ["connect"] }
futures-util = { workspace = true }
# Item 3: gRPC e2e tests drive a raw hyper H2 client + server to play
# both sides of the RPC wire. `lb-grpc` supplies the frame codec and
# status/deadline helpers; the tests exercise framing + trailers
# without pulling `tonic`/`prost` into the dev-dep graph (tonic's
# build.rs + protoc requirement would complicate sandbox builds).
[profile.release]
opt-level = 3
lto = "thin"
codegen-units = 1
strip = "symbols"
# CODE-2-02: panic = "abort" in release so a panic across any of the 17
# unsafe blocks in lb-io::ring + the 4 unsafe-impl-Pod sites in
# lb-l4-xdp::loader cannot unwind into a half-restored invariant.
# Pairs with `install_panic_hook()` in lb/src/main.rs which logs +
# aborts. dev / test deliberately KEEP `unwind` (rustc default) for
# proptest minimisation and loom interleaving exploration (CODE-2-11).
panic = "abort"
# Inherit release semantics for benches so the abort policy carries
# through. Without this `cargo bench` would still default to `unwind`.
[profile.bench]
inherits = "release"
[profile.dev]
opt-level = 0
debug = true