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
# Workspace hosts the main `udb` crate and the `udb-portable` sub-crate.
# The portable crate uses #[path] includes from `src/` so there is a single
# source of truth for the AST, lexer, checksum, and source-based parser.
# See crates/udb-portable/Cargo.toml.
[]
= ["crates/udb-portable", "crates/udb-wasm"]
= "2"
[]
= "udb"
= "0.4.21"
= "2024"
= "1.85"
= "Universal Data Broker — a Rust gRPC broker over multiple databases (Postgres, MySQL, SQLite, MongoDB, ClickHouse, Cassandra, MSSQL, Redis, Qdrant, S3, Neo4j, …) with per-tenant RLS, 2PC, sagas, and CDC."
= "MIT"
= "https://github.com/fahara02/udb"
= "https://github.com/fahara02/udb"
= "https://docs.rs/udb"
= "README.md"
= ["grpc", "database", "multi-tenant", "broker", "cdc"]
= ["database", "network-programming", "web-programming::http-server"]
= ["fahara02 <idea3d.faruk@gmail.com>"]
# Keep the crates.io package below the 10MiB upload cap. Release workflows test
# the full repository before publishing; the package itself only needs the Rust
# crate, embedded proto contract, third-party proto imports, and files referenced
# at compile time.
= [
"/Cargo.lock",
"/Cargo.toml",
"/LICENSE",
"/README.md",
"/build.rs",
"/docs/abac_seed.json",
"/docs/generated/contract-baseline.bin",
"/docs/generated/udb-native-contract.json",
"/proto/udb/**",
"/sdk-templates/**",
"/src/**",
"/third_party/googleapis/**",
]
[]
= "udb"
= "src/lib.rs"
[[]]
= "udb"
= "src/main.rs"
[]
# Per-backend feature gating. `default` enables every backend, so the normal
# build, binary, and full test suite include the complete broker surface.
# Each backend can be turned off individually; a slim broker is built with e.g.
# `--no-default-features --features postgres`. When a backend is disabled its
# code/deps are compiled out, and any gRPC-contract RPC it owns (e.g. VectorSearch
# for qdrant, the object RPCs for s3) stays present but returns FailedPrecondition.
# Postgres is the always-on core (sqlx is never gated).
= ["postgres", "mysql", "sqlite", "qdrant", "s3", "mongodb-native", "neo4j", "clickhouse", "redis", "elasticsearch", "memcached", "mssql", "weaviate", "pinecone", "cassandra", "azureblob", "gcs", "kafka", "otel", "runtime-logging", "http-client", "simd-codecs", "simd-checksum"]
# D.2: exposes `udb::bench_internals` — `#[doc(hidden)]` pub wrappers over hot
# `pub(crate)` functions so Criterion micro-benches (`benches/hotpath_bench.rs`)
# can measure them without widening the public API. NOT a stable API; off by
# default, enabled only for `cargo bench --features bench-internals`.
= []
= []
# MySQL and SQLite are optional SQL backends. Each pulls its sqlx driver and is
# enabled by `default`; slim postgres-only builds skip both.
= ["sqlx/mysql"]
= ["sqlx/sqlite"]
# HTTP-using backends depend on `http-client`, so postgres-only builds do not
# pull reqwest. Adding an HTTP backend automatically enables the shared client.
= ["http-client"]
= ["http-client"]
= ["mongodb", "dep:mongodb-driver"]
= ["http-client"]
= ["http-client"]
# Elasticsearch backend over the REST Query DSL.
= ["http-client"]
# Memcached cache backend via the `memcache` crate.
= ["dep:memcache"]
# Microsoft SQL Server backend via the `tiberius` TDS driver.
= ["dep:tiberius", "dep:tokio-util"]
# Weaviate vector backend over the REST API.
= ["http-client"]
# Pinecone vector backend over the REST API.
= ["http-client"]
# Cassandra/Scylla wide-column backend via the `scylla` driver.
= ["dep:scylla"]
# Azure Blob Storage object backend.
= ["dep:azure_storage", "dep:azure_storage_blobs", "dep:azure_core"]
# Google Cloud Storage object backend.
= ["dep:google-cloud-storage"]
= ["dep:aws-config", "dep:aws-sdk-s3"]
# Master-plan 3.4 KMS extension point: the `KeyProvider` trait + selector ship now
# (env path is the default), but the concrete `AwsKmsProvider` and its `aws-sdk-kms`
# dependency are deferred (see the KMS note in `authn/key_provider.rs`). To activate
# on a networked build: add `aws-sdk-kms = { version = "1", optional = true }` below,
# re-add `kms = ["dep:aws-sdk-kms", "dep:aws-config"]` here, restore the
# `AwsKmsProvider` impl, and commit the updated `Cargo.lock`. The dep is omitted now
# because it cannot be vendored offline (it would break every offline `cargo` resolve).
= ["dep:redis"]
# CDC (kafka) uses Redis for publish idempotency and the HTTP client for
# optional schema-registry validation, so it pulls both features. It also
# pulls the vendored `postgres-replication` module's direct deps —
# byteorder/memchr/pin-project-lite/futures-util plus the upstream
# postgres-protocol + postgres-types crates whose APIs the WAL decoder
# consumes. These are wrapped here so the slim postgres-only build does
# not drag them in.
= [
"dep:rdkafka",
"redis",
"http-client",
"dep:byteorder",
"dep:memchr",
"dep:pin-project-lite",
"dep:futures-util",
"dep:postgres-protocol",
"dep:postgres-types",
]
= ["dep:opentelemetry", "dep:opentelemetry-otlp", "dep:opentelemetry_sdk", "dep:tracing-opentelemetry", "runtime-logging"]
= ["dep:tracing-subscriber"]
# Shared HTTP client used by REST-backed integrations.
= ["dep:reqwest"]
# ── OFF-by-default optional integrations (not in `default`). ──────────────────
# OpenID Connect discovery / token verification for the auth plane.
= ["dep:openidconnect", "openidconnect/reqwest-blocking", "openidconnect/rustls-tls"]
# WebAuthn / FIDO2 second-factor registration + assertion.
= [
"dep:webauthn-rs",
"dep:openssl",
"dep:openssl-sys",
"dep:p256",
"webauthn-rs/attestation",
"webauthn-rs/danger-allow-state-serialisation",
]
# Embedded WebRTC SFU media-plane scaffolding. Off by default: Layer A
# signaling/TURN stays available without pulling the media stack.
= ["dep:webrtc-rs"]
# Pluggable ws:// signalling bridge. A WebSocket server speaking external
# real-time signalling protocols (engines/clients that can't use gRPC), with a
# `SignalingProtocol` trait so more protocols are added as trait impls. The first
# protocol is Unreal Pixel Streaming. Off by default; enabled per deployment and
# activated at runtime by setting `UDB_WS_SIGNALLING_ADDR`.
= ["dep:tokio-tungstenite", "dep:futures-util"]
# Asset image processing (THUMBNAIL/RESIZE steps) via the pure-Rust `image`
# crate. Off by default; no native deps. (Video TRANSCODE/CAPTION would need a
# separate ffmpeg-backed feature + libav, which is not available on all hosts.)
= ["dep:image"]
# SIMD-accelerated base64 codec for hot wire-encode paths.
= ["dep:base64-simd"]
# SIMD JSON parser for high-throughput JSON decode.
= ["dep:simd-json"]
# SIMD-accelerated CRC32 checksum (e.g. CDC / object integrity).
= ["dep:crc32fast"]
# Full-screen terminal wizard for `udb init`.
= ["dep:ratatui", "dep:crossterm"]
# Line-mode prompt fallback for `udb init --no-tui`.
= ["dep:inquire"]
[]
= "0.3"
= "0.1"
= "0.5"
= { = "1", = true }
= { = "1", = true }
= "0.11"
= "0.22"
= "1"
= "2.2.0"
= "2"
= { = "0.4", = ["serde"] }
= { = "0.27", = true }
= { = "0.27", = true }
# OTLP exporter + tracer-provider builder (gated by `otel`). Pinned to the same
# 0.27 line as `opentelemetry`/`opentelemetry-otlp`; the OTLP crate already pulls
# it transitively, declared here so `init_otel` can name it directly.
= { = "0.27", = ["rt-tokio"], = true }
= "0.7"
= "0.13"
= "0.13"
= "0.13"
= "0.13"
= { = "0.36", = false, = ["cmake-build", "tokio", "curl-static"], = true }
= { = "0.27", = ["tokio-comp"], = true }
= { = "mongodb", = "3.7", = true }
# Memcached binary-protocol client. The sync API is wrapped in
# `tokio::task::spawn_blocking` by the executor so the async runtime does not
# block. `default-features = false` avoids pulling native TLS/OpenSSL.
= { = "0.17", = false, = true }
# Microsoft SQL Server driver over TDS. Default features are disabled to avoid
# the driver's chrono shim; enable the SQL Server 2008+ wire format and rustls.
= { = "0.12", = false, = ["tds73", "rustls"], = true }
= { = "0.7", = ["compat"], = true }
# WebSocket server for the pluggable ws:// signalling bridge (feature
# `ws-signalling`). Plain ws:// only (no TLS feature pulled); TLS is terminated
# upstream by nginx/envoy in the documented deployments.
= { = "0.24", = true }
# Pure-Rust image decode/encode/resize for the asset service's THUMBNAIL/RESIZE
# steps (feature `asset-image`). default-features off to pull only PNG/JPEG codecs.
= { = "0.25", = false, = ["png", "jpeg"], = true }
# Cassandra / ScyllaDB driver over the CQL binary protocol. Default features
# stay off to avoid unused metrics and cloud-bundle dependencies.
= { = "0.13", = false, = true }
# Azure Blob Storage SDK split across core primitives, storage account support,
# and the blob client.
= { = "0.21", = false, = true }
= { = "0.21", = false, = true }
= { = "0.21", = false, = true }
# Google Cloud Storage client with rustls TLS.
= { = "0.22", = false, = ["rustls-tls", "auth"], = true }
= { = "0.12", = false, = ["json", "rustls-tls", "blocking"], = true }
= { = "1", = ["derive"] }
= "1"
= "0.9"
= "0.8"
= "0.22"
= { = "0.4", = ["macro"] }
= { = "0.30", = true, = false, = ["crossterm"] }
= { = "0.29", = true }
= { = "0.9", = true, = false, = ["crossterm"] }
= "0.10"
# SHA-1 is required only for RFC 6238 TOTP (the de-facto authenticator-app HMAC)
# and legacy SAML RSA-SHA1 signature verification. (No `oid` feature needed: the
# SAML verify path prepends the DigestInfo prefix itself — see idp/saml.rs.)
= "0.10"
# Argon2id password KDF for native password storage (replaces keyed-HMAC).
= "0.5"
= { = "0.8", = false, = ["runtime-tokio-rustls", "postgres", "json", "uuid", "chrono"] }
# rustls 0.23 needs a process-level CryptoProvider installed before the first
# TLS config is built. The dep graph links BOTH aws-lc-rs and ring transitively
# (tonic tls, sqlx, reqwest, tiberius, google-cloud-storage), so rustls cannot
# auto-select and panics on the serve path. We standardise on aws-lc-rs and
# install it explicitly at startup (see install_default_crypto_provider). NOTE:
# sqlx-postgres TLS does NOT use this process-default — it builds its own config
# with builder_with_provider(ring) (runtime-tokio-rustls -> tls-rustls-ring).
# (A build-probe confirmed the Neon/SNI handshake succeeds on both the 22.04 and
# 24.04 toolchains, so this provider choice is NOT a Postgres-connectivity risk.)
= { = "0.23", = ["aws_lc_rs"] }
= { = "0.3", = false, = ["std"] }
= { = "1", = ["full"] }
= { = "0.7", = ["with-chrono-0_4", "with-uuid-1", "with-serde_json-1", "runtime"] }
= "0.1"
# Dependencies of the vendored `postgres-replication` module
# (`src/runtime/cdc/postgres_replication/`). Pulled only when the
# `kafka` feature is on; the slim postgres-only build skips them.
= { = "1.5", = true }
= { = "2.7", = true }
= { = "0.2", = true }
= { = "0.3", = false, = ["std", "sink"], = true }
= { = "0.6", = true }
= { = "0.2", = true }
= { = "0.12", = ["tls"] }
= "0.12"
= "0.12"
= { = "0.4", = ["timeout", "limit"] }
= "0.1"
= { = "0.28", = true }
= { = "0.3", = ["env-filter", "json"], = true }
= { = "1", = ["serde", "v4"] }
= "2.3"
= "0.16"
= "9"
# SAML 2.0 (Phase J): pure-Rust XML reader for metadata/assertion parsing and
# DEFLATE for the HTTP-Redirect AuthnRequest encoding. No native deps; assertion
# signature verification uses the existing `rsa`/`sha2`/`sha1`/`x509-parser`
# stack (see src/runtime/service/auth_service/idp/saml.rs).
= "0.31"
= "1"
# Pure-Rust RSA (already in the tree transitively) — used to publish a JWK Set
# for verifying UDB-issued RS256 tokens (authn GetJwks).
= { = "0.9", = ["pem"] }
= "0.15"
= "1.9.1"
= "2"
# ── OFF-by-default optional integrations. Each is pulled in ONLY by its named
# feature (see [features] above); none are in `default`. ──────────────────────
# OpenID Connect client (discovery + ID-token verification). Gated by `oidc`.
# TODO(parent): verify version — 4.x is the current major on crates.io; if the
# resolver objects, pin to a known-good 3.x ("3").
= { = "4", = false, = true }
# WebAuthn / FIDO2 server-side ceremony. Gated by `webauthn`.
# TODO(parent): verify version — 0.5 is the latest 0.x major on crates.io.
= { = "0.5", = true }
# webauthn-rs 0.5 uses openssl internally. Vendoring keeps the feature build
# portable on Windows/MSVC, matching the repo's general "no system OpenSSL"
# stance for optional integrations.
= { = "0.10", = ["vendored"], = true }
= { = "0.9", = ["vendored"], = true }
# Q#9-11 dev-only WebAuthn software authenticator (UDB_WEBAUTHN_TEST_MODE): a real
# P-256 keypair produces a genuine "none"-attestation credential + ES256 assertion
# that webauthn-rs verifies legitimately (NOT an accept-any bypass). Gated by `webauthn`.
= { = "0.13", = ["ecdsa"], = true }
# SIMD base64 codec. Gated by `simd-codecs`.
# TODO(parent): verify version — 0.8 is the latest on crates.io.
= { = "0.8", = true }
# SIMD JSON parser. Gated by `simd-json`.
# TODO(parent): verify version — confirm latest 0.x major on crates.io.
= { = "0.14", = true }
# SIMD-accelerated CRC32. Gated by `simd-checksum`.
= { = "1", = true }
# webrtc-rs media stack. Aliased so it does not collide with generated
# `udb.core.webrtc` protocol modules or the `webrtc` Cargo feature name.
= { = "webrtc", = "0.8", = true }
[]
= "3"
= "0.12"
# Match prost-build's identifier casing (proto message name -> Rust type name)
# in the §7 DTO-redaction codegen, so generated impl paths resolve exactly.
= "0.5"
[]
= { = "0.5", = ["html_reports"] }
# D.2 heap-allocation profiling for the hot paths (run the dhat_hotpath example).
= "0.3"
= { = "0.27", = ["tokio-comp"] }
= { = "0.36", = false, = ["cmake-build", "tokio", "curl-static"] }
= "1"
= "1"
= { = "0.4", = ["serde"] }
# `test-util` enables `start_paused`/`tokio::time::advance` for deterministic
# time-based unit tests (e.g. the Phase-9 control-plane push debouncer).
= { = "1", = ["full", "test-util"] }
= { = "1", = ["serde", "v4"] }
= "1"
# Parity between this crate and `udb-portable` is structural: both crates
# include the same source files (`schema/ast.rs`, `schema/checksum.rs`,
# `parser/*.rs`) via `#[path]` inside `crates/udb-portable/src/lib.rs`.
# The portable crate's own tests (`cargo test -p udb-portable`) pin checksum
# determinism, AST round-trip, and parser smoke behavior.
[[]]
= "core_bench"
= false
# D.2 hot-path micro-benchmarks. Needs `bench-internals` to reach the
# `pub(crate)` conversion/parse helpers: `cargo bench --features bench-internals --bench hotpath_bench`.
[[]]
= "hotpath_bench"
= false
= ["bench-internals"]
# D.2 END-TO-END perf against the live docker backends (relational + object):
# `UDB_BENCH_LIVE=1 cargo bench --features bench-internals --bench live_backends_bench`.
[[]]
= "live_backends_bench"
= false
= ["bench-internals"]
# D.2 allocation profile for the same hot paths (dhat heap profiler):
# `cargo run --release --features bench-internals --example dhat_hotpath`.
[[]]
= "dhat_hotpath"
= ["bench-internals"]
# ── Build profiles ────────────────────────────────────────────────────────────
# Default `--release` (dev + CI): thin LTO + a single codegen unit capture most of
# the cross-crate-inlining win without fat-LTO's multi-minute link. `panic` stays
# "unwind" ON PURPOSE — the broker isolates per-request/task panics (tonic/tokio)
# and must NOT abort the whole process.
[]
= "thin"
= 1
# Benches MUST measure the shipped, optimised path (bench-integrity doctrine), not a
# default-profile build.
[]
= "release"
# Maximum-optimisation profile for the SHIPPED release binaries: `release-binaries.yml`
# builds `--profile dist`. Compile time is irrelevant for a tagged release, so go fat
# LTO + 1 codegen unit + symbol strip for the fastest, smallest artifact. Per-target
# `target-cpu` is supplied by the workflow (portable per-OS baselines, never `native`).
[]
= "release"
= "fat"
= "symbols"