-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathCargo.toml
More file actions
398 lines (370 loc) · 18.1 KB
/
Copy pathCargo.toml
File metadata and controls
398 lines (370 loc) · 18.1 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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
[workspace]
resolver = "2"
members = [
# Crates are grouped into role/product directories. Directory paths
# are decoupled from package names — package names stay unchanged
# (rvoip-sip-core, etc.), so the crates.io view is identical.
# Front-door crates (top-level): facade + single-Identity client SDK.
"crates/rvoip",
"crates/rvoip-client",
# foundation/ — shared spine: orchestrator, trait surface, infra.
"crates/foundation/rvoip-core",
"crates/foundation/rvoip-core-traits",
"crates/foundation/infra-common",
# media/ — shared media plane (consumed by foundation, uctp, and sip).
"crates/media/media-core",
"crates/media/codec-core",
"crates/media/rtp-core",
# Optional OS audio-device bridge — top-of-stack helper that depends UP on
# rvoip-sip (so it sits with the SIP product, not below it).
"crates/media/rvoip-audio-device",
# sip/ — SIP product. The sub-crates are siblings of the rvoip-sip
# umbrella (the umbrella no longer nests them, so no `exclude` needed).
"crates/sip/rvoip-sip",
"crates/sip/sip-core",
"crates/sip/sip-transport",
"crates/sip/sip-dialog",
"crates/sip/sip-proxy",
"crates/sip/sip-registrar",
# webrtc/ — WebRTC interop product.
"crates/webrtc/rvoip-rtc",
"crates/webrtc/rvoip-webrtc-stack",
"crates/webrtc/rvoip-webrtc",
"crates/webrtc/rvoip-amazon-connect",
# uctp/ — UCTP signaling protocol + its substrate adapters.
"crates/uctp/rvoip-uctp",
"crates/uctp/rvoip-quic",
"crates/uctp/rvoip-webtransport",
"crates/uctp/rvoip-websocket",
# moq/ — standards-based Media over QUIC broadcast adapter.
"crates/moq/rvoip-moq-transport",
"crates/moq/rvoip-moq-native",
"crates/moq/rvoip-moq-relay",
"crates/moq/rvoip-moq",
# identity/ — auth validators, user store, identity provider backends.
"crates/identity/auth-core",
"crates/identity/users-core",
"crates/identity/rvoip-identity",
# extensions/ — optional pluggable add-ons.
"crates/extensions/rvoip-vcon",
"crates/extensions/rvoip-vcon-postgres",
"crates/extensions/rvoip-harness",
"crates/extensions/rvoip-vapi",
"crates/extensions/rvoip-stir-shaken",
"crates/extensions/rvoip-keycloak",
"crates/extensions/rvoip-redis",
"crates/extensions/rvoip-audit",
"crates/extensions/rvoip-oidc",
"crates/extensions/rvoip-ldap",
"crates/extensions/rvoip-scim",
"crates/extensions/rvoip-saml",
"crates/extensions/rvoip-webauthn",
"crates/extensions/rvoip-ims-aka",
]
exclude = [
# Gap plan §3.2 — Playwright browser smoke. Node.js project; lives
# outside the Cargo workspace so `cargo` doesn't try to interpret
# `package.json` or descend into `node_modules`.
"tests/browser-smoke",
# Root developer examples. Each is a standalone Cargo project (its own
# empty `[workspace]` table) that path-depends on the local `rvoip-sip`
# so it always builds against current code. Kept out of the main
# workspace so `cargo build` stays lean; a dedicated CI job
# (.github/workflows/examples.yml) builds each one to catch API drift.
"examples",
]
# Default members - when you run cargo commands without -p or --workspace,
# these are the packages that will be affected
default-members = [
"crates/sip/rvoip-sip",
"crates/sip/sip-core",
"crates/sip/sip-transport",
"crates/sip/sip-dialog",
"crates/sip/sip-registrar",
"crates/media/rtp-core",
"crates/media/media-core",
"crates/foundation/rvoip-core",
"crates/media/codec-core",
"crates/foundation/infra-common",
"crates/uctp/rvoip-uctp",
"crates/uctp/rvoip-quic",
"crates/uctp/rvoip-webtransport",
"crates/webrtc/rvoip-amazon-connect",
]
# WORKSPACE PACKAGE INHERITANCE - Define common metadata once.
[workspace.package]
# Every publishable workspace crate ships at this one version. Feature-level
# maturity and non-claims remain documented independently of package SemVer.
version = "0.3.8"
edition = "2021"
license = "MIT"
homepage = "https://github.com/eisenzopf/rvoip"
repository = "https://github.com/eisenzopf/rvoip"
documentation = "https://docs.rs/rvoip"
authors = ["RVOIP AUTHORS"]
rust-version = "1.91" # Minimum supported Rust version
categories = ["network-programming", "multimedia", "web-programming"]
keywords = ["sip", "voip", "rtp", "communication", "telephony"]
# Lints — post-merge cleanup left these enabled as warnings so future
# code rot stays visible. CI must not promote them to `deny` without
# first walking the remaining residual warnings (mostly tracing-macro
# imports that look unused to rustc but feed `error!`/`warn!`/etc.).
[workspace.lints.rust]
# IMPORTANT: do NOT add `warnings = "allow"` here — the `warnings` group
# overrides any per-lint setting below it (this bit us during Phase 3
# and silently disabled every per-lint warn for the whole workspace).
unused_imports = "warn"
unused_variables = "warn"
unused_mut = "warn"
dead_code = "warn"
unused_comparisons = "warn"
# `elided_named_lifetimes` was renamed to `mismatched_lifetime_syntaxes`
# in recent Rust toolchains; the parser-wide `'_,` cleanup in Phase 4
# brought the workspace count to zero.
mismatched_lifetime_syntaxes = "warn"
ambiguous_glob_reexports = "warn"
# SIP_API_DESIGN_2 migration (2026-05-18): legacy methods were removed
# outright rather than `#[deprecated]`-wrapped. There are no remaining
# `#[deprecated]` annotations in the workspace, so this lint is no
# longer load-bearing. Surfacing deprecation warnings makes future
# migrations easier — the previous setting was hiding the gap.
unexpected_cfgs = "warn"
unreachable_patterns = "allow"
irrefutable_let_patterns = "allow"
unused_assignments = "warn"
async_fn_in_trait = "allow"
[workspace.lints.clippy]
# Lint GROUPS must carry a lower priority than the specific-lint overrides
# below, otherwise cargo errors with "lint group X has the same priority (0)
# as a lint" (and the group `allow`s silently fail to apply — which is why
# `cargo clippy` was surfacing pedantic/nursery noise despite these lines).
# priority = -1 lets the per-lint settings win.
# Allow stylistic and pedantic lints that don't affect correctness
pedantic = { level = "allow", priority = -1 }
style = { level = "allow", priority = -1 }
complexity = { level = "allow", priority = -1 }
perf = { level = "allow", priority = -1 }
cargo = { level = "allow", priority = -1 }
nursery = { level = "allow", priority = -1 }
# Keep important correctness lints as warnings/errors
correctness = { level = "warn", priority = -1 }
suspicious = { level = "warn", priority = -1 }
restriction = { level = "allow", priority = -1 }
# Allow specific common patterns that are acceptable
len_zero = "allow"
len_without_is_empty = "allow"
new_without_default = "allow"
too_many_arguments = "allow"
module_inception = "allow"
single_match = "allow"
match_like_matches_macro = "allow"
redundant_pattern_matching = "allow"
needless_option_as_deref = "allow"
unnecessary_filter_map = "allow"
bool_assert_comparison = "allow"
bool_comparison = "allow"
comparison_to_empty = "allow"
explicit_auto_deref = "allow"
unnecessary_get_then_check = "allow"
needless_borrows_for_generic_args = "allow"
assertions_on_constants = "allow"
expect_fun_call = "allow"
option_as_ref_deref = "allow"
useless_conversion = "allow"
unnecessary_literal_unwrap = "allow"
vec_init_then_push = "allow"
useless_vec = "allow"
redundant_closure = "allow"
items_after_test_module = "allow"
approx_constant = "allow"
partialeq_to_none = "allow"
legacy_numeric_constants = "allow"
absurd_extreme_comparisons = "allow"
cast_abs_to_unsigned = "allow"
empty_line_after_doc_comments = "allow"
multiple_bound_locations = "allow"
should_implement_trait = "allow"
manual_find = "allow"
collapsible_else_if = "allow"
[workspace.dependencies]
# INTERNAL CRATES — every entry must carry both `path` (for in-workspace
# resolution) AND `version` (for `cargo publish` registry resolution).
# Adding/renaming an entry without `version` will fail dry-run publish.
#
# Package names are unchanged on crates.io (rvoip-sip-core, etc.) — only
# the in-repo directory changed. See the grouped [workspace] members above.
# All publishable workspace crates and internal registry requirements move
# together in one dependency-ordered release.
rvoip-sip-core = { path = "crates/sip/sip-core", version = "0.3.8" }
rvoip-sip-transport = { path = "crates/sip/sip-transport", version = "0.3.8" }
rvoip-sip-dialog = { path = "crates/sip/sip-dialog", version = "0.3.8" }
rvoip-sip-proxy = { path = "crates/sip/sip-proxy", version = "0.3.8" }
rvoip-sip-registrar = { path = "crates/sip/sip-registrar", version = "0.3.8" }
rvoip-rtp-core = { path = "crates/media/rtp-core", version = "0.3.8" }
rvoip-media-core = { path = "crates/media/media-core", version = "0.3.8" }
rvoip-sip = { path = "crates/sip/rvoip-sip", version = "0.3.8" }
rvoip-core = { path = "crates/foundation/rvoip-core", version = "0.3.8" }
rvoip-codec-core = { path = "crates/media/codec-core", version = "0.3.8" }
rvoip-infra-common = { path = "crates/foundation/infra-common", version = "0.3.8" }
rvoip-auth-core = { path = "crates/identity/auth-core", version = "0.3.8" }
rvoip-core-traits = { path = "crates/foundation/rvoip-core-traits", version = "0.3.8" }
rvoip-users-core = { path = "crates/identity/users-core", version = "0.3.8" }
# Optional and top-of-stack crates are part of the same release. Facade and
# core packages list extension crates such as rvoip-vcon, rvoip-harness, and
# rvoip-vapi as optional runtime dependencies, so their versions must resolve
# on crates.io regardless of feature activation.
rvoip-vcon = { path = "crates/extensions/rvoip-vcon", version = "0.3.8" }
rvoip-vcon-postgres = { path = "crates/extensions/rvoip-vcon-postgres", version = "0.3.8" }
rvoip-harness = { path = "crates/extensions/rvoip-harness", version = "0.3.8" }
rvoip-vapi = { path = "crates/extensions/rvoip-vapi", version = "0.3.8" }
rvoip = { path = "crates/rvoip", version = "0.3.8" }
rvoip-uctp = { path = "crates/uctp/rvoip-uctp", version = "0.3.8" }
rvoip-quic = { path = "crates/uctp/rvoip-quic", version = "0.3.8" }
rvoip-webtransport = { path = "crates/uctp/rvoip-webtransport", version = "0.3.8" }
rvoip-websocket = { path = "crates/uctp/rvoip-websocket", version = "0.3.8" }
rvoip-moq-transport = { path = "crates/moq/rvoip-moq-transport", version = "0.3.8" }
rvoip-moq-native = { path = "crates/moq/rvoip-moq-native", version = "0.3.8" }
rvoip-moq-relay = { path = "crates/moq/rvoip-moq-relay", version = "0.3.8", default-features = false }
rvoip-moq = { path = "crates/moq/rvoip-moq", version = "0.3.8" }
rvoip-rtc = { path = "crates/webrtc/rvoip-rtc", version = "0.3.8" }
rvoip-webrtc-stack = { path = "crates/webrtc/rvoip-webrtc-stack", version = "0.3.8" }
rvoip-webrtc = { path = "crates/webrtc/rvoip-webrtc", version = "0.3.8" }
rvoip-identity = { path = "crates/identity/rvoip-identity", version = "0.3.8" }
rvoip-client = { path = "crates/rvoip-client", version = "0.3.8" }
rvoip-audio-device = { path = "crates/media/rvoip-audio-device", version = "0.3.8" }
rvoip-stir-shaken = { path = "crates/extensions/rvoip-stir-shaken", version = "0.3.8" }
rvoip-keycloak = { path = "crates/extensions/rvoip-keycloak", version = "0.3.8" }
rvoip-redis = { path = "crates/extensions/rvoip-redis", version = "0.3.8" }
rvoip-audit = { path = "crates/extensions/rvoip-audit", version = "0.3.8" }
rvoip-oidc = { path = "crates/extensions/rvoip-oidc", version = "0.3.8" }
rvoip-ldap = { path = "crates/extensions/rvoip-ldap", version = "0.3.8" }
rvoip-scim = { path = "crates/extensions/rvoip-scim", version = "0.3.8" }
rvoip-saml = { path = "crates/extensions/rvoip-saml", version = "0.3.8" }
rvoip-webauthn = { path = "crates/extensions/rvoip-webauthn", version = "0.3.8" }
rvoip-ims-aka = { path = "crates/extensions/rvoip-ims-aka", version = "0.3.8" }
rtc = { package = "rvoip-rtc", path = "crates/webrtc/rvoip-rtc", version = "0.3.8" }
# External dependencies
tokio = { version = "1.36", features = ["full"] }
tokio-stream = { version = "0.1", features = ["sync"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "1.0"
anyhow = "1.0"
bytes = { version = "1.5", features = ["serde"] }
uuid = { version = "1.7", features = ["v4", "serde"] }
axum = "0.7"
tower = "0.4"
tower-http = { version = "0.5", features = ["trace", "cors"] }
proptest = "1.4"
async-trait = "0.1"
futures = "0.3"
chrono = { version = "0.4", features = ["serde"] }
dashmap = "6"
parking_lot = "0.12"
rand = { version = "0.8", features = ["small_rng"] }
clap = { version = "4.0", features = ["derive"] }
# Additional dependencies used by various crates
serde_bytes = "0.11"
base64 = "0.22"
nom = "7.1"
log = "0.4"
ordered-float = { version = "4.2.0", features = ["serde"] }
socket2 = { version = "0.5", features = ["all"] }
mio = { version = "0.8", features = ["os-poll", "net"] }
# default-features=false drops rustls's default `aws_lc_rs` provider AND
# `prefer-post-quantum` (which also requires aws_lc_rs) — otherwise the process
# links two CryptoProviders (ring + aws-lc-rs) and rustls can't auto-select one.
# We standardize on `ring`. "std" needed for RootCertStore::add in rvoip-uctp::substrate::tls.
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12", "logging"] }
rustls-pemfile = "2.0"
url = "2"
# Used by rvoip-webrtc tls-rustls feature for in-process HTTPS/WSS termination.
tokio-rustls = { version = "0.26", default-features = false, features = ["ring", "tls12", "logging"] }
axum-server = { version = "0.7", features = ["tls-rustls"] }
# Headless-Chromium driver for rvoip-webrtc's interop-browser dev-only test.
# Requires a Chromium binary on PATH at test time. Default features disabled
# to avoid pulling chromiumoxide_cdp's heavy proc-macro chain when the
# feature isn't selected.
chromiumoxide = { version = "0.7", default-features = false, features = ["tokio-runtime"] }
sha2 = "0.10"
zeroize = "1.9"
hmac = "0.12"
aes = "0.8"
md-5 = "0.10"
ring = "0.17"
rcgen = "0.14"
x509-parser = "0.18"
webpki-roots = "0.26"
serial_test = "3.1"
fastrand = "2.0"
# UCTP substrate deps — QUIC, WebTransport, length-prefix codec, metrics.
# Consumed by rvoip-uctp / rvoip-quic / rvoip-webtransport.
quinn = { version = "0.11", default-features = false, features = ["runtime-tokio", "rustls-ring"] }
# default features pull `aws-lc-rs`, which clashes with the workspace's
# ring rustls provider (rustls/quinn are pinned to ring above). Force ring
# so the process has exactly ONE rustls CryptoProvider — otherwise rustls
# can't auto-select one and TLS/WSS paths panic at runtime.
web-transport-quinn = { version = "0.11", default-features = false, features = ["ring"] }
web-transport = "0.10.6"
tokio-util = { version = "0.7", features = ["codec", "compat"] }
metrics = "0.23"
# Qualified, attributed MOQT draft-19 forks. Package aliases retain the
# upstream Rust crate names while the registry identities remain rvoip-owned.
moq-transport = { package = "rvoip-moq-transport", path = "crates/moq/rvoip-moq-transport", version = "0.3.8" }
moq-native-ietf = { package = "rvoip-moq-native", path = "crates/moq/rvoip-moq-native", version = "0.3.8" }
moq-relay-ietf = { package = "rvoip-moq-relay", path = "crates/moq/rvoip-moq-relay", version = "0.3.8", default-features = false }
# rvoip-websocket signaling + media. tokio-tungstenite for the WebSocket
# transport, webrtc for the co-located PeerConnection media plane.
# webrtc is pre-1.0 and API-volatile — pinned strictly. Bumping requires
# verifying the WebRtcMediaBridge still compiles.
tokio-tungstenite = "0.29"
webrtc = { package = "rvoip-webrtc-stack", path = "crates/webrtc/rvoip-webrtc-stack", version = "0.3.8" }
hickory-resolver = { version = "0.26.1", default-features = false, features = ["tokio", "system-config"] }
tracing-appender = "0.2"
env_logger = "0.11"
criterion = { version = "0.5", features = ["html_reports"] }
# 🔧 Optimization Profiles for Binary Size Reduction
# Optional perf-test instrumentation (rvoip-sip `perf-tests` feature).
console-subscriber = "0.4"
dhat = "0.3"
hdrhistogram = "7.5"
sysinfo = "0.31"
[profile.release]
# Speed-optimized release for a perf-sensitive networking library.
# Was previously `opt-level = "s"` (size) — switched to 3 after
# benchmarks showed `to_bytes()` and parser hot paths were leaving
# substantial throughput on the floor under size optimization. Size-
# constrained deployments can use `[profile.release-small]` below.
opt-level = 3 # Full speed optimization
lto = true # Link-time optimization across crates
codegen-units = 1 # Single CGU for best inlining (slower compile)
panic = "abort" # No unwind tables; criterion catches panics at the harness layer
debug = true # Keep DWARF symbols for release profiling
strip = false # Preserve symbols so samply/perf can resolve hot paths
[profile.release-small]
# Aggressive size optimization (smallest possible binary)
inherits = "release"
opt-level = "z" # Aggressive size optimization
lto = "fat" # Maximum link-time optimization
codegen-units = 1 # Single compilation unit for best optimization
panic = "abort" # No panic unwinding code
strip = "symbols" # Strip all symbols
overflow-checks = false # Disable overflow checks in release
debug = false # No debug info
rpath = false # No runtime library path
[profile.release-fast]
# Speed-optimized release (larger binary, maximum performance)
inherits = "release"
opt-level = 3 # Maximum speed optimization
lto = "thin" # Light link-time optimization
codegen-units = 16 # Parallel compilation
panic = "unwind" # Standard panic behavior
debug = false # No debug info
[profile.flamegraph]
# Profile for flamegraph profiling with debug symbols
inherits = "release"
opt-level = 3 # Keep optimization for realistic profiling
debug = true # Include debug symbols for flamegraph
strip = false # Don't strip symbols