From ccb4cd6d257faf126b0fb9737bdbd2aa92b65cc4 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 27 Oct 2026 18:48:53 -0700 Subject: [PATCH 01/24] chore(quest): claim quest/m0/ci/hakari.md Quest-Claim: c9386df8a93a7f8a From 765c26572270038f0f96af73f76781433f866867 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 27 Oct 2026 20:31:42 -0700 Subject: [PATCH 02/24] ci: unify dependency features with a cargo-hakari workspace-hack Co-Authored-By: Claude Opus 5.5 --- .config/hakari.toml | 33 ++ Cargo.lock | 241 +++++++++++++ demo/carla/bridge/Cargo.toml | 3 + flake.nix | 2 + rs/hang/Cargo.toml | 1 + rs/justfile | 8 +- rs/libmoq/Cargo.toml | 3 + rs/moq-archive/Cargo.toml | 1 + rs/moq-auth/Cargo.toml | 1 + rs/moq-bench/Cargo.toml | 1 + rs/moq-boy/Cargo.toml | 1 + rs/moq-c/Cargo.toml | 1 + rs/moq-cli/Cargo.toml | 1 + rs/moq-clock/macros/Cargo.toml | 3 + rs/moq-congestion/Cargo.toml | 1 + rs/moq-e2ee/Cargo.toml | 1 + rs/moq-ffi/Cargo.toml | 1 + rs/moq-flate/Cargo.toml | 1 + rs/moq-gst/Cargo.toml | 1 + rs/moq-hls/Cargo.toml | 1 + rs/moq-ice/Cargo.toml | 1 + rs/moq-json/Cargo.toml | 1 + rs/moq-loc/Cargo.toml | 3 + rs/moq-msf/Cargo.toml | 3 + rs/moq-mux/Cargo.toml | 1 + rs/moq-native/Cargo.toml | 3 + rs/moq-net-tests/Cargo.toml | 1 + rs/moq-nvenc/Cargo.toml | 3 + rs/moq-pattern/Cargo.toml | 1 + rs/moq-relay/Cargo.toml | 1 + rs/moq-room/Cargo.toml | 1 + rs/moq-rtc/Cargo.toml | 1 + rs/moq-rtmp/Cargo.toml | 1 + rs/moq-rtsp/Cargo.toml | 1 + rs/moq-scene/Cargo.toml | 1 + rs/moq-shaper/Cargo.toml | 1 + rs/moq-sock/Cargo.toml | 1 + rs/moq-srt/Cargo.toml | 1 + rs/moq-stats/Cargo.toml | 1 + rs/moq-studio/Cargo.toml | 1 + rs/moq-uring/Cargo.toml | 1 + rs/moq-v4l/Cargo.toml | 3 + rs/moq-wasm/Cargo.toml | 1 + rs/qmux/Cargo.toml | 1 + rs/test-env/Cargo.toml | 3 + rs/uniffi-bindgen/Cargo.toml | 3 + rs/workspace-hack/.gitattributes | 4 + rs/workspace-hack/Cargo.toml | 561 +++++++++++++++++++++++++++++++ rs/workspace-hack/build.rs | 2 + rs/workspace-hack/src/lib.rs | 1 + sh/rs/hakari.py | 56 +++ 51 files changed, 968 insertions(+), 2 deletions(-) create mode 100644 .config/hakari.toml create mode 100644 rs/workspace-hack/.gitattributes create mode 100644 rs/workspace-hack/Cargo.toml create mode 100644 rs/workspace-hack/build.rs create mode 100644 rs/workspace-hack/src/lib.rs create mode 100755 sh/rs/hakari.py diff --git a/.config/hakari.toml b/.config/hakari.toml new file mode 100644 index 00000000000..693ab4f27c9 --- /dev/null +++ b/.config/hakari.toml @@ -0,0 +1,33 @@ +# This file contains settings for `cargo hakari`. +# See https://docs.rs/cargo-hakari/latest/cargo_hakari/config for a full list of options. + +hakari-package = "workspace-hack" + +# Format version for hakari's output. Version 4 requires cargo-hakari 0.9.22 or above. +dep-format-version = "4" + +# Setting workspace.resolver = "2" or higher in the root Cargo.toml is HIGHLY recommended. +# Hakari works much better with the v2 resolver. (The v2 and v3 resolvers are identical from +# hakari's perspective, so you're welcome to set either.) +# +# For more about the new feature resolver, see: +# https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#cargos-new-feature-resolver +resolver = "2" + +# Add triples corresponding to platforms commonly used by developers here. +# https://doc.rust-lang.org/rustc/platform-support.html +platforms = [ + "aarch64-apple-darwin", + "aarch64-unknown-linux-gnu", + "x86_64-pc-windows-msvc", + "x86_64-unknown-linux-gnu", +] + +# Write out exact versions rather than a semver range. (Defaults to false.) +# exact-versions = true + +[traversal-excludes] +workspace-members = ["moq-net-fuzz", "moq-quic-fuzz"] + +[final-excludes] +workspace-members = ["kio", "moq-audio", "moq-clock", "moq-net", "moq-quic", "moq-tokio", "moq-transcode", "moq-video"] diff --git a/Cargo.lock b/Cargo.lock index f0823c5d7cc..7b12c8e93d1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3580,6 +3580,7 @@ dependencies = [ "tokio", "tracing", "url", + "workspace-hack", ] [[package]] @@ -4701,6 +4702,9 @@ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "libmoq" version = "0.6.12" +dependencies = [ + "workspace-hack", +] [[package]] name = "libredox" @@ -5018,6 +5022,7 @@ dependencies = [ "thiserror 2.0.21", "tokio", "tracing", + "workspace-hack", ] [[package]] @@ -5085,6 +5090,7 @@ dependencies = [ "tracing", "url", "wiremock", + "workspace-hack", ] [[package]] @@ -5127,6 +5133,7 @@ dependencies = [ "toml 1.1.6+spec-1.1.0", "tracing", "usage-rs", + "workspace-hack", ] [[package]] @@ -5148,6 +5155,7 @@ dependencies = [ "tokio", "tracing", "usage-rs", + "workspace-hack", ] [[package]] @@ -5174,6 +5182,7 @@ dependencies = [ "tokio", "tracing", "url", + "workspace-hack", ] [[package]] @@ -5189,6 +5198,7 @@ dependencies = [ "parking_lot", "pollster", "tracing", + "workspace-hack", ] [[package]] @@ -5239,6 +5249,7 @@ dependencies = [ "usage-rs", "vt100", "winit", + "workspace-hack", ] [[package]] @@ -5261,6 +5272,9 @@ dependencies = [ [[package]] name = "moq-clock-macros" version = "0.1.0" +dependencies = [ + "workspace-hack", +] [[package]] name = "moq-congestion" @@ -5271,6 +5285,7 @@ dependencies = [ "rand 0.10.3", "rand_pcg", "stats_alloc", + "workspace-hack", ] [[package]] @@ -5287,6 +5302,7 @@ dependencies = [ "serde_json", "thiserror 2.0.21", "tokio", + "workspace-hack", "zeroize", ] @@ -5317,6 +5333,7 @@ dependencies = [ "web-async", "web-transport-trait", "web-transport-wasm", + "workspace-hack", ] [[package]] @@ -5330,6 +5347,7 @@ dependencies = [ "moq-net", "thiserror 2.0.21", "tracing", + "workspace-hack", ] [[package]] @@ -5354,6 +5372,7 @@ dependencies = [ "tracing", "tracing-subscriber", "url", + "workspace-hack", ] [[package]] @@ -5386,6 +5405,7 @@ dependencies = [ "tracing", "tracing-test", "url", + "workspace-hack", ] [[package]] @@ -5398,6 +5418,7 @@ dependencies = [ "thiserror 2.0.21", "tokio", "tracing", + "workspace-hack", ] [[package]] @@ -5417,6 +5438,7 @@ dependencies = [ "serde_path_to_error", "thiserror 2.0.21", "tracing", + "workspace-hack", ] [[package]] @@ -5426,6 +5448,7 @@ dependencies = [ "bytes", "moq-net", "thiserror 2.0.21", + "workspace-hack", ] [[package]] @@ -5435,6 +5458,7 @@ dependencies = [ "serde", "serde_json", "serde_with", + "workspace-hack", ] [[package]] @@ -5477,11 +5501,15 @@ dependencies = [ "tracing-test", "url", "webm-iterable", + "workspace-hack", ] [[package]] name = "moq-native" version = "0.20.0" +dependencies = [ + "workspace-hack", +] [[package]] name = "moq-net" @@ -5532,6 +5560,7 @@ dependencies = [ "moq-net", "serde_json", "tokio", + "workspace-hack", ] [[package]] @@ -5541,6 +5570,7 @@ dependencies = [ "cudarc", "libloading 0.9.0", "thiserror 2.0.21", + "workspace-hack", ] [[package]] @@ -5551,6 +5581,7 @@ dependencies = [ "moq-pattern 0.1.2", "serde", "serde_json", + "workspace-hack", ] [[package]] @@ -5663,6 +5694,7 @@ dependencies = [ "url", "usage-rs", "web-transport-trait", + "workspace-hack", "x509-parser", ] @@ -5678,6 +5710,7 @@ dependencies = [ "moq-tokio", "thiserror 2.0.21", "tokio", + "workspace-hack", ] [[package]] @@ -5701,6 +5734,7 @@ dependencies = [ "tracing-test", "url", "uuid", + "workspace-hack", ] [[package]] @@ -5727,6 +5761,7 @@ dependencies = [ "tokio-rustls", "tracing", "tracing-test", + "workspace-hack", ] [[package]] @@ -5747,6 +5782,7 @@ dependencies = [ "tracing", "tracing-test", "url", + "workspace-hack", ] [[package]] @@ -5770,6 +5806,7 @@ dependencies = [ "tokio", "toml 1.1.6+spec-1.1.0", "tracing", + "workspace-hack", ] [[package]] @@ -5786,6 +5823,7 @@ dependencies = [ "serde_json", "tokio", "toml 1.1.6+spec-1.1.0", + "workspace-hack", ] [[package]] @@ -5801,6 +5839,7 @@ dependencies = [ "tracing", "tracing-test", "windows-sys 0.61.2", + "workspace-hack", ] [[package]] @@ -5818,6 +5857,7 @@ dependencies = [ "tokio", "tracing", "tracing-test", + "workspace-hack", ] [[package]] @@ -5836,6 +5876,7 @@ dependencies = [ "tokio", "tracing", "web-async", + "workspace-hack", ] [[package]] @@ -5861,6 +5902,7 @@ dependencies = [ "tracing", "url", "usage-rs", + "workspace-hack", ] [[package]] @@ -6001,6 +6043,7 @@ dependencies = [ "url", "web-transport-proto", "web-transport-trait", + "workspace-hack", ] [[package]] @@ -6009,6 +6052,7 @@ version = "0.1.0" dependencies = [ "bitflags 2.13.2", "libc", + "workspace-hack", ] [[package]] @@ -6099,6 +6143,7 @@ dependencies = [ "web-async", "web-transport-trait", "web-transport-wasm", + "workspace-hack", ] [[package]] @@ -8237,6 +8282,7 @@ dependencies = [ "tokio-tungstenite 0.30.0", "tracing", "web-transport-trait", + "workspace-hack", ] [[package]] @@ -10432,6 +10478,9 @@ dependencies = [ [[package]] name = "test-env" version = "0.0.1" +dependencies = [ + "workspace-hack", +] [[package]] name = "textwrap" @@ -11192,6 +11241,7 @@ name = "uniffi-bindgen" version = "0.1.0" dependencies = [ "uniffi 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=88d835d)", + "workspace-hack", ] [[package]] @@ -12747,6 +12797,197 @@ dependencies = [ "primefield", ] +[[package]] +name = "workspace-hack" +version = "0.1.0" +dependencies = [ + "anyhow", + "arrayvec", + "aws-lc-rs", + "aws-lc-sys", + "axum", + "base16ct 1.0.0", + "base64 0.23.1", + "bitflags 2.13.2", + "block2 0.6.2", + "bytemuck", + "byteorder", + "bytes", + "camino", + "cc", + "chrono", + "clang-sys", + "clap", + "clap_builder", + "const-oid 0.9.6", + "cpal", + "crc32fast", + "crossbeam-epoch", + "crossbeam-utils", + "crypto-common 0.1.7", + "crypto-common 0.2.2", + "ctutils", + "cudarc", + "data-encoding", + "der 0.7.10", + "der 0.8.2", + "derive_more 2.1.1", + "derive_more-impl", + "digest 0.10.7", + "digest 0.11.3", + "dispatch2", + "displaydoc", + "either", + "errno", + "event-listener", + "event-listener-strategy", + "fastrand", + "flate2", + "flume", + "foldhash", + "form_urlencoded", + "fs-err", + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-lite", + "futures-sink", + "futures-task", + "futures-util", + "getrandom 0.2.17", + "getrandom 0.3.4", + "getrandom 0.4.3", + "half", + "hashbrown 0.17.1", + "hex", + "hmac 0.12.1", + "hybrid-array", + "hyper", + "hyper-rustls", + "hyper-util", + "image", + "indexmap 2.14.2", + "itertools 0.13.0", + "lazy_static", + "libc", + "libspa", + "linux-raw-sys 0.12.1", + "log", + "md-5 0.10.6", + "md-5 0.11.0", + "memchr", + "miniz_oxide 0.8.9", + "mio", + "nix", + "nom 7.1.3", + "nom 8.0.0", + "num-bigint", + "num-complex", + "num-integer", + "num-iter", + "num-traits", + "objc2 0.6.5", + "objc2-core-audio", + "objc2-core-audio-types", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-core-video", + "objc2-foundation 0.3.2", + "objc2-metal 0.3.2", + "objc2-quartz-core 0.3.2", + "object_store", + "once_cell", + "percent-encoding", + "pipewire", + "pkcs1", + "pkcs8 0.10.2", + "pkcs8 0.11.0", + "portable-atomic", + "postcard", + "ppv-lite86", + "proc-macro2", + "proptest", + "quick-xml 0.41.0", + "quick-xml 0.42.0", + "quote", + "rand 0.8.8", + "rand 0.9.5", + "rand_chacha 0.3.1", + "rcgen 0.14.10", + "regex", + "regex-automata", + "regex-syntax", + "reqwest", + "rustc-hash 1.1.0", + "rustix 1.1.5", + "rustls", + "rustls-pki-types", + "rustls-webpki", + "security-framework-sys", + "semver", + "serde", + "serde_core", + "serde_json", + "serde_spanned 1.1.1", + "serde_with", + "sha1 0.10.7", + "sha2 0.10.9", + "sha2 0.11.1", + "signature 2.2.0", + "signature 3.0.0", + "simd-adler32", + "simdutf8", + "siphasher", + "slab", + "smallvec", + "socket2 0.6.5", + "spin 0.10.1", + "spin 0.9.9", + "spki 0.7.3", + "spki 0.8.1", + "subtle", + "syn 2.0.119", + "syn 3.0.6", + "time", + "tokio", + "tokio-rustls", + "tokio-tungstenite 0.30.0", + "tokio-util", + "toml 1.1.6+spec-1.1.0", + "toml_datetime 1.1.1+spec-1.1.0", + "toml_parser", + "tower", + "tower-http 0.6.11", + "tracing", + "tracing-core", + "tracing-subscriber", + "tracing-test", + "tracing-test-macro", + "tungstenite 0.30.0", + "typenum", + "url", + "usage-argv", + "usage-rs", + "uuid", + "wgpu", + "wgpu-core", + "wgpu-hal", + "wgpu-types", + "winapi", + "windows", + "windows-core", + "windows-result", + "windows-sys 0.52.0", + "windows-sys 0.61.2", + "winit", + "winnow 0.7.15", + "winnow 1.0.4", + "x509-parser", + "zerocopy", + "zeroize", +] + [[package]] name = "writeable" version = "0.6.4" diff --git a/demo/carla/bridge/Cargo.toml b/demo/carla/bridge/Cargo.toml index 8809275a994..bd2c67d2f16 100644 --- a/demo/carla/bridge/Cargo.toml +++ b/demo/carla/bridge/Cargo.toml @@ -31,6 +31,9 @@ parking_lot = "0.12" pollster = { workspace = true } tracing = { workspace = true } +[dev-dependencies] +workspace-hack = { path = "../../../rs/workspace-hack" } + [target.'cfg(target_os = "linux")'.dev-dependencies] # The stand-in producer: a native Vulkan renderer that hands the bridge # exportable slots exactly the way the CARLA plugin does. diff --git a/flake.nix b/flake.nix index 9351d405e05..bea5061d3f0 100644 --- a/flake.nix +++ b/flake.nix @@ -156,6 +156,8 @@ # Per-crate feature matrices (`just rs features`), where workspace # unification would otherwise hide a broken single-crate build. cargo-hack + # The workspace-hack that gives every build one feature set per dependency. + cargo-hakari cargo-nextest # Source-based test coverage (`just rs coverage`). # Its LLVM test helpers must read the compiler's profile format. diff --git a/rs/hang/Cargo.toml b/rs/hang/Cargo.toml index 3c59a1a0ddb..a6cad1dc50d 100644 --- a/rs/hang/Cargo.toml +++ b/rs/hang/Cargo.toml @@ -37,6 +37,7 @@ moq-tokio = { path = "../moq-tokio", default-features = false, features = ["quic tokio = { workspace = true, features = ["macros", "fs"] } tracing = { workspace = true } url = { workspace = true } +workspace-hack = { path = "../workspace-hack" } [lints] workspace = true diff --git a/rs/justfile b/rs/justfile index 437114da920..621774f1f95 100644 --- a/rs/justfile +++ b/rs/justfile @@ -51,7 +51,10 @@ lint *args: cargo fmt --all --check RUSTDOCFLAGS="-D warnings" bash sh/local.sh cargo doc --locked --no-deps "$@" cargo shear - cargo sort --workspace --check --no-format + # The workspace-hack's table order is `cargo hakari`'s, which `cargo sort` disagrees with. + cargo sort --check --no-format . $(cargo metadata --locked --no-deps --format-version 1 | jq -r '.packages[] | select(.name != "workspace-hack") | .manifest_path | rtrimstr("/Cargo.toml")') + cargo hakari generate --diff + python3 sh/rs/hakari.py # Auto-fix clippy/format/shear/sort. [positional-arguments] @@ -59,7 +62,8 @@ fix *args: bash sh/local.sh cargo clippy --locked --fix --allow-staged --allow-dirty --all-targets "$@" cargo fmt --all cargo shear --fix - cargo sort --workspace --no-format + cargo hakari generate + cargo sort --no-format . $(cargo metadata --locked --no-deps --format-version 1 | jq -r '.packages[] | select(.name != "workspace-hack") | .manifest_path | rtrimstr("/Cargo.toml")') # Like `check`, but only the crates in a changed-file list plus their dependents. check-changed $LIST: diff --git a/rs/libmoq/Cargo.toml b/rs/libmoq/Cargo.toml index 79dce540ac6..81eb3d6825d 100644 --- a/rs/libmoq/Cargo.toml +++ b/rs/libmoq/Cargo.toml @@ -12,5 +12,8 @@ rust-version.workspace = true keywords = ["quic", "media", "live"] categories = ["multimedia", "network-programming"] +[dev-dependencies] +workspace-hack = { path = "../workspace-hack" } + [lints] workspace = true diff --git a/rs/moq-archive/Cargo.toml b/rs/moq-archive/Cargo.toml index a3d6fa17971..255c099db35 100644 --- a/rs/moq-archive/Cargo.toml +++ b/rs/moq-archive/Cargo.toml @@ -35,6 +35,7 @@ s3s = "0.17" s3s-fs = "0.17" tempfile = { workspace = true } tokio = { workspace = true, features = ["macros", "net", "rt", "sync", "test-util", "time"] } +workspace-hack = { path = "../workspace-hack" } [[bench]] name = "producer" diff --git a/rs/moq-auth/Cargo.toml b/rs/moq-auth/Cargo.toml index 90e4990e932..4ca163e8ebc 100644 --- a/rs/moq-auth/Cargo.toml +++ b/rs/moq-auth/Cargo.toml @@ -48,6 +48,7 @@ moq-token = "0.7" tempfile = { workspace = true } tokio = { workspace = true, features = ["macros", "rt-multi-thread", "test-util"] } wiremock = "0.6" +workspace-hack = { path = "../workspace-hack" } [lints] workspace = true diff --git a/rs/moq-bench/Cargo.toml b/rs/moq-bench/Cargo.toml index 578e83465c8..c371e9148fe 100644 --- a/rs/moq-bench/Cargo.toml +++ b/rs/moq-bench/Cargo.toml @@ -65,6 +65,7 @@ procfs = "0.18" test-env = { path = "../test-env" } # test-util enables tokio::time::pause/advance for the deterministic produce tests. tokio = { workspace = true, features = ["test-util"] } +workspace-hack = { path = "../workspace-hack" } [lints] workspace = true diff --git a/rs/moq-boy/Cargo.toml b/rs/moq-boy/Cargo.toml index cec2ba135d4..18e64cfef4f 100644 --- a/rs/moq-boy/Cargo.toml +++ b/rs/moq-boy/Cargo.toml @@ -49,6 +49,7 @@ usage-rs = { workspace = true, features = ["completions", "config"] } [dev-dependencies] tokio = { workspace = true, features = ["test-util"] } +workspace-hack = { path = "../workspace-hack" } [lints] workspace = true diff --git a/rs/moq-c/Cargo.toml b/rs/moq-c/Cargo.toml index f9973efee35..ee1515d7ac4 100644 --- a/rs/moq-c/Cargo.toml +++ b/rs/moq-c/Cargo.toml @@ -57,6 +57,7 @@ moq-video = { path = "../moq-video", features = ["openh264"] } # Runs the tests that need a variable set or unset in a child process given it. test-env = { path = "../test-env" } tokio = { workspace = true, features = ["test-util"] } +workspace-hack = { path = "../workspace-hack" } [lints] workspace = true diff --git a/rs/moq-cli/Cargo.toml b/rs/moq-cli/Cargo.toml index 700a8f74b6f..1e99ac6fc7e 100644 --- a/rs/moq-cli/Cargo.toml +++ b/rs/moq-cli/Cargo.toml @@ -164,6 +164,7 @@ test-env = { path = "../test-env" } tokio = { workspace = true, features = ["test-util"] } # Plays the `announced` view's frames on a virtual terminal, scrolling included. vt100 = "0.17.0" +workspace-hack = { path = "../workspace-hack" } [target.'cfg(unix)'.dev-dependencies] # Sends the signals the `auth serve` shutdown test checks. diff --git a/rs/moq-clock/macros/Cargo.toml b/rs/moq-clock/macros/Cargo.toml index 6af8280d5ce..335518e261f 100644 --- a/rs/moq-clock/macros/Cargo.toml +++ b/rs/moq-clock/macros/Cargo.toml @@ -17,5 +17,8 @@ categories = ["development-tools::testing"] [lib] proc-macro = true +[dev-dependencies] +workspace-hack = { path = "../../workspace-hack" } + [lints] workspace = true diff --git a/rs/moq-congestion/Cargo.toml b/rs/moq-congestion/Cargo.toml index d79e64598f9..f151431a1e0 100644 --- a/rs/moq-congestion/Cargo.toml +++ b/rs/moq-congestion/Cargo.toml @@ -19,6 +19,7 @@ rand_pcg = { workspace = true } [dev-dependencies] moq-clock = { path = "../moq-clock" } stats_alloc = "0.1.10" +workspace-hack = { path = "../workspace-hack" } [target.'cfg(not(target_family = "wasm"))'.dev-dependencies] cpu-time = "1.0.0" diff --git a/rs/moq-e2ee/Cargo.toml b/rs/moq-e2ee/Cargo.toml index 62fac64ecd8..3b07173f6d4 100644 --- a/rs/moq-e2ee/Cargo.toml +++ b/rs/moq-e2ee/Cargo.toml @@ -27,6 +27,7 @@ criterion = { workspace = true } hex = { workspace = true } serde_json = { workspace = true } tokio = { workspace = true, features = ["macros", "rt", "sync", "time"] } +workspace-hack = { path = "../workspace-hack" } [[bench]] name = "protect" diff --git a/rs/moq-ffi/Cargo.toml b/rs/moq-ffi/Cargo.toml index af8e9c0d83f..1849905096d 100644 --- a/rs/moq-ffi/Cargo.toml +++ b/rs/moq-ffi/Cargo.toml @@ -98,6 +98,7 @@ pollster = { workspace = true } test-env = { path = "../test-env" } tokio = { workspace = true, features = ["test-util"] } web-transport-trait = { workspace = true } +workspace-hack = { path = "../workspace-hack" } [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] # The video tests encode with OpenH264, the one encoder a GPU-less host has, so diff --git a/rs/moq-flate/Cargo.toml b/rs/moq-flate/Cargo.toml index 9e75bddcfef..55c6602f780 100644 --- a/rs/moq-flate/Cargo.toml +++ b/rs/moq-flate/Cargo.toml @@ -24,6 +24,7 @@ tracing = { workspace = true } [dev-dependencies] futures = { workspace = true } +workspace-hack = { path = "../workspace-hack" } [lints] workspace = true diff --git a/rs/moq-gst/Cargo.toml b/rs/moq-gst/Cargo.toml index f58ec7d8335..e3fd44ac567 100644 --- a/rs/moq-gst/Cargo.toml +++ b/rs/moq-gst/Cargo.toml @@ -43,6 +43,7 @@ moq-audio = { path = "../moq-audio", default-features = false } # Runs the tests that need a variable set or unset in a child process given it. test-env = { path = "../test-env" } tokio = { workspace = true, features = ["test-util"] } +workspace-hack = { path = "../workspace-hack" } [[bench]] name = "catalog" diff --git a/rs/moq-hls/Cargo.toml b/rs/moq-hls/Cargo.toml index 85d2c4c6acf..dabe897f44b 100644 --- a/rs/moq-hls/Cargo.toml +++ b/rs/moq-hls/Cargo.toml @@ -47,6 +47,7 @@ moq-tokio = { path = "../moq-tokio", default-features = false, features = ["tcp" tokio = { workspace = true, features = ["test-util"] } tower = { version = "0.5", features = ["util"] } tracing-test = { workspace = true, features = ["no-env-filter"] } +workspace-hack = { path = "../workspace-hack" } [lints] workspace = true diff --git a/rs/moq-ice/Cargo.toml b/rs/moq-ice/Cargo.toml index 58956326500..7aa2ab2854b 100644 --- a/rs/moq-ice/Cargo.toml +++ b/rs/moq-ice/Cargo.toml @@ -22,6 +22,7 @@ tracing = { workspace = true } [dev-dependencies] tokio = { workspace = true, features = ["macros", "rt-multi-thread"] } +workspace-hack = { path = "../workspace-hack" } [lints] workspace = true diff --git a/rs/moq-json/Cargo.toml b/rs/moq-json/Cargo.toml index 4764208414c..1393a6fce7c 100644 --- a/rs/moq-json/Cargo.toml +++ b/rs/moq-json/Cargo.toml @@ -28,6 +28,7 @@ criterion = { workspace = true } futures = { workspace = true } json-patch = "4" proptest = { workspace = true, features = ["handle-panics"] } +workspace-hack = { path = "../workspace-hack" } [[bench]] name = "codec" diff --git a/rs/moq-loc/Cargo.toml b/rs/moq-loc/Cargo.toml index 0507e77e3ea..3ee83e561b6 100644 --- a/rs/moq-loc/Cargo.toml +++ b/rs/moq-loc/Cargo.toml @@ -17,5 +17,8 @@ bytes = { workspace = true } moq-net = { workspace = true } thiserror = { workspace = true } +[dev-dependencies] +workspace-hack = { path = "../workspace-hack" } + [lints] workspace = true diff --git a/rs/moq-msf/Cargo.toml b/rs/moq-msf/Cargo.toml index 931c0563b6f..8da5ddeb3ed 100644 --- a/rs/moq-msf/Cargo.toml +++ b/rs/moq-msf/Cargo.toml @@ -17,5 +17,8 @@ serde = { workspace = true } serde_json = { workspace = true } serde_with = { workspace = true } +[dev-dependencies] +workspace-hack = { path = "../workspace-hack" } + [lints] workspace = true diff --git a/rs/moq-mux/Cargo.toml b/rs/moq-mux/Cargo.toml index ff9da615d99..9b4cd6a6b87 100644 --- a/rs/moq-mux/Cargo.toml +++ b/rs/moq-mux/Cargo.toml @@ -52,6 +52,7 @@ moq-clock = { workspace = true, features = ["sim"] } proptest = { workspace = true } tokio = { workspace = true, features = ["test-util"] } tracing-test = { workspace = true, features = ["no-env-filter"] } +workspace-hack = { path = "../workspace-hack" } # The ts_schedule bench pins glibc's heap. [target.'cfg(all(target_os = "linux", target_env = "gnu"))'.dev-dependencies] diff --git a/rs/moq-native/Cargo.toml b/rs/moq-native/Cargo.toml index c9c38e89c14..1b6bc24ea4a 100644 --- a/rs/moq-native/Cargo.toml +++ b/rs/moq-native/Cargo.toml @@ -27,5 +27,8 @@ uds = [] ring = [] android-logcat = [] +[dev-dependencies] +workspace-hack = { path = "../workspace-hack" } + [lints] workspace = true diff --git a/rs/moq-net-tests/Cargo.toml b/rs/moq-net-tests/Cargo.toml index 73fe5cb3933..8d187629362 100644 --- a/rs/moq-net-tests/Cargo.toml +++ b/rs/moq-net-tests/Cargo.toml @@ -19,6 +19,7 @@ moq-json = { path = "../moq-json" } moq-net = { path = "../moq-net", features = ["fuzz"] } serde_json = { workspace = true } tokio = { workspace = true, features = ["rt"] } +workspace-hack = { path = "../workspace-hack" } [lints] workspace = true diff --git a/rs/moq-nvenc/Cargo.toml b/rs/moq-nvenc/Cargo.toml index a608e0681a7..02853b48f65 100644 --- a/rs/moq-nvenc/Cargo.toml +++ b/rs/moq-nvenc/Cargo.toml @@ -21,5 +21,8 @@ cudarc = { workspace = true } libloading = { workspace = true } thiserror = { workspace = true } +[dev-dependencies] +workspace-hack = { path = "../workspace-hack" } + [lints] workspace = true diff --git a/rs/moq-pattern/Cargo.toml b/rs/moq-pattern/Cargo.toml index 02ee8784381..e9e42a5b320 100644 --- a/rs/moq-pattern/Cargo.toml +++ b/rs/moq-pattern/Cargo.toml @@ -24,6 +24,7 @@ criterion = { workspace = true } # Enable serde so the crate's own tests cover the optional impls in the merge gate. moq-pattern = { path = ".", features = ["serde"] } serde_json = { workspace = true } +workspace-hack = { path = "../workspace-hack" } [[bench]] name = "matching" diff --git a/rs/moq-relay/Cargo.toml b/rs/moq-relay/Cargo.toml index bf0f01f892d..e65dc2b1670 100644 --- a/rs/moq-relay/Cargo.toml +++ b/rs/moq-relay/Cargo.toml @@ -126,6 +126,7 @@ test-env = { path = "../test-env" } time = { workspace = true } tokio = { workspace = true, features = ["test-util"] } tracing-subscriber = { workspace = true } +workspace-hack = { path = "../workspace-hack" } [target.'cfg(target_os = "linux")'.dev-dependencies] # Workers built inside a runtime with a manual clock installed run on that clock. diff --git a/rs/moq-room/Cargo.toml b/rs/moq-room/Cargo.toml index 23bb15d19c4..fb07d0c50db 100644 --- a/rs/moq-room/Cargo.toml +++ b/rs/moq-room/Cargo.toml @@ -24,6 +24,7 @@ thiserror = { workspace = true } [dev-dependencies] moq-tokio = { path = "../moq-tokio", default-features = false, features = ["net"] } tokio = { workspace = true, features = ["macros", "rt", "test-util"] } +workspace-hack = { path = "../workspace-hack" } [lints] workspace = true diff --git a/rs/moq-rtc/Cargo.toml b/rs/moq-rtc/Cargo.toml index e3ec0e5385b..f93493998cd 100644 --- a/rs/moq-rtc/Cargo.toml +++ b/rs/moq-rtc/Cargo.toml @@ -49,6 +49,7 @@ aws-lc-rs = { workspace = true } moq-tokio = { workspace = true, features = ["net", "tcp"] } tokio = { workspace = true, features = ["test-util"] } tracing-test = { workspace = true } +workspace-hack = { path = "../workspace-hack" } [lints] workspace = true diff --git a/rs/moq-rtmp/Cargo.toml b/rs/moq-rtmp/Cargo.toml index 9dc64a44eb4..af3dee34329 100644 --- a/rs/moq-rtmp/Cargo.toml +++ b/rs/moq-rtmp/Cargo.toml @@ -62,6 +62,7 @@ moq-clock = { path = "../moq-clock", features = ["sim"] } moq-tokio = { path = "../moq-tokio", default-features = false, features = ["aws-lc-rs", "net"] } tokio = { workspace = true, features = ["test-util"] } tracing-test = { workspace = true, features = ["no-env-filter"] } +workspace-hack = { path = "../workspace-hack" } [[bench]] name = "chunk_interleaving" diff --git a/rs/moq-rtsp/Cargo.toml b/rs/moq-rtsp/Cargo.toml index 29ffbee6b2f..500d32878e9 100644 --- a/rs/moq-rtsp/Cargo.toml +++ b/rs/moq-rtsp/Cargo.toml @@ -41,6 +41,7 @@ base64 = { workspace = true } moq-clock = { path = "../moq-clock", features = ["manual"] } tokio = { workspace = true, features = ["full", "test-util"] } tracing-test = { workspace = true, features = ["no-env-filter"] } +workspace-hack = { path = "../workspace-hack" } [lints] workspace = true diff --git a/rs/moq-scene/Cargo.toml b/rs/moq-scene/Cargo.toml index 1fc6845e0ba..bd89113eba6 100644 --- a/rs/moq-scene/Cargo.toml +++ b/rs/moq-scene/Cargo.toml @@ -51,6 +51,7 @@ tracing = { workspace = true } [dev-dependencies] tempfile = { workspace = true } tokio = { workspace = true, features = ["macros", "rt", "test-util"] } +workspace-hack = { path = "../workspace-hack" } [lints] workspace = true diff --git a/rs/moq-shaper/Cargo.toml b/rs/moq-shaper/Cargo.toml index 54184d88d4a..8ec32fa132e 100644 --- a/rs/moq-shaper/Cargo.toml +++ b/rs/moq-shaper/Cargo.toml @@ -34,6 +34,7 @@ toml = { workspace = true } [dev-dependencies] tokio = { workspace = true, features = ["test-util"] } +workspace-hack = { path = "../workspace-hack" } [lints] workspace = true diff --git a/rs/moq-sock/Cargo.toml b/rs/moq-sock/Cargo.toml index 839c1fb9022..12f90ebce3e 100644 --- a/rs/moq-sock/Cargo.toml +++ b/rs/moq-sock/Cargo.toml @@ -32,6 +32,7 @@ cfg_aliases = "0.2" [dev-dependencies] rand = "0.10" tracing-test = "0.2" +workspace-hack = { path = "../workspace-hack" } [lints] workspace = true diff --git a/rs/moq-srt/Cargo.toml b/rs/moq-srt/Cargo.toml index 265cef7bf79..15a245a974c 100644 --- a/rs/moq-srt/Cargo.toml +++ b/rs/moq-srt/Cargo.toml @@ -30,6 +30,7 @@ tracing = { workspace = true } hang = { path = "../hang" } srt-protocol = "0.4" tracing-test = { workspace = true, features = ["no-env-filter"] } +workspace-hack = { path = "../workspace-hack" } [lints] workspace = true diff --git a/rs/moq-stats/Cargo.toml b/rs/moq-stats/Cargo.toml index 194ebd6f839..1353b6f578c 100644 --- a/rs/moq-stats/Cargo.toml +++ b/rs/moq-stats/Cargo.toml @@ -33,6 +33,7 @@ web-async = { workspace = true } criterion = { workspace = true } futures = { workspace = true } tokio = { workspace = true, features = ["macros", "rt", "test-util", "time"] } +workspace-hack = { path = "../workspace-hack" } [[bench]] name = "decode" diff --git a/rs/moq-studio/Cargo.toml b/rs/moq-studio/Cargo.toml index 348f39d50f2..da911290044 100644 --- a/rs/moq-studio/Cargo.toml +++ b/rs/moq-studio/Cargo.toml @@ -60,6 +60,7 @@ usage-rs = { workspace = true, features = ["completions", "config"] } [dev-dependencies] moq-relay = { path = "../moq-relay", default-features = false, features = ["test-support"] } tempfile = { workspace = true } +workspace-hack = { path = "../workspace-hack" } [lints] workspace = true diff --git a/rs/moq-uring/Cargo.toml b/rs/moq-uring/Cargo.toml index 092b17e6058..c7dbaadc46a 100644 --- a/rs/moq-uring/Cargo.toml +++ b/rs/moq-uring/Cargo.toml @@ -58,6 +58,7 @@ moq-net = { path = "../moq-net" } thiserror = { workspace = true } tokio = { workspace = true, features = ["macros", "net", "rt", "sync", "time"] } web-transport-trait = { workspace = true } +workspace-hack = { path = "../workspace-hack" } [target.'cfg(target_os = "linux")'.dev-dependencies] io-uring = { workspace = true } diff --git a/rs/moq-v4l/Cargo.toml b/rs/moq-v4l/Cargo.toml index 5e8c23eb269..e48891634aa 100644 --- a/rs/moq-v4l/Cargo.toml +++ b/rs/moq-v4l/Cargo.toml @@ -16,5 +16,8 @@ categories = ["multimedia::video", "os::linux-apis"] bitflags = { workspace = true } libc = { workspace = true } +[dev-dependencies] +workspace-hack = { path = "../workspace-hack" } + [lints] workspace = true diff --git a/rs/moq-wasm/Cargo.toml b/rs/moq-wasm/Cargo.toml index 17e1b9c5f24..eb37e29b4e7 100644 --- a/rs/moq-wasm/Cargo.toml +++ b/rs/moq-wasm/Cargo.toml @@ -47,6 +47,7 @@ bytes = { workspace = true } moq-net = { path = "../moq-net" } thiserror = { workspace = true } web-transport-trait = { workspace = true } +workspace-hack = { path = "../workspace-hack" } [lints] workspace = true diff --git a/rs/qmux/Cargo.toml b/rs/qmux/Cargo.toml index 5042b92682b..0449fbbf6a9 100644 --- a/rs/qmux/Cargo.toml +++ b/rs/qmux/Cargo.toml @@ -46,6 +46,7 @@ qmux06 = { package = "qmux", version = "0.6.3", default-features = false, featur tokio = { workspace = true, features = ["full", "test-util"] } # The 0.6 release's stream API, for driving it in the interop tests. web-transport-trait = { workspace = true } +workspace-hack = { path = "../workspace-hack" } [[example]] name = "interop-client" diff --git a/rs/test-env/Cargo.toml b/rs/test-env/Cargo.toml index 2365060b4c6..1765a9aba4a 100644 --- a/rs/test-env/Cargo.toml +++ b/rs/test-env/Cargo.toml @@ -10,3 +10,6 @@ edition = "2024" rust-version.workspace = true publish = false + +[dev-dependencies] +workspace-hack = { path = "../workspace-hack" } diff --git a/rs/uniffi-bindgen/Cargo.toml b/rs/uniffi-bindgen/Cargo.toml index 448ea829e81..f4c43377d56 100644 --- a/rs/uniffi-bindgen/Cargo.toml +++ b/rs/uniffi-bindgen/Cargo.toml @@ -23,5 +23,8 @@ cli = ["dep:uniffi"] # published package has no git dependencies. uniffi = { git = "https://github.com/kixelated/uniffi-rs", rev = "88d835d", features = ["cli"], optional = true } +[dev-dependencies] +workspace-hack = { path = "../workspace-hack" } + [lints] workspace = true diff --git a/rs/workspace-hack/.gitattributes b/rs/workspace-hack/.gitattributes new file mode 100644 index 00000000000..3e9dba4b64b --- /dev/null +++ b/rs/workspace-hack/.gitattributes @@ -0,0 +1,4 @@ +# Avoid putting conflict markers in the generated Cargo.toml file, since their presence breaks +# Cargo. +# Also do not check out the file as CRLF on Windows, as that's what hakari needs. +Cargo.toml merge=binary -crlf diff --git a/rs/workspace-hack/Cargo.toml b/rs/workspace-hack/Cargo.toml new file mode 100644 index 00000000000..7558b1d7670 --- /dev/null +++ b/rs/workspace-hack/Cargo.toml @@ -0,0 +1,561 @@ +# This file is generated by `cargo hakari`. +# To regenerate, run: +# cargo hakari generate + +# Every member dev-depends on this crate by path (`sh/rs/hakari.py` checks), so +# a test or lint build compiles each third-party crate with one feature set +# whichever packages it selects, and mbx reuses that build across jobs. +# `cargo publish` strips path-only dev-dependencies, so it is never published. +[package] +name = "workspace-hack" +description = "Media over QUIC - One feature set per dependency, managed by cargo hakari" +authors = ["Luke Curley "] +repository = "https://github.com/moq-dev/moq" +license = "MIT OR Apache-2.0" + +version = "0.1.0" +edition = "2024" +rust-version.workspace = true + +publish = false + +# The parts of the file between the BEGIN HAKARI SECTION and END HAKARI SECTION comments +# are managed by hakari. + +### BEGIN HAKARI SECTION +[dependencies] +anyhow = { version = "1", features = ["backtrace"] } +aws-lc-rs = { version = "1", features = ["prebuilt-nasm"] } +aws-lc-sys = { version = "0.46", default-features = false, features = ["prebuilt-nasm"] } +axum = { version = "0.8", default-features = false, features = ["form", "http1", "json", "matched-path", "original-uri", "query", "tracing", "ws"] } +base16ct = { version = "1", default-features = false, features = ["alloc"] } +base64 = { version = "0.23" } +bitflags = { version = "2", default-features = false, features = ["std"] } +bytemuck = { version = "1", default-features = false, features = ["derive", "extern_crate_alloc", "min_const_generics"] } +byteorder = { version = "1" } +bytes = { version = "1", features = ["serde"] } +camino = { version = "1", default-features = false, features = ["serde1"] } +chrono = { version = "0.4", features = ["serde"] } +clap = { version = "4", features = ["cargo", "derive"] } +clap_builder = { version = "4", default-features = false, features = ["cargo", "color", "help", "std", "suggestions", "usage"] } +const-oid = { version = "0.9", default-features = false, features = ["db"] } +cpal = { version = "0.18", features = ["pipewire", "pulseaudio"] } +crc32fast = { version = "1" } +crossbeam-epoch = { version = "0.9" } +crossbeam-utils = { version = "0.8" } +crypto-common-6f8ce4dd05d13bba = { package = "crypto-common", version = "0.2", default-features = false, features = ["getrandom"] } +crypto-common-c65f7effa3be6d31 = { package = "crypto-common", version = "0.1", default-features = false, features = ["std"] } +ctutils = { version = "0.4", default-features = false, features = ["subtle"] } +data-encoding = { version = "2" } +der-c38e5c1d305a1b54 = { package = "der", version = "0.8", default-features = false, features = ["oid", "pem", "std"] } +der-ca01ad9e24f5d932 = { package = "der", version = "0.7", default-features = false, features = ["derive", "flagset", "oid", "pem", "std"] } +derive_more = { version = "2", features = ["add", "add_assign", "debug", "deref", "deref_mut", "display", "error", "from", "from_str", "into_iterator", "try_into"] } +digest-93f6ce9d446188ac = { package = "digest", version = "0.10", features = ["mac", "oid", "std"] } +digest-a6292c17cd707f01 = { package = "digest", version = "0.11", features = ["alloc", "mac", "oid", "rand_core"] } +either = { version = "1", features = ["use_std"] } +fastrand = { version = "2", features = ["js"] } +flate2 = { version = "1", features = ["zlib-rs"] } +flume = { version = "0.12" } +foldhash = { version = "0.2" } +form_urlencoded = { version = "1" } +fs-err = { version = "3", default-features = false, features = ["tokio"] } +futures-channel = { version = "0.3", features = ["sink"] } +futures-core = { version = "0.3" } +futures-executor = { version = "0.3" } +futures-io = { version = "0.3" } +futures-sink = { version = "0.3" } +futures-task = { version = "0.3", default-features = false, features = ["std"] } +futures-util = { version = "0.3", features = ["channel", "io", "sink"] } +getrandom-6f8ce4dd05d13bba = { package = "getrandom", version = "0.2", default-features = false, features = ["std"] } +getrandom-9fbad63c4bcf4a8f = { package = "getrandom", version = "0.4", default-features = false, features = ["std", "sys_rng"] } +hashbrown = { version = "0.17", default-features = false, features = ["default-hasher", "inline-more"] } +hex = { version = "0.4" } +hmac = { version = "0.12", default-features = false, features = ["reset"] } +hybrid-array = { version = "0.4", default-features = false, features = ["alloc", "subtle", "zeroize"] } +hyper = { version = "1", features = ["full"] } +hyper-util = { version = "0.1", features = ["server-auto", "service", "tokio"] } +indexmap = { version = "2", features = ["serde"] } +lazy_static = { version = "1", default-features = false, features = ["spin_no_std"] } +log = { version = "0.4", default-features = false, features = ["std"] } +md-5-93f6ce9d446188ac = { package = "md-5", version = "0.10" } +md-5-a6292c17cd707f01 = { package = "md-5", version = "0.11" } +memchr = { version = "2" } +mio = { version = "1", features = ["net", "os-ext"] } +nom-181b0d20215bb231 = { package = "nom", version = "8" } +num-bigint = { version = "0.4" } +num-complex = { version = "0.4" } +num-integer = { version = "0.1", features = ["i128"] } +num-iter = { version = "0.1", default-features = false, features = ["i128", "std"] } +num-traits = { version = "0.2", features = ["i128", "libm"] } +object_store = { version = "0.14", default-features = false, features = ["aws", "azure", "fs", "gcp"] } +once_cell = { version = "1" } +percent-encoding = { version = "2" } +pkcs1 = { version = "0.7", default-features = false, features = ["pem", "pkcs8", "std"] } +pkcs8-93f6ce9d446188ac = { package = "pkcs8", version = "0.10", default-features = false, features = ["pem", "std"] } +pkcs8-a6292c17cd707f01 = { package = "pkcs8", version = "0.11", default-features = false, features = ["pem", "std"] } +portable-atomic = { version = "1", features = ["serde"] } +postcard = { version = "1", default-features = false, features = ["experimental-derive", "use-std"] } +ppv-lite86 = { version = "0.2", default-features = false, features = ["simd", "std"] } +proptest = { version = "1", default-features = false, features = ["handle-panics"] } +rand-274715c4dabd11b0 = { package = "rand", version = "0.9" } +rand-c38e5c1d305a1b54 = { package = "rand", version = "0.8" } +rand_chacha = { version = "0.3", default-features = false, features = ["std"] } +rcgen = { version = "0.14", default-features = false, features = ["aws_lc_rs", "pem", "ring", "x509-parser"] } +regex = { version = "1" } +regex-automata = { version = "0.4", default-features = false, features = ["dfa-build", "dfa-onepass", "hybrid", "meta", "nfa-backtrack", "perf-inline", "perf-literal", "std", "unicode"] } +regex-syntax = { version = "0.8" } +reqwest = { version = "0.13", default-features = false, features = ["gzip", "http2", "json", "rustls", "rustls-no-provider", "stream"] } +rustls = { version = "0.23", features = ["ring"] } +rustls-pki-types = { version = "1", features = ["std"] } +rustls-webpki = { version = "0.103", features = ["aws-lc-rs", "ring"] } +semver = { version = "1", features = ["serde"] } +serde = { version = "1", features = ["alloc", "derive", "rc"] } +serde_core = { version = "1", features = ["alloc", "rc"] } +serde_json = { version = "1", features = ["preserve_order", "raw_value", "unbounded_depth"] } +serde_spanned = { version = "1", default-features = false, features = ["serde", "std"] } +serde_with = { version = "3", features = ["base64", "hex", "json"] } +sha1 = { version = "0.10" } +sha2-93f6ce9d446188ac = { package = "sha2", version = "0.10" } +sha2-a6292c17cd707f01 = { package = "sha2", version = "0.11" } +signature-7b89eefb6aaa9bf3 = { package = "signature", version = "3", default-features = false, features = ["alloc", "digest", "rand_core"] } +signature-f595c2ba2a3f28df = { package = "signature", version = "2", default-features = false, features = ["digest", "rand_core", "std"] } +simd-adler32 = { version = "0.3" } +simdutf8 = { version = "0.1", default-features = false, features = ["aarch64_neon", "std"] } +siphasher = { version = "1" } +slab = { version = "0.4" } +smallvec = { version = "1", default-features = false, features = ["const_new", "union", "write"] } +socket2 = { version = "0.6", default-features = false, features = ["all"] } +spin-274715c4dabd11b0 = { package = "spin", version = "0.9" } +spki-c38e5c1d305a1b54 = { package = "spki", version = "0.8", default-features = false, features = ["pem", "std"] } +spki-ca01ad9e24f5d932 = { package = "spki", version = "0.7", default-features = false, features = ["pem", "std"] } +subtle = { version = "2", features = ["const-generics"] } +time = { version = "0.3", features = ["formatting", "local-offset", "macros", "parsing"] } +tokio = { version = "1", features = ["full", "test-util"] } +tokio-rustls = { version = "0.26", default-features = false, features = ["aws-lc-rs", "logging"] } +tokio-tungstenite = { version = "0.30", features = ["rustls-tls-native-roots"] } +tokio-util = { version = "0.7", features = ["codec", "io-util", "rt"] } +toml = { version = "1" } +toml_datetime = { version = "1", features = ["serde"] } +toml_parser = { version = "1" } +tower = { version = "0.5", default-features = false, features = ["make", "util"] } +tracing = { version = "0.1" } +tracing-core = { version = "0.1" } +tracing-subscriber = { version = "0.3", features = ["env-filter", "local-time"] } +tracing-test = { version = "0.2", default-features = false, features = ["no-env-filter"] } +tungstenite = { version = "0.30", default-features = false, features = ["__rustls-tls", "handshake"] } +typenum = { version = "1", default-features = false, features = ["const-generics"] } +url = { version = "2", features = ["serde"] } +usage-argv = { version = "7", default-features = false, features = ["complete", "diagnostics", "help-advanced"] } +usage-rs = { version = "7", features = ["completions", "config"] } +uuid = { version = "1", features = ["js", "v4", "v7"] } +winnow-dff4ba8e3ae991db = { package = "winnow", version = "1", features = ["simd"] } +x509-parser = { version = "0.18", features = ["verify", "verify-aws"] } +zerocopy = { version = "0.8", default-features = false, features = ["derive", "simd"] } +zeroize = { version = "1", features = ["derive"] } + +[build-dependencies] +anyhow = { version = "1", features = ["backtrace"] } +aws-lc-rs = { version = "1", features = ["prebuilt-nasm"] } +aws-lc-sys = { version = "0.46", default-features = false, features = ["prebuilt-nasm"] } +axum = { version = "0.8", default-features = false, features = ["form", "http1", "json", "matched-path", "original-uri", "query", "tracing", "ws"] } +base16ct = { version = "1", default-features = false, features = ["alloc"] } +base64 = { version = "0.23" } +bitflags = { version = "2", default-features = false, features = ["std"] } +bytemuck = { version = "1", default-features = false, features = ["derive", "extern_crate_alloc", "min_const_generics"] } +byteorder = { version = "1" } +bytes = { version = "1", features = ["serde"] } +camino = { version = "1", default-features = false, features = ["serde1"] } +cc = { version = "1", default-features = false, features = ["parallel"] } +chrono = { version = "0.4", features = ["serde"] } +clap = { version = "4", features = ["cargo", "derive"] } +clap_builder = { version = "4", default-features = false, features = ["cargo", "color", "help", "std", "suggestions", "usage"] } +const-oid = { version = "0.9", default-features = false, features = ["db"] } +cpal = { version = "0.18", features = ["pipewire", "pulseaudio"] } +crc32fast = { version = "1" } +crossbeam-epoch = { version = "0.9" } +crossbeam-utils = { version = "0.8" } +crypto-common-6f8ce4dd05d13bba = { package = "crypto-common", version = "0.2", default-features = false, features = ["getrandom"] } +crypto-common-c65f7effa3be6d31 = { package = "crypto-common", version = "0.1", default-features = false, features = ["std"] } +ctutils = { version = "0.4", default-features = false, features = ["subtle"] } +data-encoding = { version = "2" } +der-c38e5c1d305a1b54 = { package = "der", version = "0.8", default-features = false, features = ["oid", "pem", "std"] } +der-ca01ad9e24f5d932 = { package = "der", version = "0.7", default-features = false, features = ["derive", "flagset", "oid", "pem", "std"] } +derive_more = { version = "2", features = ["add", "add_assign", "debug", "deref", "deref_mut", "display", "error", "from", "from_str", "into_iterator", "try_into"] } +derive_more-impl = { version = "2", features = ["add", "add_assign", "debug", "deref", "deref_mut", "display", "error", "from", "from_str", "into_iterator", "try_into"] } +digest-93f6ce9d446188ac = { package = "digest", version = "0.10", features = ["mac", "oid", "std"] } +digest-a6292c17cd707f01 = { package = "digest", version = "0.11", features = ["alloc", "mac", "oid", "rand_core"] } +displaydoc = { version = "0.2" } +either = { version = "1", features = ["use_std"] } +fastrand = { version = "2", features = ["js"] } +flate2 = { version = "1", features = ["zlib-rs"] } +flume = { version = "0.12" } +foldhash = { version = "0.2" } +form_urlencoded = { version = "1" } +fs-err = { version = "3", default-features = false, features = ["tokio"] } +futures-channel = { version = "0.3", features = ["sink"] } +futures-core = { version = "0.3" } +futures-executor = { version = "0.3" } +futures-io = { version = "0.3" } +futures-sink = { version = "0.3" } +futures-task = { version = "0.3", default-features = false, features = ["std"] } +futures-util = { version = "0.3", features = ["channel", "io", "sink"] } +getrandom-6f8ce4dd05d13bba = { package = "getrandom", version = "0.2", default-features = false, features = ["std"] } +getrandom-9fbad63c4bcf4a8f = { package = "getrandom", version = "0.4", default-features = false, features = ["std", "sys_rng"] } +hashbrown = { version = "0.17", default-features = false, features = ["default-hasher", "inline-more"] } +hex = { version = "0.4" } +hmac = { version = "0.12", default-features = false, features = ["reset"] } +hybrid-array = { version = "0.4", default-features = false, features = ["alloc", "subtle", "zeroize"] } +hyper = { version = "1", features = ["full"] } +hyper-util = { version = "0.1", features = ["server-auto", "service", "tokio"] } +indexmap = { version = "2", features = ["serde"] } +lazy_static = { version = "1", default-features = false, features = ["spin_no_std"] } +log = { version = "0.4", default-features = false, features = ["std"] } +md-5-93f6ce9d446188ac = { package = "md-5", version = "0.10" } +md-5-a6292c17cd707f01 = { package = "md-5", version = "0.11" } +memchr = { version = "2" } +mio = { version = "1", features = ["net", "os-ext"] } +nom-181b0d20215bb231 = { package = "nom", version = "8" } +num-bigint = { version = "0.4" } +num-complex = { version = "0.4" } +num-integer = { version = "0.1", features = ["i128"] } +num-iter = { version = "0.1", default-features = false, features = ["i128", "std"] } +num-traits = { version = "0.2", features = ["i128", "libm"] } +object_store = { version = "0.14", default-features = false, features = ["aws", "azure", "fs", "gcp"] } +once_cell = { version = "1" } +percent-encoding = { version = "2" } +pkcs1 = { version = "0.7", default-features = false, features = ["pem", "pkcs8", "std"] } +pkcs8-93f6ce9d446188ac = { package = "pkcs8", version = "0.10", default-features = false, features = ["pem", "std"] } +pkcs8-a6292c17cd707f01 = { package = "pkcs8", version = "0.11", default-features = false, features = ["pem", "std"] } +portable-atomic = { version = "1", features = ["serde"] } +postcard = { version = "1", default-features = false, features = ["experimental-derive", "use-std"] } +ppv-lite86 = { version = "0.2", default-features = false, features = ["simd", "std"] } +proc-macro2 = { version = "1" } +proptest = { version = "1", default-features = false, features = ["handle-panics"] } +quote = { version = "1" } +rand-274715c4dabd11b0 = { package = "rand", version = "0.9" } +rand-c38e5c1d305a1b54 = { package = "rand", version = "0.8" } +rand_chacha = { version = "0.3", default-features = false, features = ["std"] } +rcgen = { version = "0.14", default-features = false, features = ["aws_lc_rs", "pem", "ring", "x509-parser"] } +regex = { version = "1" } +regex-automata = { version = "0.4", default-features = false, features = ["dfa-build", "dfa-onepass", "hybrid", "meta", "nfa-backtrack", "perf-inline", "perf-literal", "std", "unicode"] } +regex-syntax = { version = "0.8" } +reqwest = { version = "0.13", default-features = false, features = ["gzip", "http2", "json", "rustls", "rustls-no-provider", "stream"] } +rustls = { version = "0.23", features = ["ring"] } +rustls-pki-types = { version = "1", features = ["std"] } +rustls-webpki = { version = "0.103", features = ["aws-lc-rs", "ring"] } +semver = { version = "1", features = ["serde"] } +serde = { version = "1", features = ["alloc", "derive", "rc"] } +serde_core = { version = "1", features = ["alloc", "rc"] } +serde_json = { version = "1", features = ["preserve_order", "raw_value", "unbounded_depth"] } +serde_spanned = { version = "1", default-features = false, features = ["serde", "std"] } +serde_with = { version = "3", features = ["base64", "hex", "json"] } +sha1 = { version = "0.10" } +sha2-93f6ce9d446188ac = { package = "sha2", version = "0.10" } +sha2-a6292c17cd707f01 = { package = "sha2", version = "0.11" } +signature-7b89eefb6aaa9bf3 = { package = "signature", version = "3", default-features = false, features = ["alloc", "digest", "rand_core"] } +signature-f595c2ba2a3f28df = { package = "signature", version = "2", default-features = false, features = ["digest", "rand_core", "std"] } +simd-adler32 = { version = "0.3" } +simdutf8 = { version = "0.1", default-features = false, features = ["aarch64_neon", "std"] } +siphasher = { version = "1" } +slab = { version = "0.4" } +smallvec = { version = "1", default-features = false, features = ["const_new", "union", "write"] } +socket2 = { version = "0.6", default-features = false, features = ["all"] } +spin-274715c4dabd11b0 = { package = "spin", version = "0.9" } +spki-c38e5c1d305a1b54 = { package = "spki", version = "0.8", default-features = false, features = ["pem", "std"] } +spki-ca01ad9e24f5d932 = { package = "spki", version = "0.7", default-features = false, features = ["pem", "std"] } +subtle = { version = "2", features = ["const-generics"] } +syn-7b89eefb6aaa9bf3 = { package = "syn", version = "3", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] } +syn-f595c2ba2a3f28df = { package = "syn", version = "2", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] } +time = { version = "0.3", features = ["formatting", "local-offset", "macros", "parsing"] } +tokio = { version = "1", features = ["full", "test-util"] } +tokio-rustls = { version = "0.26", default-features = false, features = ["aws-lc-rs", "logging"] } +tokio-tungstenite = { version = "0.30", features = ["rustls-tls-native-roots"] } +tokio-util = { version = "0.7", features = ["codec", "io-util", "rt"] } +toml = { version = "1" } +toml_datetime = { version = "1", features = ["serde"] } +toml_parser = { version = "1" } +tower = { version = "0.5", default-features = false, features = ["make", "util"] } +tracing = { version = "0.1" } +tracing-core = { version = "0.1" } +tracing-subscriber = { version = "0.3", features = ["env-filter", "local-time"] } +tracing-test = { version = "0.2", default-features = false, features = ["no-env-filter"] } +tracing-test-macro = { version = "0.2", default-features = false, features = ["no-env-filter"] } +tungstenite = { version = "0.30", default-features = false, features = ["__rustls-tls", "handshake"] } +typenum = { version = "1", default-features = false, features = ["const-generics"] } +url = { version = "2", features = ["serde"] } +usage-argv = { version = "7", default-features = false, features = ["complete", "diagnostics", "help-advanced"] } +usage-rs = { version = "7", features = ["completions", "config"] } +uuid = { version = "1", features = ["js", "v4", "v7"] } +winnow-ca01ad9e24f5d932 = { package = "winnow", version = "0.7" } +winnow-dff4ba8e3ae991db = { package = "winnow", version = "1", features = ["simd"] } +x509-parser = { version = "0.18", features = ["verify", "verify-aws"] } +zerocopy = { version = "0.8", default-features = false, features = ["derive", "simd"] } +zeroize = { version = "1", features = ["derive"] } + +[target.aarch64-apple-darwin.dependencies] +arrayvec = { version = "0.7" } +block2 = { version = "0.6" } +dispatch2 = { version = "0.3" } +errno = { version = "0.3" } +half = { version = "2", features = ["num-traits"] } +hyper-rustls = { version = "0.27", default-features = false, features = ["aws-lc-rs", "http1", "http2", "tls12"] } +hyper-util = { version = "0.1", default-features = false, features = ["client-legacy", "client-proxy"] } +image = { version = "0.25", default-features = false, features = ["jpeg", "png", "tiff"] } +libc = { version = "0.2", features = ["extra_traits"] } +miniz_oxide = { version = "0.8", features = ["simd"] } +objc2 = { version = "0.6" } +objc2-core-audio = { version = "0.3", default-features = false, features = ["AudioHardware", "AudioHardwareDeprecated", "objc2", "objc2-core-audio-types", "objc2-foundation", "std"] } +objc2-core-audio-types = { version = "0.3" } +objc2-core-foundation = { version = "0.3", features = ["CFBase"] } +objc2-core-graphics = { version = "0.3" } +objc2-core-video = { version = "0.3" } +objc2-foundation = { version = "0.3" } +objc2-metal = { version = "0.3" } +objc2-quartz-core = { version = "0.3", default-features = false, features = ["CALayer", "CAMediaTiming", "CAMetalLayer", "objc2-core-foundation", "objc2-core-graphics", "objc2-metal", "std"] } +quick-xml-b32c9ddb6d93a9d2 = { package = "quick-xml", version = "0.42", features = ["serialize"] } +rustix = { version = "1", features = ["event", "fs", "net", "pipe", "process", "termios", "time"] } +security-framework-sys = { version = "2" } +spin-93f6ce9d446188ac = { package = "spin", version = "0.10", default-features = false, features = ["once", "rwlock", "spin_mutex"] } +tokio-rustls = { version = "0.26", default-features = false, features = ["tls12"] } +tower = { version = "0.5", default-features = false, features = ["retry", "timeout"] } +tower-http = { version = "0.6", default-features = false, features = ["decompression-gzip", "follow-redirect"] } +tracing = { version = "0.1", default-features = false, features = ["log"] } +wgpu = { version = "30", features = ["fragile-send-sync-non-atomic-wasm", "webgl"] } +wgpu-core = { version = "30", features = ["dx12", "fragile-send-sync-non-atomic-wasm", "gles", "metal", "portable-atomic", "renderdoc", "vulkan", "webgl", "wgsl"] } +wgpu-hal = { version = "30", default-features = false, features = ["fragile-send-sync-non-atomic-wasm", "metal", "portable-atomic"] } +wgpu-types = { version = "30", default-features = false, features = ["fragile-send-sync-non-atomic-wasm", "std", "web"] } +winit = { version = "0.30" } + +[target.aarch64-apple-darwin.build-dependencies] +arrayvec = { version = "0.7" } +block2 = { version = "0.6" } +dispatch2 = { version = "0.3" } +errno = { version = "0.3" } +half = { version = "2", features = ["num-traits"] } +hyper-rustls = { version = "0.27", default-features = false, features = ["aws-lc-rs", "http1", "http2", "tls12"] } +hyper-util = { version = "0.1", default-features = false, features = ["client-legacy", "client-proxy"] } +image = { version = "0.25", default-features = false, features = ["jpeg", "png", "tiff"] } +libc = { version = "0.2", features = ["extra_traits"] } +miniz_oxide = { version = "0.8", features = ["simd"] } +objc2 = { version = "0.6" } +objc2-core-audio = { version = "0.3", default-features = false, features = ["AudioHardware", "AudioHardwareDeprecated", "objc2", "objc2-core-audio-types", "objc2-foundation", "std"] } +objc2-core-audio-types = { version = "0.3" } +objc2-core-foundation = { version = "0.3", features = ["CFBase"] } +objc2-core-graphics = { version = "0.3" } +objc2-core-video = { version = "0.3" } +objc2-foundation = { version = "0.3" } +objc2-metal = { version = "0.3" } +objc2-quartz-core = { version = "0.3", default-features = false, features = ["CALayer", "CAMediaTiming", "CAMetalLayer", "objc2-core-foundation", "objc2-core-graphics", "objc2-metal", "std"] } +quick-xml-b32c9ddb6d93a9d2 = { package = "quick-xml", version = "0.42", features = ["serialize"] } +rustix = { version = "1", features = ["event", "fs", "net", "pipe", "process", "termios", "time"] } +security-framework-sys = { version = "2" } +spin-93f6ce9d446188ac = { package = "spin", version = "0.10", default-features = false, features = ["once", "rwlock", "spin_mutex"] } +tokio-rustls = { version = "0.26", default-features = false, features = ["tls12"] } +tower = { version = "0.5", default-features = false, features = ["retry", "timeout"] } +tower-http = { version = "0.6", default-features = false, features = ["decompression-gzip", "follow-redirect"] } +tracing = { version = "0.1", default-features = false, features = ["log"] } +wgpu = { version = "30", features = ["fragile-send-sync-non-atomic-wasm", "webgl"] } +wgpu-core = { version = "30", features = ["dx12", "fragile-send-sync-non-atomic-wasm", "gles", "metal", "portable-atomic", "renderdoc", "vulkan", "webgl", "wgsl"] } +wgpu-hal = { version = "30", default-features = false, features = ["fragile-send-sync-non-atomic-wasm", "metal", "portable-atomic"] } +wgpu-types = { version = "30", default-features = false, features = ["fragile-send-sync-non-atomic-wasm", "std", "web"] } +winit = { version = "0.30" } + +[target.aarch64-unknown-linux-gnu.dependencies] +arrayvec = { version = "0.7" } +bytemuck = { version = "1", default-features = false, features = ["aarch64_simd"] } +cudarc = { version = "0.19", default-features = false, features = ["cuda-12020", "driver", "fallback-dynamic-loading", "nvrtc"] } +event-listener = { version = "5" } +event-listener-strategy = { version = "0.5" } +futures-lite = { version = "2" } +getrandom-468e82937335b1c9 = { package = "getrandom", version = "0.3", default-features = false, features = ["std"] } +half = { version = "2", default-features = false, features = ["num-traits"] } +hyper-rustls = { version = "0.27", default-features = false, features = ["aws-lc-rs", "http1", "http2", "tls12"] } +hyper-util = { version = "0.1", default-features = false, features = ["client-legacy", "client-proxy"] } +itertools = { version = "0.13" } +libc = { version = "0.2", features = ["extra_traits"] } +libspa = { version = "0.10", default-features = false, features = ["v0_3_33"] } +linux-raw-sys = { version = "0.12", features = ["auxvec", "elf", "if_ether", "ioctl", "net", "netlink", "no_std", "prctl", "system", "xdp"] } +log = { version = "0.4", default-features = false, features = ["release_max_level_debug"] } +miniz_oxide = { version = "0.8", features = ["simd"] } +nix = { version = "0.31", features = ["net", "uio"] } +nom-15128469a54ed75a = { package = "nom", version = "7" } +pipewire = { version = "0.10", default-features = false, features = ["v0_3_53"] } +proc-macro2 = { version = "1" } +quick-xml-4beaf6d1349630b6 = { package = "quick-xml", version = "0.41", features = ["overlapped-lists", "serialize"] } +quote = { version = "1" } +rustc-hash = { version = "1" } +rustix = { version = "1", features = ["event", "net", "param", "pipe", "process", "shm", "system", "termios", "thread", "time"] } +spin-93f6ce9d446188ac = { package = "spin", version = "0.10", default-features = false, features = ["once", "rwlock", "spin_mutex"] } +syn-7b89eefb6aaa9bf3 = { package = "syn", version = "3", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] } +tokio = { version = "1", default-features = false, features = ["tracing"] } +tokio-rustls = { version = "0.26", default-features = false, features = ["tls12"] } +tower = { version = "0.5", default-features = false, features = ["retry", "timeout"] } +tower-http = { version = "0.6", default-features = false, features = ["decompression-gzip", "follow-redirect"] } +tracing = { version = "0.1", default-features = false, features = ["log"] } +uuid = { version = "1", default-features = false, features = ["serde"] } +wgpu = { version = "30", features = ["fragile-send-sync-non-atomic-wasm", "webgl"] } +wgpu-core = { version = "30", features = ["dx12", "fragile-send-sync-non-atomic-wasm", "gles", "metal", "portable-atomic", "renderdoc", "vulkan", "webgl", "wgsl"] } +wgpu-hal = { version = "30", default-features = false, features = ["dx12", "fragile-send-sync-non-atomic-wasm", "gles", "portable-atomic", "renderdoc", "vulkan"] } +wgpu-types = { version = "30", default-features = false, features = ["fragile-send-sync-non-atomic-wasm", "std", "web"] } +winit = { version = "0.30" } + +[target.aarch64-unknown-linux-gnu.build-dependencies] +arrayvec = { version = "0.7" } +bytemuck = { version = "1", default-features = false, features = ["aarch64_simd"] } +clang-sys = { version = "1", default-features = false, features = ["clang_11_0", "runtime"] } +cudarc = { version = "0.19", default-features = false, features = ["cuda-12020", "driver", "fallback-dynamic-loading", "nvrtc"] } +event-listener = { version = "5" } +event-listener-strategy = { version = "0.5" } +futures-lite = { version = "2" } +getrandom-468e82937335b1c9 = { package = "getrandom", version = "0.3", default-features = false, features = ["std"] } +half = { version = "2", default-features = false, features = ["num-traits"] } +hyper-rustls = { version = "0.27", default-features = false, features = ["aws-lc-rs", "http1", "http2", "tls12"] } +hyper-util = { version = "0.1", default-features = false, features = ["client-legacy", "client-proxy"] } +itertools = { version = "0.13" } +libc = { version = "0.2", features = ["extra_traits"] } +libspa = { version = "0.10", default-features = false, features = ["v0_3_33"] } +linux-raw-sys = { version = "0.12", features = ["auxvec", "elf", "if_ether", "ioctl", "net", "netlink", "no_std", "prctl", "system", "xdp"] } +log = { version = "0.4", default-features = false, features = ["release_max_level_debug"] } +miniz_oxide = { version = "0.8", features = ["simd"] } +nix = { version = "0.31", features = ["net", "uio"] } +nom-15128469a54ed75a = { package = "nom", version = "7" } +pipewire = { version = "0.10", default-features = false, features = ["v0_3_53"] } +quick-xml-4beaf6d1349630b6 = { package = "quick-xml", version = "0.41", features = ["overlapped-lists", "serialize"] } +rustc-hash = { version = "1" } +rustix = { version = "1", features = ["event", "net", "param", "pipe", "process", "shm", "system", "termios", "thread", "time"] } +spin-93f6ce9d446188ac = { package = "spin", version = "0.10", default-features = false, features = ["once", "rwlock", "spin_mutex"] } +tokio = { version = "1", default-features = false, features = ["tracing"] } +tokio-rustls = { version = "0.26", default-features = false, features = ["tls12"] } +tower = { version = "0.5", default-features = false, features = ["retry", "timeout"] } +tower-http = { version = "0.6", default-features = false, features = ["decompression-gzip", "follow-redirect"] } +tracing = { version = "0.1", default-features = false, features = ["log"] } +uuid = { version = "1", default-features = false, features = ["serde"] } +wgpu = { version = "30", features = ["fragile-send-sync-non-atomic-wasm", "webgl"] } +wgpu-core = { version = "30", features = ["dx12", "fragile-send-sync-non-atomic-wasm", "gles", "metal", "portable-atomic", "renderdoc", "vulkan", "webgl", "wgsl"] } +wgpu-hal = { version = "30", default-features = false, features = ["dx12", "fragile-send-sync-non-atomic-wasm", "gles", "portable-atomic", "renderdoc", "vulkan"] } +wgpu-types = { version = "30", default-features = false, features = ["fragile-send-sync-non-atomic-wasm", "std", "web"] } +winit = { version = "0.30" } + +[target.x86_64-pc-windows-msvc.dependencies] +arrayvec = { version = "0.7" } +half = { version = "2", default-features = false, features = ["num-traits"] } +hyper-rustls = { version = "0.27", default-features = false, features = ["aws-lc-rs", "http1", "http2", "tls12"] } +hyper-util = { version = "0.1", default-features = false, features = ["client-legacy", "client-proxy"] } +image = { version = "0.25", default-features = false, features = ["bmp", "jpeg", "png"] } +spin-93f6ce9d446188ac = { package = "spin", version = "0.10", default-features = false, features = ["once", "rwlock", "spin_mutex"] } +tokio-rustls = { version = "0.26", default-features = false, features = ["tls12"] } +tower = { version = "0.5", default-features = false, features = ["retry", "timeout"] } +tower-http = { version = "0.6", default-features = false, features = ["decompression-gzip", "follow-redirect"] } +tracing = { version = "0.1", default-features = false, features = ["log"] } +wgpu = { version = "30", features = ["fragile-send-sync-non-atomic-wasm", "webgl"] } +wgpu-core = { version = "30", features = ["dx12", "fragile-send-sync-non-atomic-wasm", "gles", "metal", "portable-atomic", "renderdoc", "vulkan", "webgl", "wgsl"] } +wgpu-hal = { version = "30", default-features = false, features = ["dx12", "fragile-send-sync-non-atomic-wasm", "gles", "portable-atomic", "renderdoc", "vulkan"] } +wgpu-types = { version = "30", default-features = false, features = ["fragile-send-sync-non-atomic-wasm", "std", "web"] } +winapi = { version = "0.3", default-features = false, features = ["cfg", "evntrace", "in6addr", "inaddr", "minwinbase", "minwindef", "ntsecapi", "processthreadsapi", "sysinfoapi", "winbase", "windef", "winioctl"] } +windows = { version = "0.62", features = ["Foundation_Metadata", "Graphics_Capture", "Graphics_DirectX_Direct3D11", "Security_Authorization_AppCapabilityAccess", "Wdk_System_SystemInformation", "Wdk_System_SystemServices", "Wdk_System_Threading", "Win32_Devices_DeviceAndDriverInstallation", "Win32_Devices_Display", "Win32_Devices_Properties", "Win32_Graphics_Direct3D10", "Win32_Graphics_Direct3D11", "Win32_Graphics_Direct3D12", "Win32_Graphics_Direct3D_Dxc", "Win32_Graphics_Direct3D_Fxc", "Win32_Graphics_DirectComposition", "Win32_Graphics_Dwm", "Win32_Graphics_Dxgi_Common", "Win32_Graphics_Gdi", "Win32_Graphics_OpenGL", "Win32_Media_Audio", "Win32_Media_KernelStreaming", "Win32_Media_MediaFoundation", "Win32_Media_Multimedia", "Win32_NetworkManagement_IpHelper", "Win32_NetworkManagement_Ndis", "Win32_Networking_WinSock", "Win32_Security_Authorization", "Win32_System_Com_StructuredStorage", "Win32_System_Diagnostics_Debug", "Win32_System_Diagnostics_ToolHelp", "Win32_System_Kernel", "Win32_System_LibraryLoader", "Win32_System_Memory", "Win32_System_Ole", "Win32_System_Performance", "Win32_System_Power", "Win32_System_ProcessStatus", "Win32_System_Registry", "Win32_System_RemoteDesktop", "Win32_System_Rpc", "Win32_System_SystemInformation", "Win32_System_SystemServices", "Win32_System_Threading", "Win32_System_Variant", "Win32_System_WinRT_Direct3D11", "Win32_System_WinRT_Graphics_Capture", "Win32_System_Wmi", "Win32_UI_HiDpi", "Win32_UI_Shell_PropertiesSystem", "Win32_UI_WindowsAndMessaging"] } +windows-core = { version = "0.62" } +windows-result = { version = "0.4" } +windows-sys-b21d60becc0929df = { package = "windows-sys", version = "0.52", features = ["Win32_Devices_HumanInterfaceDevice", "Win32_Foundation", "Win32_Globalization", "Win32_Graphics_Dwm", "Win32_Graphics_Gdi", "Win32_Media", "Win32_Networking_WinSock", "Win32_Security", "Win32_System_Com_StructuredStorage", "Win32_System_IO", "Win32_System_LibraryLoader", "Win32_System_Ole", "Win32_System_SystemInformation", "Win32_System_SystemServices", "Win32_System_Threading", "Win32_System_WindowsProgramming", "Win32_UI_Accessibility", "Win32_UI_Controls", "Win32_UI_HiDpi", "Win32_UI_Input_Ime", "Win32_UI_Input_KeyboardAndMouse", "Win32_UI_Input_Pointer", "Win32_UI_Input_Touch", "Win32_UI_Shell", "Win32_UI_TextServices", "Win32_UI_WindowsAndMessaging"] } +windows-sys-d4189bed749088b6 = { package = "windows-sys", version = "0.61", features = ["Wdk_Foundation", "Wdk_Storage_FileSystem", "Wdk_System_IO", "Win32_Graphics_Gdi", "Win32_NetworkManagement_IpHelper", "Win32_NetworkManagement_Ndis", "Win32_Networking_WinSock", "Win32_Security_Authentication_Identity", "Win32_Security_Credentials", "Win32_Security_Cryptography", "Win32_Storage_FileSystem", "Win32_System_Com", "Win32_System_Console", "Win32_System_DataExchange", "Win32_System_Diagnostics_Debug", "Win32_System_IO", "Win32_System_LibraryLoader", "Win32_System_Memory", "Win32_System_Ole", "Win32_System_Pipes", "Win32_System_Registry", "Win32_System_SystemInformation", "Win32_System_SystemServices", "Win32_System_Threading", "Win32_System_WindowsProgramming", "Win32_UI_Input_KeyboardAndMouse", "Win32_UI_Shell", "Win32_UI_WindowsAndMessaging"] } +winit = { version = "0.30" } + +[target.x86_64-pc-windows-msvc.build-dependencies] +arrayvec = { version = "0.7" } +half = { version = "2", default-features = false, features = ["num-traits"] } +hyper-rustls = { version = "0.27", default-features = false, features = ["aws-lc-rs", "http1", "http2", "tls12"] } +hyper-util = { version = "0.1", default-features = false, features = ["client-legacy", "client-proxy"] } +image = { version = "0.25", default-features = false, features = ["bmp", "jpeg", "png"] } +spin-93f6ce9d446188ac = { package = "spin", version = "0.10", default-features = false, features = ["once", "rwlock", "spin_mutex"] } +tokio-rustls = { version = "0.26", default-features = false, features = ["tls12"] } +tower = { version = "0.5", default-features = false, features = ["retry", "timeout"] } +tower-http = { version = "0.6", default-features = false, features = ["decompression-gzip", "follow-redirect"] } +tracing = { version = "0.1", default-features = false, features = ["log"] } +wgpu = { version = "30", features = ["fragile-send-sync-non-atomic-wasm", "webgl"] } +wgpu-core = { version = "30", features = ["dx12", "fragile-send-sync-non-atomic-wasm", "gles", "metal", "portable-atomic", "renderdoc", "vulkan", "webgl", "wgsl"] } +wgpu-hal = { version = "30", default-features = false, features = ["dx12", "fragile-send-sync-non-atomic-wasm", "gles", "portable-atomic", "renderdoc", "vulkan"] } +wgpu-types = { version = "30", default-features = false, features = ["fragile-send-sync-non-atomic-wasm", "std", "web"] } +winapi = { version = "0.3", default-features = false, features = ["cfg", "evntrace", "in6addr", "inaddr", "minwinbase", "minwindef", "ntsecapi", "processthreadsapi", "sysinfoapi", "winbase", "windef", "winioctl"] } +windows = { version = "0.62", features = ["Foundation_Metadata", "Graphics_Capture", "Graphics_DirectX_Direct3D11", "Security_Authorization_AppCapabilityAccess", "Wdk_System_SystemInformation", "Wdk_System_SystemServices", "Wdk_System_Threading", "Win32_Devices_DeviceAndDriverInstallation", "Win32_Devices_Display", "Win32_Devices_Properties", "Win32_Graphics_Direct3D10", "Win32_Graphics_Direct3D11", "Win32_Graphics_Direct3D12", "Win32_Graphics_Direct3D_Dxc", "Win32_Graphics_Direct3D_Fxc", "Win32_Graphics_DirectComposition", "Win32_Graphics_Dwm", "Win32_Graphics_Dxgi_Common", "Win32_Graphics_Gdi", "Win32_Graphics_OpenGL", "Win32_Media_Audio", "Win32_Media_KernelStreaming", "Win32_Media_MediaFoundation", "Win32_Media_Multimedia", "Win32_NetworkManagement_IpHelper", "Win32_NetworkManagement_Ndis", "Win32_Networking_WinSock", "Win32_Security_Authorization", "Win32_System_Com_StructuredStorage", "Win32_System_Diagnostics_Debug", "Win32_System_Diagnostics_ToolHelp", "Win32_System_Kernel", "Win32_System_LibraryLoader", "Win32_System_Memory", "Win32_System_Ole", "Win32_System_Performance", "Win32_System_Power", "Win32_System_ProcessStatus", "Win32_System_Registry", "Win32_System_RemoteDesktop", "Win32_System_Rpc", "Win32_System_SystemInformation", "Win32_System_SystemServices", "Win32_System_Threading", "Win32_System_Variant", "Win32_System_WinRT_Direct3D11", "Win32_System_WinRT_Graphics_Capture", "Win32_System_Wmi", "Win32_UI_HiDpi", "Win32_UI_Shell_PropertiesSystem", "Win32_UI_WindowsAndMessaging"] } +windows-core = { version = "0.62" } +windows-result = { version = "0.4" } +windows-sys-b21d60becc0929df = { package = "windows-sys", version = "0.52", features = ["Win32_Devices_HumanInterfaceDevice", "Win32_Foundation", "Win32_Globalization", "Win32_Graphics_Dwm", "Win32_Graphics_Gdi", "Win32_Media", "Win32_Networking_WinSock", "Win32_Security", "Win32_System_Com_StructuredStorage", "Win32_System_IO", "Win32_System_LibraryLoader", "Win32_System_Ole", "Win32_System_SystemInformation", "Win32_System_SystemServices", "Win32_System_Threading", "Win32_System_WindowsProgramming", "Win32_UI_Accessibility", "Win32_UI_Controls", "Win32_UI_HiDpi", "Win32_UI_Input_Ime", "Win32_UI_Input_KeyboardAndMouse", "Win32_UI_Input_Pointer", "Win32_UI_Input_Touch", "Win32_UI_Shell", "Win32_UI_TextServices", "Win32_UI_WindowsAndMessaging"] } +windows-sys-d4189bed749088b6 = { package = "windows-sys", version = "0.61", features = ["Wdk_Foundation", "Wdk_Storage_FileSystem", "Wdk_System_IO", "Win32_Graphics_Gdi", "Win32_NetworkManagement_IpHelper", "Win32_NetworkManagement_Ndis", "Win32_Networking_WinSock", "Win32_Security_Authentication_Identity", "Win32_Security_Credentials", "Win32_Security_Cryptography", "Win32_Storage_FileSystem", "Win32_System_Com", "Win32_System_Console", "Win32_System_DataExchange", "Win32_System_Diagnostics_Debug", "Win32_System_IO", "Win32_System_LibraryLoader", "Win32_System_Memory", "Win32_System_Ole", "Win32_System_Pipes", "Win32_System_Registry", "Win32_System_SystemInformation", "Win32_System_SystemServices", "Win32_System_Threading", "Win32_System_WindowsProgramming", "Win32_UI_Input_KeyboardAndMouse", "Win32_UI_Shell", "Win32_UI_WindowsAndMessaging"] } +winit = { version = "0.30" } + +[target.x86_64-unknown-linux-gnu.dependencies] +arrayvec = { version = "0.7" } +bytemuck = { version = "1", default-features = false, features = ["aarch64_simd"] } +cudarc = { version = "0.19", default-features = false, features = ["cuda-12020", "driver", "fallback-dynamic-loading", "nvrtc"] } +event-listener = { version = "5" } +event-listener-strategy = { version = "0.5" } +futures-lite = { version = "2" } +getrandom-468e82937335b1c9 = { package = "getrandom", version = "0.3", default-features = false, features = ["std"] } +half = { version = "2", default-features = false, features = ["num-traits"] } +hyper-rustls = { version = "0.27", default-features = false, features = ["aws-lc-rs", "http1", "http2", "tls12"] } +hyper-util = { version = "0.1", default-features = false, features = ["client-legacy", "client-proxy"] } +itertools = { version = "0.13" } +libc = { version = "0.2", features = ["extra_traits"] } +libspa = { version = "0.10", default-features = false, features = ["v0_3_33"] } +linux-raw-sys = { version = "0.12", features = ["auxvec", "elf", "if_ether", "ioctl", "net", "netlink", "no_std", "prctl", "system", "xdp"] } +log = { version = "0.4", default-features = false, features = ["release_max_level_debug"] } +miniz_oxide = { version = "0.8", features = ["simd"] } +nix = { version = "0.31", features = ["net", "uio"] } +nom-15128469a54ed75a = { package = "nom", version = "7" } +pipewire = { version = "0.10", default-features = false, features = ["v0_3_53"] } +proc-macro2 = { version = "1" } +quick-xml-4beaf6d1349630b6 = { package = "quick-xml", version = "0.41", features = ["overlapped-lists", "serialize"] } +quote = { version = "1" } +rustc-hash = { version = "1" } +rustix = { version = "1", features = ["event", "net", "param", "pipe", "process", "shm", "system", "termios", "thread", "time"] } +spin-93f6ce9d446188ac = { package = "spin", version = "0.10", default-features = false, features = ["once", "rwlock", "spin_mutex"] } +syn-7b89eefb6aaa9bf3 = { package = "syn", version = "3", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] } +tokio = { version = "1", default-features = false, features = ["tracing"] } +tokio-rustls = { version = "0.26", default-features = false, features = ["tls12"] } +tower = { version = "0.5", default-features = false, features = ["retry", "timeout"] } +tower-http = { version = "0.6", default-features = false, features = ["decompression-gzip", "follow-redirect"] } +tracing = { version = "0.1", default-features = false, features = ["log"] } +uuid = { version = "1", default-features = false, features = ["serde"] } +wgpu = { version = "30", features = ["fragile-send-sync-non-atomic-wasm", "webgl"] } +wgpu-core = { version = "30", features = ["dx12", "fragile-send-sync-non-atomic-wasm", "gles", "metal", "portable-atomic", "renderdoc", "vulkan", "webgl", "wgsl"] } +wgpu-hal = { version = "30", default-features = false, features = ["dx12", "fragile-send-sync-non-atomic-wasm", "gles", "portable-atomic", "renderdoc", "vulkan"] } +wgpu-types = { version = "30", default-features = false, features = ["fragile-send-sync-non-atomic-wasm", "std", "web"] } +winit = { version = "0.30" } + +[target.x86_64-unknown-linux-gnu.build-dependencies] +arrayvec = { version = "0.7" } +bytemuck = { version = "1", default-features = false, features = ["aarch64_simd"] } +clang-sys = { version = "1", default-features = false, features = ["clang_11_0", "runtime"] } +cudarc = { version = "0.19", default-features = false, features = ["cuda-12020", "driver", "fallback-dynamic-loading", "nvrtc"] } +event-listener = { version = "5" } +event-listener-strategy = { version = "0.5" } +futures-lite = { version = "2" } +getrandom-468e82937335b1c9 = { package = "getrandom", version = "0.3", default-features = false, features = ["std"] } +half = { version = "2", default-features = false, features = ["num-traits"] } +hyper-rustls = { version = "0.27", default-features = false, features = ["aws-lc-rs", "http1", "http2", "tls12"] } +hyper-util = { version = "0.1", default-features = false, features = ["client-legacy", "client-proxy"] } +itertools = { version = "0.13" } +libc = { version = "0.2", features = ["extra_traits"] } +libspa = { version = "0.10", default-features = false, features = ["v0_3_33"] } +linux-raw-sys = { version = "0.12", features = ["auxvec", "elf", "if_ether", "ioctl", "net", "netlink", "no_std", "prctl", "system", "xdp"] } +log = { version = "0.4", default-features = false, features = ["release_max_level_debug"] } +miniz_oxide = { version = "0.8", features = ["simd"] } +nix = { version = "0.31", features = ["net", "uio"] } +nom-15128469a54ed75a = { package = "nom", version = "7" } +pipewire = { version = "0.10", default-features = false, features = ["v0_3_53"] } +quick-xml-4beaf6d1349630b6 = { package = "quick-xml", version = "0.41", features = ["overlapped-lists", "serialize"] } +rustc-hash = { version = "1" } +rustix = { version = "1", features = ["event", "net", "param", "pipe", "process", "shm", "system", "termios", "thread", "time"] } +spin-93f6ce9d446188ac = { package = "spin", version = "0.10", default-features = false, features = ["once", "rwlock", "spin_mutex"] } +tokio = { version = "1", default-features = false, features = ["tracing"] } +tokio-rustls = { version = "0.26", default-features = false, features = ["tls12"] } +tower = { version = "0.5", default-features = false, features = ["retry", "timeout"] } +tower-http = { version = "0.6", default-features = false, features = ["decompression-gzip", "follow-redirect"] } +tracing = { version = "0.1", default-features = false, features = ["log"] } +uuid = { version = "1", default-features = false, features = ["serde"] } +wgpu = { version = "30", features = ["fragile-send-sync-non-atomic-wasm", "webgl"] } +wgpu-core = { version = "30", features = ["dx12", "fragile-send-sync-non-atomic-wasm", "gles", "metal", "portable-atomic", "renderdoc", "vulkan", "webgl", "wgsl"] } +wgpu-hal = { version = "30", default-features = false, features = ["dx12", "fragile-send-sync-non-atomic-wasm", "gles", "portable-atomic", "renderdoc", "vulkan"] } +wgpu-types = { version = "30", default-features = false, features = ["fragile-send-sync-non-atomic-wasm", "std", "web"] } +winit = { version = "0.30" } + +### END HAKARI SECTION diff --git a/rs/workspace-hack/build.rs b/rs/workspace-hack/build.rs new file mode 100644 index 00000000000..92518ef04cb --- /dev/null +++ b/rs/workspace-hack/build.rs @@ -0,0 +1,2 @@ +// A build script is required for cargo to consider build dependencies. +fn main() {} diff --git a/rs/workspace-hack/src/lib.rs b/rs/workspace-hack/src/lib.rs new file mode 100644 index 00000000000..22489f632bd --- /dev/null +++ b/rs/workspace-hack/src/lib.rs @@ -0,0 +1 @@ +// This is a stub lib.rs. diff --git a/sh/rs/hakari.py b/sh/rs/hakari.py new file mode 100755 index 00000000000..de33f75b734 --- /dev/null +++ b/sh/rs/hakari.py @@ -0,0 +1,56 @@ +#!/usr/bin/env python3 +"""Fail when a workspace member's edge to the workspace-hack is missing or wrong. + +The hack is a path-only dev-dependency, so tests and lints share one build of +every third-party crate while `cargo publish` strips it. `cargo hakari +manage-deps` only writes normal dependencies, so this checks the edges instead: +every member dev-depends on the hack, except those `.config/hakari.toml` +excludes, which must not depend on it at all. Run from `just rs lint`. +""" + +import json +import subprocess +import sys +import tomllib +from pathlib import Path + +ROOT = Path(__file__).resolve().parents[2] + +config = tomllib.loads((ROOT / ".config/hakari.toml").read_text()) +hack = config["hakari-package"] +excluded = {hack} +for section in ("final-excludes", "traversal-excludes"): + excluded |= set(config.get(section, {}).get("workspace-members", [])) + +metadata = json.loads( + subprocess.run( + ["cargo", "metadata", "--locked", "--no-deps", "--format-version", "1"], + cwd=ROOT, + check=True, + capture_output=True, + text=True, + ).stdout +) + +errors = [] +for package in metadata["packages"]: + name = package["name"] + edges = [dep for dep in package["dependencies"] if dep["name"] == hack] + manifest = Path(package["manifest_path"]).relative_to(ROOT) + if name in excluded: + if edges: + errors.append(f"{manifest}: {name} is excluded in .config/hakari.toml but depends on {hack}") + continue + # A version requirement would survive `cargo publish` and point at a crate + # that was never published. + if not any(dep["kind"] == "dev" and dep.get("path") and dep["req"] == "*" for dep in edges): + hack_dir = Path(next(p["manifest_path"] for p in metadata["packages"] if p["name"] == hack)).parent + rel = Path(*[".."] * len(manifest.parent.parts)) / hack_dir.relative_to(ROOT) + errors.append(f'{manifest}: add `{hack} = {{ path = "{rel}" }}` under [dev-dependencies]') + for dep in edges: + if dep["kind"] != "dev": + errors.append(f"{manifest}: {hack} must be a dev-dependency only, or publishing {name} fails") + +if errors: + print("\n".join(errors), file=sys.stderr) + sys.exit(1) From 5bb9a8438cd4e20717f0b2b75920b7c74c4aeb73 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 27 Oct 2026 21:42:14 -0700 Subject: [PATCH 03/24] ci: isolate third-party features per crate nightly Co-Authored-By: Claude Opus 5.5 --- rs/justfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rs/justfile b/rs/justfile index 621774f1f95..ac011ef7a8e 100644 --- a/rs/justfile +++ b/rs/justfile @@ -237,6 +237,8 @@ c-tests: # Benchmarks and examples stay in Nightly; the gate compiles the same targets # it tests, with both extremes exercising feature-gated implementation arms. +# Third-party features come from the workspace-hack here; `features` isolates +# those nightly. # Isolate selected packages so a dependent cannot enable a feature that hides a warning. [positional-arguments] @@ -251,6 +253,10 @@ features: just rs tokio-features --all just rs media-features --all bash sh/local.sh cargo check --locked --workspace {{ no_fuzz }} --all-targets --no-default-features + # The workspace-hack is a dev-dependency, so only library and binary builds + # prove that each crate declares the third-party features it uses. + bash sh/local.sh cargo hack check --locked --workspace {{ no_fuzz }} --no-default-features + bash sh/local.sh cargo hack check --locked --workspace {{ no_fuzz }} --all-features bash sh/local.sh cargo hack check --locked -p moq-tokio --each-feature --exclude-features _transport --features aws-lc-rs bash sh/local.sh cargo check --locked -p moq-relay --no-default-features just rs relay-minimal From a1b9b437ef82f86df207aea6e1cb55d22343f93f Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 27 Oct 2026 21:42:58 -0700 Subject: [PATCH 04/24] chore(quest): narrow hakari to the FFI builds and hosted numbers Co-Authored-By: Claude Opus 5.5 --- quest/m0/ci/README.md | 2 +- quest/m0/ci/hakari.md | 47 ++++++++++++++++--------------------------- 2 files changed, 18 insertions(+), 31 deletions(-) diff --git a/quest/m0/ci/README.md b/quest/m0/ci/README.md index 2c991353a34..216bb291f37 100644 --- a/quest/m0/ci/README.md +++ b/quest/m0/ci/README.md @@ -131,7 +131,7 @@ The historical samples locate candidates; they are not controlled benchmarks. - [Measure the parallel frontend](/quest/m0/ci/nightly-levers.md) - a pinned nightly's parallel frontend, adopted only if the numbers beat its risks; Cranelift is ruled out - [Verify the R2 Rust cache](/quest/m0/ci/mbx-r2-verify.md) - measure the hosted Nightly jobs' hits, restore time, and expiry once the bump lands - [Verify the Nix cache](/quest/m0/ci/nix-cache-verify.md) - confirm CI and releases use `nix.moq.dev` and retire Cachix -- [Unify dependency features](/quest/m0/ci/hakari.md) - a cargo-hakari workspace-hack so every job compiles each dependency alike and mbx hits across jobs +- [Unify dependency features](/quest/m0/ci/hakari.md) - align the FFI builds' features and record the hosted platform jobs' hits once the workspace-hack lands - [Replay full-run failures against the selected gate](/quest/m0/ci/select-audit.md) - every dependency edge `just ci` misses is found and fixed with a test - [First shared FFI release](/quest/m0/ci/nightly-ffi-reuse.md) - condition: the backport merges and the next `moq-ffi-v*` tag runs `Release FFI`; verify the wrappers - [Fewer BTreeMap instantiations](/quest/m0/ci/btree-keys.md) - moq-net shares BTreeMap key and value types, kept only if its CPU time drops diff --git a/quest/m0/ci/hakari.md b/quest/m0/ci/hakari.md index 16ae437e734..377f473477f 100644 --- a/quest/m0/ci/hakari.md +++ b/quest/m0/ci/hakari.md @@ -1,12 +1,10 @@ -# [M] Unify dependency features with cargo-hakari +# [S] Unify dependency features with cargo-hakari ## Goal -Every CI job, the queue gate, Nightly's platform jobs, and the FFI builds -compile each dependency with the same features, so mbx's cache hits across -them. A cargo-hakari workspace-hack crate pins the union of the dependency -features, and the gate fails when it is out of date. Record mbx's hit rate across -jobs, and their CPU time, before and after. +The FFI builds compile each dependency with the same features as each other, +so mbx's cache hits across them, and Nightly's hosted platform jobs record +their hit rate and CPU time before and after the workspace-hack. ## Plan @@ -15,30 +13,19 @@ from guppy's authors, rather than only trimming CI's feature permutations. mbx keys every compilation on its inputs, so a dependency built with a different feature set in another job is a miss, however warm the cache. -- Generate the workspace-hack crate with `cargo hakari generate`, and add a - `cargo hakari generate --diff` and `cargo hakari manage-deps --dry-run` check to - `just check`. -- moq publishes crates with release-plz, and a published crate cannot depend on - an unpublished workspace-hack. Use hakari's supported setup for published - workspaces, and prove a release-plz dry run still publishes. -- Keep the feature-contract checks testing each crate's own declarations: the - `quic-features` recipe in `rs/justfile` (moq-quic has no native runtime), - `sh/rs/media-features.sh` (minimal builds exclude codecs and rendering), and - `sh/rs/net-features.sh` and `sh/rs/tokio-features.sh`. A workspace-hack would - inject the union into them and hide a missing declaration. Exclude the crates - they guard from the hack, or run those checks with it disabled - (`cargo hakari disable`), and show each still fails on a planted violation. -- Unifying features means some packages build features they don't use. Measure - whether that costs more CPU than the cache hits save; target, profile, and - `RUSTFLAGS` differences still split keys. -- Measure the baseline here, before generating the hack: across jobs, which - compilations one job misses although another job built the same crate at - the same version, grouped by what differs (features, profile, `RUSTFLAGS`, - target). Repeat it after, from the same commit. +[moq-dev/moq#6985](https://github.com/moq-dev/moq/pull/6985) added +`rs/workspace-hack` as a path-only dev-dependency of every member outside +`.config/hakari.toml`'s excludes. Test, lint, and bench builds now unify; +library-only builds do not, since dev-dependencies stay out of them. That +leaves the FFI builds (`cargo build --release -p moq-ffi` in the bindings and +release workflows), which also split on their own flags: the Dart build passes +the host triple as `--target` and adds the `testing` feature. Align those +invocations rather than add the hack to them, unless the PR's decision on the +layout says otherwise. -Decided 2026-10-27 (maintainer): this quest no longer waits on -[Verify the R2 Rust cache](/quest/m0/ci/mbx-r2-verify.md). It measures its own -before and after baseline, so the cross-job miss report moved here from that -quest, which stays a waiting quest for the R2 numbers alone. +Nightly's macOS and Windows jobs read and write R2, so their before and after +can only come from scheduled Nightlies on `main` +(`gh run list --workflow nightly.yml --branch main --event schedule`): compare +the mbx summaries of the last run before the merge with the first two after. Public API: none; the workspace-hack crate is not published. From cf2ca1e82de4b67ce23a086ad87af59fc838a529 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 27 Oct 2026 22:43:32 -0700 Subject: [PATCH 05/24] ci: leave the workspace-hack's formatting to cargo hakari Co-Authored-By: Claude Opus 5.5 --- .config/hakari.toml | 7 +------ .taplo.toml | 3 ++- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.config/hakari.toml b/.config/hakari.toml index 693ab4f27c9..65714649f33 100644 --- a/.config/hakari.toml +++ b/.config/hakari.toml @@ -16,12 +16,7 @@ resolver = "2" # Add triples corresponding to platforms commonly used by developers here. # https://doc.rust-lang.org/rustc/platform-support.html -platforms = [ - "aarch64-apple-darwin", - "aarch64-unknown-linux-gnu", - "x86_64-pc-windows-msvc", - "x86_64-unknown-linux-gnu", -] +platforms = ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "x86_64-pc-windows-msvc", "x86_64-unknown-linux-gnu"] # Write out exact versions rather than a semver range. (Defaults to false.) # exact-versions = true diff --git a/.taplo.toml b/.taplo.toml index f248b5f2cb8..be6e5af518b 100644 --- a/.taplo.toml +++ b/.taplo.toml @@ -1,5 +1,6 @@ # Skip vendored / build trees so `taplo format` doesn't recurse into them. -exclude = ["**/node_modules/**", "**/target/**", "**/dist/**", "**/.venv/**", "**/.direnv/**"] +# `cargo hakari` owns the workspace-hack's formatting; `just rs lint` checks it. +exclude = ["**/node_modules/**", "**/target/**", "**/dist/**", "**/.venv/**", "**/.direnv/**", "rs/workspace-hack/Cargo.toml"] # Match the existing repo style (4-space indent on Cargo.toml, lines up # to ~120 chars) so the initial format pass stays minimal. From 62105366e7a23f5cf68d0a28dde4add40862b9b3 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Mon, 2 Nov 2026 21:11:17 -0800 Subject: [PATCH 06/24] chore(quest): claim quest/m0/ci/hakari.md Quest-Claim: 1cc6efbd10058ae2 From 946bd85fc5f936c866ec8410ac595108b4b0eb3e Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Mon, 2 Nov 2026 21:18:38 -0800 Subject: [PATCH 07/24] ci: share host FFI dependency build identities Co-Authored-By: GPT-6.1 Sol --- .cargo/config.toml | 2 +- dart/moq_ffi/hook/build.dart | 34 ++++++++++++++---- quest/m0/ci/README.md | 2 +- quest/m0/ci/hakari.md | 61 ++++++++++++++++++------------- rs/moq-ffi/build.sh | 29 ++++++++++----- sh/dart/bench.sh | 2 +- sh/dart/build.test.py | 8 +++-- sh/dart/check.sh | 3 +- sh/dart/generate.sh | 19 +++++----- sh/gh/ffi.test.py | 69 +++++++++++++++++++++++++++++++++++- 10 files changed, 172 insertions(+), 57 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index c5f4371a6f6..ce50e6c5f7b 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -11,6 +11,6 @@ moq = "run --bin moq --" # name carries no feature hash, so a build with other features replaces # `libmoq_ffi.so` under everyone reading it; such a build takes a target # directory of its own (py, `sh/size/collect.sh`, `build.sh --no-default-features`) -# or a `--target` triple no default build uses (dart's `testing` build). +# or dart's `target/dart` directory for its `testing` build. # Aliases resolve from the working directory, so run it inside the checkout. build-ffi = "build --locked --package moq-ffi --features openh264" diff --git a/dart/moq_ffi/hook/build.dart b/dart/moq_ffi/hook/build.dart index 16de949eef6..43963d9d0f8 100644 --- a/dart/moq_ffi/hook/build.dart +++ b/dart/moq_ffi/hook/build.dart @@ -1,3 +1,4 @@ +import 'dart:convert'; import 'dart:io'; import 'package:code_assets/code_assets.dart'; @@ -88,17 +89,36 @@ Future<_Resolved> _resolveLibrary( /// another recipe with different features. Cargo's own timestamp check makes /// the no-op case cheap. Future<_Resolved> _build(Uri workspace, String target, String library) async { - // The shared default build, an alias .cargo/config.toml defines for Cargo - // runs in the workspace; it ships the software H.264 fallback. A checkout build is a test build, carrying the hooks - // leak_test.dart reads; `--target` keeps it out of the default build's - // directory, since a cdylib's file name carries no feature hash. - final cargoArgs = ['build-ffi', '--features', 'testing']; + // Keep the leak-test allocator out of the shared cdylib. A separate output + // directory preserves Cargo's native compilation mode and dependency cache + // identities; passing the host as --target would split them. + final targetDir = workspace.resolve('target/dart/'); + final cargoArgs = [ + 'build-ffi', + '--features', + 'testing', + '--target-dir', + targetDir.toFilePath(), + ]; + final rustc = await Process.run('rustc', [ + '-vV', + ], workingDirectory: workspace.toFilePath()); + if (rustc.exitCode != 0) { + throw StateError('rustc -vV failed: ${rustc.stderr}'); + } + final host = LineSplitter.split(rustc.stdout as String) + .firstWhere((line) => line.startsWith('host: ')) + .substring('host: '.length); + final native = target == host; // Android needs the NDK's linker and sysroot, which only cargo-ndk sets up. // This mirrors rs/moq-ffi/build.sh. final args = target.contains('-android') ? ['ndk', '--target', target, '--platform', '24', '--', ...cargoArgs] - : [...cargoArgs, '--target', target]; + : [ + ...cargoArgs, + if (!native) ...['--target', target], + ]; // The iOS floor release-ffi.yml builds with, which also avoids its // ___chkstk_darwin linker errors. The hook's filtered environment drops it. @@ -116,7 +136,7 @@ Future<_Resolved> _build(Uri workspace, String target, String library) async { ); } - final built = workspace.resolve('target/$target/debug/$library'); + final built = targetDir.resolve('${native ? '' : '$target/'}debug/$library'); if (!await File.fromUri(built).exists()) { throw StateError('cargo did not produce ${built.toFilePath()}'); } diff --git a/quest/m0/ci/README.md b/quest/m0/ci/README.md index 6a0e097835e..04c92b91929 100644 --- a/quest/m0/ci/README.md +++ b/quest/m0/ci/README.md @@ -159,7 +159,7 @@ The historical samples locate candidates; they are not controlled benchmarks. - [Measure the parallel frontend](/quest/m0/ci/nightly-levers.md) - a pinned nightly's parallel frontend, adopted only if the numbers beat its risks; Cranelift is ruled out - [Verify the R2 Rust cache](/quest/m0/ci/mbx-r2-verify.md) - confirm the hosted Nightly jobs reuse the previous Nightly, then measure restore time and expiry - [Verify the Nix cache](/quest/m0/ci/nix-cache-verify.md) - confirm releases use `nix.moq.dev`, check its bucket sizes, and retire Cachix -- [Unify dependency features](/quest/m0/ci/hakari.md) - align the FFI builds' features and record the hosted platform jobs' hits once the workspace-hack lands +- [Record hosted cargo-hakari evidence](/quest/m0/ci/hakari.md) - compare scheduled macOS and Windows cache hits and CPU before and after the workspace-hack - [Drop main from the publish Environment](/quest/m0/ci/publish-release-only.md) - the maintainer narrows `publish` to `release` and release tags once no job naming it runs as `main` - [Binary release publishers run on their tag](/quest/m0/ci/release-tag-publishers.md) - brew, Go and Swift releases stop running through `workflow_run` on main - [The queue host keeps the queue's disk](/quest/m0/ci/queue-host-disk.md) - agent sessions can't starve the queue runner of disk, and a crashed runner restarts diff --git a/quest/m0/ci/hakari.md b/quest/m0/ci/hakari.md index 377f473477f..f7f19a16480 100644 --- a/quest/m0/ci/hakari.md +++ b/quest/m0/ci/hakari.md @@ -1,31 +1,42 @@ -# [S] Unify dependency features with cargo-hakari +# [S] Record hosted cargo-hakari cache evidence ## Goal -The FFI builds compile each dependency with the same features as each other, -so mbx's cache hits across them, and Nightly's hosted platform jobs record -their hit rate and CPU time before and after the workspace-hack. +Nightly's hosted macOS and Windows jobs record their mbx hit rate and CPU time +before and after the workspace-hack. ## Plan -Decided with the maintainer on 2026-10-25: use cargo-hakari, the standard tool -from guppy's authors, rather than only trimming CI's feature permutations. mbx -keys every compilation on its inputs, so a dependency built with a different -feature set in another job is a miss, however warm the cache. - -[moq-dev/moq#6985](https://github.com/moq-dev/moq/pull/6985) added -`rs/workspace-hack` as a path-only dev-dependency of every member outside -`.config/hakari.toml`'s excludes. Test, lint, and bench builds now unify; -library-only builds do not, since dev-dependencies stay out of them. That -leaves the FFI builds (`cargo build --release -p moq-ffi` in the bindings and -release workflows), which also split on their own flags: the Dart build passes -the host triple as `--target` and adds the `testing` feature. Align those -invocations rather than add the hack to them, unless the PR's decision on the -layout says otherwise. - -Nightly's macOS and Windows jobs read and write R2, so their before and after -can only come from scheduled Nightlies on `main` -(`gh run list --workflow nightly.yml --branch main --event schedule`): compare -the mbx summaries of the last run before the merge with the first two after. - -Public API: none; the workspace-hack crate is not published. +Decided with the maintainer on 2026-10-25: use cargo-hakari rather than only +trimming CI's feature permutations. +[moq-dev/moq#6985](https://github.com/moq-dev/moq/pull/6985) added the path-only +dev-dependency layout, unifying test, lint, and bench builds. Keep that layout; +library-only builds do not need the hack. + +The remaining FFI invocation alignment is implemented in +[moq-dev/moq#7666](https://github.com/moq-dev/moq/pull/7666): default builds use +`cargo build-ffi` with `openh264`, native builds omit `--target`, and only cross +builds name a target. Python and Dart host tests retain `testing` for the manual +clock and leak allocator, with separate target directories so they cannot +replace the default cdylib. Their third-party feature identities match the +default host build; the intentional `kio/manual` split affects workspace crates. + +Compare the mbx summaries of the last scheduled Nightly before the +[2026-11-02 merge](https://github.com/moq-dev/moq/commit/8e53bf32185fec578e460ff6ccbe41a80a039a6a) +with the first two after. Query only scheduled runs on `main`: +`gh run list --workflow nightly.yml --branch main --event schedule`. +The baseline is [2026-11-01](https://github.com/moq-dev/moq/actions/runs/41313466339); +the first after is [2026-11-02](https://github.com/moq-dev/moq/actions/runs/41483654426). +The first after has no Windows compilation evidence: NASM installation failed +with a Chocolatey HTTP 503 before the build. macOS has partial mbx summaries +but its Rust suite failed. Do not infer a completed-job CPU saving from either. Separate this FFI alignment's later landing +from the workspace-hack landing when interpreting the results. + +Public API and wire: none. + +## Waiting + +- moq-dev/moq: the second scheduled Nightly on `main` after the workspace-hack + merge has not run yet. Once it completes, collect both platforms' before and + first-two-after mbx summaries and CPU measurements, recording missing or + partial evidence explicitly. A manual Nightly dispatch is not a substitute. diff --git a/rs/moq-ffi/build.sh b/rs/moq-ffi/build.sh index 20cb9c75dc0..51f720c3045 100755 --- a/rs/moq-ffi/build.sh +++ b/rs/moq-ffi/build.sh @@ -141,18 +141,33 @@ build_target() { (cd "$WORKSPACE_DIR" && cargo ndk --target "$target" --platform 24 -- "${cargo_args[@]}") else # Set up cross-compilation for Linux ARM64 - if [[ "$target" == "aarch64-unknown-linux-gnu" ]]; then + if [[ "$target" == "aarch64-unknown-linux-gnu" && "$target" != "$HOST_TARGET" ]]; then export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc fi - (cd "$WORKSPACE_DIR" && cargo "${cargo_args[@]}" --target "$target") + # An explicit host --target changes dependency cache identities too. + if [[ "$target" != "$HOST_TARGET" ]]; then + cargo_args+=(--target "$target") + fi + (cd "$WORKSPACE_DIR" && cargo "${cargo_args[@]}") + fi +} + +# Native builds share the bindings' host artifacts; cross builds stay scoped +# by triple. Packaging still uses the requested triple in its output names. +artifact_dir() { + local target="$1" + if [[ "$target" == "$HOST_TARGET" ]]; then + echo "$TARGET_BASE_DIR/release" + else + echo "$TARGET_BASE_DIR/$target/release" fi } -# Find the cdylib for binding generation find_cdylib() { local target="$1" - local target_dir="$TARGET_BASE_DIR/$target/release" + local target_dir + target_dir=$(artifact_dir "$target") if [[ "$target" == *"-apple-"* ]]; then echo "$target_dir/libmoq_ffi.dylib" @@ -251,9 +266,9 @@ echo "Packaging $NAME..." rm -rf "$PACKAGE_DIR" mkdir -p "$PACKAGE_DIR/lib" +TARGET_DIR=$(artifact_dir "$TARGET") if [[ "$TARGET" == *"-windows-"* ]]; then - TARGET_DIR="$TARGET_BASE_DIR/$TARGET/release" cp "$TARGET_DIR/moq_ffi.dll" "$PACKAGE_DIR/lib/" cp "$TARGET_DIR/moq_ffi.dll.lib" "$PACKAGE_DIR/lib/" 2>/dev/null || true cp "$TARGET_DIR/moq_ffi.lib" "$PACKAGE_DIR/lib/" 2>/dev/null || true @@ -263,24 +278,20 @@ elif is_ios "$TARGET"; then # Assets hook bundles the cdylib (the SDK does not implement static # linking). rustc emits a PLATFORM_IOS dylib for device and simulator # alike, so this is a packaging choice rather than a platform limit. - TARGET_DIR="$TARGET_BASE_DIR/$TARGET/release" cp "$TARGET_DIR/libmoq_ffi.a" "$PACKAGE_DIR/lib/" cp "$TARGET_DIR/libmoq_ffi.dylib" "$PACKAGE_DIR/lib/" elif is_android "$TARGET"; then # Android: shared library only - TARGET_DIR="$TARGET_BASE_DIR/$TARGET/release" cp "$TARGET_DIR/libmoq_ffi.so" "$PACKAGE_DIR/lib/" elif [[ "$TARGET" == *"-apple-"* ]]; then - TARGET_DIR="$TARGET_BASE_DIR/$TARGET/release" cp "$TARGET_DIR/libmoq_ffi.a" "$PACKAGE_DIR/lib/" cp "$TARGET_DIR/libmoq_ffi.dylib" "$PACKAGE_DIR/lib/" else # Linux: ship both the cdylib (.so, consumed by JNA/Kotlin and # maturin/Python) and the staticlib (.a, linked by the Go module's cgo). - TARGET_DIR="$TARGET_BASE_DIR/$TARGET/release" cp "$TARGET_DIR/libmoq_ffi.so" "$PACKAGE_DIR/lib/" cp "$TARGET_DIR/libmoq_ffi.a" "$PACKAGE_DIR/lib/" fi diff --git a/sh/dart/bench.sh b/sh/dart/bench.sh index 5b68e096d1c..93104d034e4 100755 --- a/sh/dart/bench.sh +++ b/sh/dart/bench.sh @@ -28,7 +28,7 @@ cat >>dart/moq/pubspec.yaml <] \([A-Za-z_][A-Za-z0-9_]*\)=.*/\1/p' | sort -u | paste -sd ' ' - diff --git a/sh/dart/generate.sh b/sh/dart/generate.sh index a7c9a62a9ef..5da70adb1f6 100755 --- a/sh/dart/generate.sh +++ b/sh/dart/generate.sh @@ -37,23 +37,26 @@ shopt -u nocasematch host=$(rustc -vV | sed -n 's/^host: //p') # Checkouts use a dev build; benchmark and release staging opt into release. profile=${MOQ_FFI_PROFILE:-debug} -# The shared default build (.cargo/config.toml). The debug one adds the hook's test -# hooks, which is safe only because `--target` gives it a directory no default build -# writes; the release build is benchmarked, so it leaves out the counting allocator. +# Keep the test hooks out of the shared cdylib without changing Cargo's host +# compilation mode. Release benchmarks use the shared default build. case "$profile" in - debug) profile_args=(--features testing) ;; + debug) profile_args=(--features testing --target-dir "$WORKSPACE_DIR/target/dart") ;; release) profile_args=(--release) ;; *) echo "error: unsupported MOQ_FFI_PROFILE: $profile" >&2 exit 1 ;; esac -(cd "$WORKSPACE_DIR" && env -i "${hook_env[@]}" cargo build-ffi "${profile_args[@]}" --target "$host") +(cd "$WORKSPACE_DIR" && env -i "${hook_env[@]}" cargo build-ffi ${profile_args[@]+"${profile_args[@]}"}) +target_dir="$WORKSPACE_DIR/target" +if [[ "$profile" == debug ]]; then + target_dir="$target_dir/dart" +fi case "$host" in - *-apple-*) library="$WORKSPACE_DIR/target/$host/$profile/libmoq_ffi.dylib" ;; - *-windows-*) library="$WORKSPACE_DIR/target/$host/$profile/moq_ffi.dll" ;; - *) library="$WORKSPACE_DIR/target/$host/$profile/libmoq_ffi.so" ;; + *-apple-*) library="$target_dir/$profile/libmoq_ffi.dylib" ;; + *-windows-*) library="$target_dir/$profile/moq_ffi.dll" ;; + *) library="$target_dir/$profile/libmoq_ffi.so" ;; esac mkdir -p "$OUTPUT_DIR" diff --git a/sh/gh/ffi.test.py b/sh/gh/ffi.test.py index c16e99086d4..6202e4977b0 100644 --- a/sh/gh/ffi.test.py +++ b/sh/gh/ffi.test.py @@ -178,6 +178,73 @@ def test_direct_and_legacy_triggers_need_no_api(self): self.assertEqual(self.run_helper("completed", "go"), "ready=true\n") self.assertFalse((self.root / "queried").exists()) + def test_native_and_cross_builds_stage_the_selected_artifacts(self): + # A native request must share host units, even when --target was + # explicitly passed to the packager. A cross request must keep its + # triple and linker. Minimal builds must never overwrite the default. + for host, target, minimal in [ + ("x86_64-unknown-linux-gnu", "x86_64-unknown-linux-gnu", False), + ("aarch64-unknown-linux-gnu", "aarch64-unknown-linux-gnu", False), + ("x86_64-unknown-linux-gnu", "aarch64-unknown-linux-gnu", False), + ("x86_64-unknown-linux-gnu", "x86_64-unknown-linux-gnu", True), + ]: + with self.subTest(host=host, target=target, minimal=minimal): + # Packaging the native host also generates bindings. Only the + # library lookup matters here; no generator needs to execute. + self.tool("rustc", f'print("host: {host}")\n') + self.tool("rustup", "pass\n") + self.tool( + "cargo", + """import json, os, pathlib, sys +root = pathlib.Path(os.environ["TEST_ROOT"]) +args = sys.argv[1:] +if args[0] == "metadata": + print(json.dumps({"target_directory": str(root / "target")}, separators=(",", ":"))) +elif args[0] == "build-ffi": + target = args[args.index("--target") + 1] if "--target" in args else None + (root / "build").write_text(json.dumps({ + "target": target, "args": args, + "linker": os.environ.get("CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER"), + })) + directory = pathlib.Path(args[args.index("--target-dir") + 1]) + if target: directory /= target + directory /= "release" + directory.mkdir(parents=True, exist_ok=True) + for name in ["libmoq_ffi.so", "libmoq_ffi.a"]: + (directory / name).write_bytes(b"selected build") +elif args[0] == "run": + assert pathlib.Path(args[args.index("--library") + 1]).read_bytes() == b"selected build" +else: raise AssertionError(args) +""", + ) + for generator in ["uniffi-bindgen-go", "uniffi_bindgen_dart", "uniffi-bindgen-cpp"]: + self.tool(generator, "pass\n") + args = [ + "bash", + str(ROOT / "rs/moq-ffi/build.sh"), + "--target", + target, + "--version", + "1.2.3", + "--output", + str(self.root / "dist"), + ] + if minimal: + args.append("--no-default-features") + result = subprocess.run(args, env=self.env, cwd=self.root, capture_output=True, text=True) + self.assertEqual(result.returncode, 0, result.stderr) + built = json.loads((self.root / "build").read_text()) + self.assertEqual(built["target"], target if target != host else None) + self.assertEqual(built["linker"], "aarch64-linux-gnu-gcc" if target != host else None) + self.assertEqual("--no-default-features" in built["args"], minimal) + self.assertEqual( + built["args"][built["args"].index("--target-dir") + 1], + str(self.root / "target" / "minimal" if minimal else self.root / "target"), + ) + staged = self.root / f"dist/moq-ffi-1.2.3-{target}/lib" + self.assertEqual((staged / "libmoq_ffi.a").read_bytes(), b"selected build") + self.assertEqual((staged / "libmoq_ffi.so").read_bytes(), b"selected build") + def test_bindings_from_existing_library_never_build_moq_ffi(self): library = self.root / "libmoq_ffi.so" library.write_bytes(b"metadata") @@ -186,7 +253,7 @@ def test_bindings_from_existing_library_never_build_moq_ffi(self): """import json, os, pathlib, sys root = pathlib.Path(os.environ["TEST_ROOT"]) with (root / "calls").open("a") as log: log.write(json.dumps(sys.argv[1:]) + "\\n") -if sys.argv[1] == "metadata": print(json.dumps({"target_directory": str(root / "target")})) +if sys.argv[1] == "metadata": print(json.dumps({"target_directory": str(root / "target")}, separators=(",", ":"))) elif sys.argv[1] == "run": assert sys.argv[sys.argv.index("--library") + 1] == str(root / "libmoq_ffi.so") pathlib.Path(sys.argv[sys.argv.index("--out-dir") + 1]).mkdir(parents=True) From 337471d42e1c6df62cc8d9d519c05c617a83d6dd Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Mon, 2 Nov 2026 21:21:32 -0800 Subject: [PATCH 08/24] style(dart): format the hook with its resolved language version Co-Authored-By: GPT-6.1 Sol --- dart/moq_ffi/hook/build.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dart/moq_ffi/hook/build.dart b/dart/moq_ffi/hook/build.dart index 43963d9d0f8..15702799b6f 100644 --- a/dart/moq_ffi/hook/build.dart +++ b/dart/moq_ffi/hook/build.dart @@ -106,9 +106,9 @@ Future<_Resolved> _build(Uri workspace, String target, String library) async { if (rustc.exitCode != 0) { throw StateError('rustc -vV failed: ${rustc.stderr}'); } - final host = LineSplitter.split(rustc.stdout as String) - .firstWhere((line) => line.startsWith('host: ')) - .substring('host: '.length); + final host = LineSplitter.split( + rustc.stdout as String, + ).firstWhere((line) => line.startsWith('host: ')).substring('host: '.length); final native = target == host; // Android needs the NDK's linker and sysroot, which only cargo-ndk sets up. From bf59c425d872c552222ee174a60a4057fc53b382 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Mon, 2 Nov 2026 21:30:40 -0800 Subject: [PATCH 09/24] test(ffi): distinguish each packaged build from stale artifacts Co-Authored-By: GPT-6.1 Sol --- sh/gh/ffi.test.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/sh/gh/ffi.test.py b/sh/gh/ffi.test.py index 6202e4977b0..1c251caee4e 100644 --- a/sh/gh/ffi.test.py +++ b/sh/gh/ffi.test.py @@ -189,6 +189,11 @@ def test_native_and_cross_builds_stage_the_selected_artifacts(self): ("x86_64-unknown-linux-gnu", "x86_64-unknown-linux-gnu", True), ]: with self.subTest(host=host, target=target, minimal=minimal): + payload = f"{host}:{target}:{minimal}".encode() + self.env["BUILD_ID"] = payload.decode() + default_library = self.root / "target/release/libmoq_ffi.so" + if minimal: + default_bytes = default_library.read_bytes() # Packaging the native host also generates bindings. Only the # library lookup matters here; no generator needs to execute. self.tool("rustc", f'print("host: {host}")\n') @@ -211,9 +216,9 @@ def test_native_and_cross_builds_stage_the_selected_artifacts(self): directory /= "release" directory.mkdir(parents=True, exist_ok=True) for name in ["libmoq_ffi.so", "libmoq_ffi.a"]: - (directory / name).write_bytes(b"selected build") + (directory / name).write_bytes(os.environ["BUILD_ID"].encode()) elif args[0] == "run": - assert pathlib.Path(args[args.index("--library") + 1]).read_bytes() == b"selected build" + assert pathlib.Path(args[args.index("--library") + 1]).read_bytes() == os.environ["BUILD_ID"].encode() else: raise AssertionError(args) """, ) @@ -242,8 +247,10 @@ def test_native_and_cross_builds_stage_the_selected_artifacts(self): str(self.root / "target" / "minimal" if minimal else self.root / "target"), ) staged = self.root / f"dist/moq-ffi-1.2.3-{target}/lib" - self.assertEqual((staged / "libmoq_ffi.a").read_bytes(), b"selected build") - self.assertEqual((staged / "libmoq_ffi.so").read_bytes(), b"selected build") + self.assertEqual((staged / "libmoq_ffi.a").read_bytes(), payload) + self.assertEqual((staged / "libmoq_ffi.so").read_bytes(), payload) + if minimal: + self.assertEqual(default_library.read_bytes(), default_bytes) def test_bindings_from_existing_library_never_build_moq_ffi(self): library = self.root / "libmoq_ffi.so" From 1abd720e6fdca06c42e7e6c731366de8fa09a29e Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 14:25:12 -0800 Subject: [PATCH 10/24] ci: continue independent platform checks after suite failures Co-Authored-By: GPT-6.1 Sol --- .github/workflows/platform.yml | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/.github/workflows/platform.yml b/.github/workflows/platform.yml index 9ec05d4068d..a178c017e75 100644 --- a/.github/workflows/platform.yml +++ b/.github/workflows/platform.yml @@ -102,8 +102,12 @@ jobs: if: needs.scope.outputs.c == 'true' || needs.scope.outputs.cpp == 'true' || needs.scope.outputs.obs == 'true' with: generator: cpp + # Later suites are independent once tool and generator setup succeeds. + - name: Setup complete + id: setup + run: echo "Platform tools ready" - name: Rust compile and tests - if: needs.scope.outputs.rs == 'true' + if: ${{ !cancelled() && steps.setup.outcome == 'success' && (needs.scope.outputs.rs == 'true') }} shell: bash env: CI_BASE: ${{ github.event_name != 'pull_request' && '--all' || '' }} @@ -111,15 +115,15 @@ jobs: just rs windows "$CI_BASE" just rs windows-test - name: C - if: needs.scope.outputs.c == 'true' + if: ${{ !cancelled() && steps.setup.outcome == 'success' && (needs.scope.outputs.c == 'true') }} shell: bash run: just c check - name: C++ - if: needs.scope.outputs.cpp == 'true' + if: ${{ !cancelled() && steps.setup.outcome == 'success' && (needs.scope.outputs.cpp == 'true') }} shell: bash run: just cpp check - name: OBS - if: needs.scope.outputs.obs == 'true' + if: ${{ !cancelled() && steps.setup.outcome == 'success' && (needs.scope.outputs.obs == 'true') }} shell: bash run: just obs package --target x86_64-pc-windows-msvc --output "$RUNNER_TEMP/obs" @@ -151,36 +155,40 @@ jobs: if: needs.scope.outputs.obs == 'true' with: generator: cpp + # Later suites are independent once tool and generator setup succeeds. + - name: Setup complete + id: setup + run: echo "Platform tools ready" - name: Rust compile and tests - if: needs.scope.outputs.rs == 'true' + if: ${{ !cancelled() && steps.setup.outcome == 'success' && (needs.scope.outputs.rs == 'true') }} env: CI_BASE: ${{ github.event_name != 'pull_request' && '--all' || '' }} run: | just rs macos "$CI_BASE" just rs macos-test - name: Swift simulator check - if: needs.scope.outputs.swift == 'true' + if: ${{ !cancelled() && steps.setup.outcome == 'success' && (needs.scope.outputs.swift == 'true') }} run: just swift simulator - name: Swift - if: needs.scope.outputs.swift == 'true' + if: ${{ !cancelled() && steps.setup.outcome == 'success' && (needs.scope.outputs.swift == 'true') }} run: just swift check # At a token budget, so the runner keeps working at this commit; rust2's # `just bench-ffi` measures it at its pinned moq revision. - name: Swift binding benchmark runner - if: inputs.benchmarks + if: ${{ !cancelled() && steps.setup.outcome == 'success' && (inputs.benchmarks) }} env: MOQ_BENCH_SECONDS: "0.05" run: | just swift bench test -s target/bench/ffi/swift.json - name: OBS - if: needs.scope.outputs.obs == 'true' + if: ${{ !cancelled() && steps.setup.outcome == 'success' && (needs.scope.outputs.obs == 'true') }} run: just obs package --target aarch64-apple-darwin --output "$RUNNER_TEMP/obs" - name: Installer fixtures - if: needs.scope.outputs.moq_sh == 'true' + if: ${{ !cancelled() && steps.setup.outcome == 'success' && (needs.scope.outputs.moq_sh == 'true') }} run: just infra moq-sh test - name: Installer smoke - if: needs.scope.outputs.moq_sh == 'true' + if: ${{ !cancelled() && steps.setup.outcome == 'success' && (needs.scope.outputs.moq_sh == 'true') }} env: GH_TOKEN: ${{ github.token }} run: just infra moq-sh smoke From a695fc836d4a2ab694eded2e9c41a32d7e1209cc Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 14:25:34 -0800 Subject: [PATCH 11/24] docs: refresh scheduled hakari evidence and remaining wait Co-Authored-By: GPT-6.1 Sol --- quest/m0/ci/hakari.md | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/quest/m0/ci/hakari.md b/quest/m0/ci/hakari.md index f7f19a16480..c86ebb112b1 100644 --- a/quest/m0/ci/hakari.md +++ b/quest/m0/ci/hakari.md @@ -25,18 +25,26 @@ Compare the mbx summaries of the last scheduled Nightly before the [2026-11-02 merge](https://github.com/moq-dev/moq/commit/8e53bf32185fec578e460ff6ccbe41a80a039a6a) with the first two after. Query only scheduled runs on `main`: `gh run list --workflow nightly.yml --branch main --event schedule`. -The baseline is [2026-11-01](https://github.com/moq-dev/moq/actions/runs/41313466339); -the first after is [2026-11-02](https://github.com/moq-dev/moq/actions/runs/41483654426). -The first after has no Windows compilation evidence: NASM installation failed -with a Chocolatey HTTP 503 before the build. macOS has partial mbx summaries -but its Rust suite failed. Do not infer a completed-job CPU saving from either. Separate this FFI alignment's later landing -from the workspace-hack landing when interpreting the results. +The baseline is [2026-11-01](https://github.com/moq-dev/moq/actions/runs/41313466339). +The [2026-11-02 run](https://github.com/moq-dev/moq/actions/runs/41483654426) +has partial macOS summaries before a websocket-test timeout and no Windows +compilation (NASM installation returned HTTP 503). +[2026-11-03](https://github.com/moq-dev/moq/actions/runs/41656613559) completed +both platform jobs. [2026-11-04](https://github.com/moq-dev/moq/actions/runs/41852517544) +completed Windows, but cancelled macOS before any step ran. Windows therefore +has two complete after-runs; macOS has only one. Logs expose object-cache counts +and estimated compiler work saved, but no measured user/system CPU totals. +Do not call elapsed time CPU time, or attribute these earlier runs to the FFI +alignment that has not landed yet. + +The 2026-11-04 maintainer decision accepts hosted CI as the strict Nix gate; +a local namespace-probe skip is expected. The pkg-config and Gradle repairs +have landed, so neither remains an external prerequisite. Public API and wire: none. ## Waiting -- moq-dev/moq: the second scheduled Nightly on `main` after the workspace-hack - merge has not run yet. Once it completes, collect both platforms' before and - first-two-after mbx summaries and CPU measurements, recording missing or - partial evidence explicitly. A manual Nightly dispatch is not a substitute. +- moq-dev/moq: inspect the next scheduled Nightly for a second complete macOS + after-run and comparable compiler CPU evidence. Recommend retaining this + measurement wait; never dispatch Nightly or claim CPU savings from wall time. From d2c44dae4f6c1ffb12595d7d07396ba629e31223 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 14:37:56 -0800 Subject: [PATCH 12/24] docs: make the missing CPU measurement decision explicit Co-Authored-By: GPT-6.1 Sol --- quest/m0/ci/hakari.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/quest/m0/ci/hakari.md b/quest/m0/ci/hakari.md index c86ebb112b1..31f015c9963 100644 --- a/quest/m0/ci/hakari.md +++ b/quest/m0/ci/hakari.md @@ -46,5 +46,8 @@ Public API and wire: none. ## Waiting - moq-dev/moq: inspect the next scheduled Nightly for a second complete macOS - after-run and comparable compiler CPU evidence. Recommend retaining this - measurement wait; never dispatch Nightly or claim CPU savings from wall time. + after-run. Recommend retaining this measurement wait; never dispatch Nightly. +- Maintainer: the existing logs contain estimated compiler work saved, not + measured CPU totals. Accept those estimates as sufficient, or add CPU + instrumentation before collecting future scheduled evidence. Recommend adding + instrumentation if measured CPU remains required; do not relabel wall time. From eb32a9cf5deeffcbf571a7c9010d0854ad8a0929 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 14:44:56 -0800 Subject: [PATCH 13/24] fix(ci): preserve the native Dart release build environment Co-Authored-By: GPT-6.1 Sol --- .github/ffi.md | 6 +++++- sh/dart/build.test.py | 11 +++++++++-- sh/dart/generate.sh | 8 ++++---- sh/gh/ffi.test.py | 4 +++- 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/.github/ffi.md b/.github/ffi.md index c028d950c49..9040799eed3 100644 --- a/.github/ffi.md +++ b/.github/ffi.md @@ -97,10 +97,14 @@ stripped for `moq-ffi`. The toolchain action installed stable Rust 1.99.0, but the repository's `rust-toolchain.toml` selects Rust 1.98.1 (`48a229cea`) for the actual Cargo builds on both paths. C++ invokes `cargo build --locked --package moq-ffi --release` through -CMake; the shared candidate adds `--target ` through +CMake; in this sampled revision, the shared candidate adds `--target ` through `rs/moq-ffi/build.sh`. C++ is always a native host build. Only the shared ARM Linux candidate crosses from an x86 Linux host. +Current native packaging omits `--target`, matching the C++ invocation. The +table and debug-path differences below describe the older sampled invocation; +only cross-builds still pass an explicit target. + | Target | C++ host | Shared candidate host | Native archive comparison | | --- | --- | --- | --- | | x86\_64-unknown-linux-gnu | Ubuntu 24.04, image 20261004.327.1 | Same image and architecture | 772 common objects byte-identical; one differently named Rust LTO object | diff --git a/sh/dart/build.test.py b/sh/dart/build.test.py index de80b6867c9..09acba5fc29 100644 --- a/sh/dart/build.test.py +++ b/sh/dart/build.test.py @@ -17,8 +17,10 @@ def test_generator_profiles(self): with self.subTest(profile=profile), tempfile.TemporaryDirectory() as directory: scratch = Path(directory) calls = scratch / "calls" + compiler_env = scratch / "compiler-env" for name, source in { - "cargo": f'#!/bin/sh\nprintf "%s\\n" "$*" >> "{calls}"\n', + "cargo": f'#!/bin/sh\nprintf "%s\\n" "$*" >> "{calls}"\n' + f'printf "%s" "${{CC:-unset}}" > "{compiler_env}"\n', "rustc": '#!/bin/sh\necho "host: x86_64-unknown-linux-gnu"\n', "dart": "#!/bin/sh\nexit 0\n", "uniffi_bindgen_dart": '#!/bin/sh\nwhile [ "$1" != --out-dir ]; do shift; done\n' @@ -29,7 +31,11 @@ def test_generator_profiles(self): tool.write_text(source) tool.chmod(0o755) env = dict( - os.environ, PATH=f"{scratch}:{os.environ['PATH']}", MOQ_FFI_PROFILE=profile, BASH_ENV=os.devnull + os.environ, + PATH=f"{scratch}:{os.environ['PATH']}", + MOQ_FFI_PROFILE=profile, + BASH_ENV=os.devnull, + CC="fixture-compiler", ) result = subprocess.run( ["bash", "sh/dart/generate.sh", str(scratch / "generated")], @@ -39,6 +45,7 @@ def test_generator_profiles(self): capture_output=True, ) self.assertEqual(result.returncode, 0, result.stderr) + self.assertEqual(compiler_env.read_text(), "fixture-compiler" if release else "unset") args = calls.read_text().split() self.assertEqual(args[0], "build-ffi") self.assertEqual("--release" in args, release) diff --git a/sh/dart/generate.sh b/sh/dart/generate.sh index 5da70adb1f6..38243618783 100755 --- a/sh/dart/generate.sh +++ b/sh/dart/generate.sh @@ -18,7 +18,7 @@ command -v dart >/dev/null 2>&1 || { exit 1 } -# Build with the environment dart/moq_ffi/hook/build.dart gets, so the hook's +# Debug builds use the environment dart/moq_ffi/hook/build.dart gets, so the hook's # own Cargo run during `dart test` finds this build fresh. Dart filters a hook's # environment, and build scripts such as aws-lc-sys's rerun when a variable they # track (CC, PKG_CONFIG, ...) changes, rebuilding everything above them. This @@ -40,14 +40,14 @@ profile=${MOQ_FFI_PROFILE:-debug} # Keep the test hooks out of the shared cdylib without changing Cargo's host # compilation mode. Release benchmarks use the shared default build. case "$profile" in - debug) profile_args=(--features testing --target-dir "$WORKSPACE_DIR/target/dart") ;; - release) profile_args=(--release) ;; + debug) build=(env -i "${hook_env[@]}" cargo build-ffi --features testing --target-dir "$WORKSPACE_DIR/target/dart") ;; + release) build=(cargo build-ffi --release) ;; *) echo "error: unsupported MOQ_FFI_PROFILE: $profile" >&2 exit 1 ;; esac -(cd "$WORKSPACE_DIR" && env -i "${hook_env[@]}" cargo build-ffi ${profile_args[@]+"${profile_args[@]}"}) +(cd "$WORKSPACE_DIR" && "${build[@]}") target_dir="$WORKSPACE_DIR/target" if [[ "$profile" == debug ]]; then diff --git a/sh/gh/ffi.test.py b/sh/gh/ffi.test.py index 1c251caee4e..28c7b65b3f9 100644 --- a/sh/gh/ffi.test.py +++ b/sh/gh/ffi.test.py @@ -193,7 +193,9 @@ def test_native_and_cross_builds_stage_the_selected_artifacts(self): self.env["BUILD_ID"] = payload.decode() default_library = self.root / "target/release/libmoq_ffi.so" if minimal: - default_bytes = default_library.read_bytes() + default_library.parent.mkdir(parents=True, exist_ok=True) + default_bytes = b"default library sentinel" + default_library.write_bytes(default_bytes) # Packaging the native host also generates bindings. Only the # library lookup matters here; no generator needs to execute. self.tool("rustc", f'print("host: {host}")\n') From d0d7ba941e233e8fcfcb3c4594c86bfa894ff804 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 14:50:36 -0800 Subject: [PATCH 14/24] fix(dart): resolve the shared release artifact directory through Cargo Co-Authored-By: GPT-6.1 Sol --- sh/dart/bench.sh | 4 +++- sh/dart/build.test.py | 13 ++++++++++--- sh/dart/generate.sh | 2 ++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/sh/dart/bench.sh b/sh/dart/bench.sh index 93104d034e4..ef9b81be831 100755 --- a/sh/dart/bench.sh +++ b/sh/dart/bench.sh @@ -23,12 +23,14 @@ case "$host" in *-windows-*) library=moq_ffi.dll ;; *) library=libmoq_ffi.so ;; esac +target_dir=$(cargo metadata --format-version 1 --no-deps | jq -r .target_directory) +library_path=$(jq -cn --arg path "$target_dir/release/$library" '$path') cat >>dart/moq/pubspec.yaml <> "{calls}"\n' + "cargo": f'#!/bin/sh\nif [ "$1" = metadata ]; then echo \'{metadata}\'; exit; fi\nprintf "%s\\n" "$*" >> "{calls}"\n' f'printf "%s" "${{CC:-unset}}" > "{compiler_env}"\n', "rustc": '#!/bin/sh\necho "host: x86_64-unknown-linux-gnu"\n', "dart": "#!/bin/sh\nexit 0\n", - "uniffi_bindgen_dart": '#!/bin/sh\nwhile [ "$1" != --out-dir ]; do shift; done\n' + "uniffi_bindgen_dart": f'#!/bin/sh\ntest "$2" = "{library}" || exit 2\nwhile [ "$1" != --out-dir ]; do shift; done\n' 'mkdir -p "$2"\nfor name in moq.dart uniffi_runtime.dart; do ' 'echo "// ignore_for_file: unused_import" > "$2/$name"; done\n', }.items(): @@ -68,11 +72,14 @@ def test_failed_benchmark_restores_manifest(self): manifest.write_text("name: fixture\n") tools = root / "tools" tools.mkdir() + target = root / "external output" + metadata = json.dumps({"target_directory": str(target)}) for name, source in { + "cargo": f"#!/bin/sh\necho '{metadata}'\n", "git": f'#!/bin/sh\necho "{root}"\n', "rustc": '#!/bin/sh\necho "host: x86_64-unknown-linux-gnu"\n', "dart": '#!/bin/sh\nif [ "$1" = run ]; then ' - 'grep -q "release/libmoq_ffi.so" pubspec.yaml || exit 2; exit 7; fi\n', + f"grep -Fq '{target}/release/libmoq_ffi.so' pubspec.yaml || exit 2; exit 7; fi\n", }.items(): tool = tools / name tool.write_text(source) diff --git a/sh/dart/generate.sh b/sh/dart/generate.sh index 38243618783..5de6efd12c1 100755 --- a/sh/dart/generate.sh +++ b/sh/dart/generate.sh @@ -52,6 +52,8 @@ esac target_dir="$WORKSPACE_DIR/target" if [[ "$profile" == debug ]]; then target_dir="$target_dir/dart" +else + target_dir=$(cd "$WORKSPACE_DIR" && cargo metadata --format-version 1 --no-deps | jq -r .target_directory) fi case "$host" in *-apple-*) library="$target_dir/$profile/libmoq_ffi.dylib" ;; From f3e90d3ec0a9b2eae22c92334e097ab51d13c863 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 14:57:09 -0800 Subject: [PATCH 15/24] style: wrap Dart fixture command strings Co-Authored-By: GPT-6.1 Sol --- sh/dart/build.test.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sh/dart/build.test.py b/sh/dart/build.test.py index 8de8e7f9c97..766f3635309 100644 --- a/sh/dart/build.test.py +++ b/sh/dart/build.test.py @@ -23,11 +23,13 @@ def test_generator_profiles(self): metadata = json.dumps({"target_directory": str(target)}) library = target / "release/libmoq_ffi.so" if release else ROOT / "target/dart/debug/libmoq_ffi.so" for name, source in { - "cargo": f'#!/bin/sh\nif [ "$1" = metadata ]; then echo \'{metadata}\'; exit; fi\nprintf "%s\\n" "$*" >> "{calls}"\n' + "cargo": f'#!/bin/sh\nif [ "$1" = metadata ]; then echo \'{metadata}\'; exit; fi\n' + f'printf "%s\\n" "$*" >> "{calls}"\n' f'printf "%s" "${{CC:-unset}}" > "{compiler_env}"\n', "rustc": '#!/bin/sh\necho "host: x86_64-unknown-linux-gnu"\n', "dart": "#!/bin/sh\nexit 0\n", - "uniffi_bindgen_dart": f'#!/bin/sh\ntest "$2" = "{library}" || exit 2\nwhile [ "$1" != --out-dir ]; do shift; done\n' + "uniffi_bindgen_dart": f'#!/bin/sh\ntest "$2" = "{library}" || exit 2\n' + 'while [ "$1" != --out-dir ]; do shift; done\n' 'mkdir -p "$2"\nfor name in moq.dart uniffi_runtime.dart; do ' 'echo "// ignore_for_file: unused_import" > "$2/$name"; done\n', }.items(): From 64d4966122123380bfade6f6fe973fb0c63b106d Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 14:57:35 -0800 Subject: [PATCH 16/24] style: apply fixture string formatting Co-Authored-By: GPT-6.1 Sol --- sh/dart/build.test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/dart/build.test.py b/sh/dart/build.test.py index 766f3635309..9695a1539f1 100644 --- a/sh/dart/build.test.py +++ b/sh/dart/build.test.py @@ -23,7 +23,7 @@ def test_generator_profiles(self): metadata = json.dumps({"target_directory": str(target)}) library = target / "release/libmoq_ffi.so" if release else ROOT / "target/dart/debug/libmoq_ffi.so" for name, source in { - "cargo": f'#!/bin/sh\nif [ "$1" = metadata ]; then echo \'{metadata}\'; exit; fi\n' + "cargo": f"#!/bin/sh\nif [ \"$1\" = metadata ]; then echo '{metadata}'; exit; fi\n" f'printf "%s\\n" "$*" >> "{calls}"\n' f'printf "%s" "${{CC:-unset}}" > "{compiler_env}"\n', "rustc": '#!/bin/sh\necho "host: x86_64-unknown-linux-gnu"\n', From 7c935b35112a554d781ed0e6c1ae6510aa9a8766 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 15:49:49 -0800 Subject: [PATCH 17/24] docs(ci): record accepted cache evidence and scheduled wait Co-Authored-By: GPT-6.1 Sol --- quest/m0/ci/hakari.md | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/quest/m0/ci/hakari.md b/quest/m0/ci/hakari.md index 31f015c9963..9ac40761ed3 100644 --- a/quest/m0/ci/hakari.md +++ b/quest/m0/ci/hakari.md @@ -2,11 +2,16 @@ ## Goal -Nightly's hosted macOS and Windows jobs record their mbx hit rate and CPU time -before and after the workspace-hack. +Nightly's hosted macOS and Windows jobs record their mbx cache-hit evidence and +estimated compiler work saved before and after the workspace-hack. ## Plan +Decided 2026-11-04 (maintainer, /quest-unblock): ✅ accept the mbx cache-hit +evidence and estimated compiler savings as sufficient. Not chosen: add per-job +CPU instrumentation and measure CPU totals. The estimates are not measured CPU +savings. + Decided with the maintainer on 2026-10-25: use cargo-hakari rather than only trimming CI's feature permutations. [moq-dev/moq#6985](https://github.com/moq-dev/moq/pull/6985) added the path-only @@ -46,8 +51,10 @@ Public API and wire: none. ## Waiting - moq-dev/moq: inspect the next scheduled Nightly for a second complete macOS - after-run. Recommend retaining this measurement wait; never dispatch Nightly. -- Maintainer: the existing logs contain estimated compiler work saved, not - measured CPU totals. Accept those estimates as sufficient, or add CPU - instrumentation before collecting future scheduled evidence. Recommend adding - instrumentation if measured CPU remains required; do not relabel wall time. + after-run. As of 2026-11-04, the latest scheduled run is + [Nov 4](https://github.com/moq-dev/moq/actions/runs/41852517544); its + [macOS job](https://github.com/moq-dev/moq/actions/runs/41852517544/job/126656206251) + was cancelled with no steps. Run + `gh run list --repo moq-dev/moq --workflow nightly.yml --event schedule`, + inspect the next macOS job and record its mbx summaries alongside Nov 3. + This measurement wait outlives the implementation PR; never dispatch Nightly. From 324945ed53a429a464e7e7885729885384a303a5 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 15:56:24 -0800 Subject: [PATCH 18/24] test(ffi): disable flaky socket datagram receive Co-Authored-By: GPT-6.1 Sol --- rs/moq-ffi/src/test.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/rs/moq-ffi/src/test.rs b/rs/moq-ffi/src/test.rs index ee880532191..33da2981edb 100644 --- a/rs/moq-ffi/src/test.rs +++ b/rs/moq-ffi/src/test.rs @@ -6018,6 +6018,7 @@ async fn datagram_connection( /// A native datagram-only reader reaches a publisher on the default lite-06 path. #[tokio::test] +#[ignore = "flaky: datagram receive can time out after demand is signalled; investigate readiness"] async fn datagrams_cross_a_default_connection() { let (broadcast, remote, session, _server) = datagram_connection("sensor", vec![]).await; let producer = broadcast From 1773cdec54988bc40731f098f88bca04b118026b Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 15:59:48 -0800 Subject: [PATCH 19/24] test: track disabled datagram coverage in flake epic Co-Authored-By: GPT-6.1 Sol --- quest/m0/test-flakes-2/README.md | 7 +++++++ sh/gh/test-inventory.allow | 3 +++ 2 files changed, 10 insertions(+) diff --git a/quest/m0/test-flakes-2/README.md b/quest/m0/test-flakes-2/README.md index bc2c05c9f72..e66810f2b17 100644 --- a/quest/m0/test-flakes-2/README.md +++ b/quest/m0/test-flakes-2/README.md @@ -88,6 +88,13 @@ has failed it, so it needs no child of its own (noted 2026-11-03, Added 2026-11-03 (maintainer, `/quest-plan`): five more merge-queue failures from 2026-11-03 and early 2026-11-04 UTC, one child each. +Disabled 2026-11-04 during [moq-dev/moq#7666](https://github.com/moq-dev/moq/pull/7666): +`moq-ffi test::datagrams_cross_a_default_connection` timed out at `consumer.recv()` +after 10 seconds in loaded CI, then passed unchanged in 37 ms in isolation +(current `origin/main` passed in 23 ms). Investigate the demand/readiness race +or packet delivery at its cause, then re-enable the test and remove its +`sh/gh/test-inventory.allow` entry. Do not add retries or raise the timeout. + Public API: none. Wire: none. ## Required diff --git a/sh/gh/test-inventory.allow b/sh/gh/test-inventory.allow index 29342f1414c..5c79c9a88b0 100644 --- a/sh/gh/test-inventory.allow +++ b/sh/gh/test-inventory.allow @@ -35,3 +35,6 @@ ignore moq-video::frame::tests::d3d11_resize_matches_cpu /quest/m3/video-hardwar ignore moq-video::render::export::dx12::tests::exports_an_nv12_texture /quest/m3/video-hardware.md ignore moq-video::render::export::dx12::tests::media_foundation_encodes_the_export_in_place /quest/m3/video-hardware.md + +# Disabled after a loaded CI timeout; investigate and restore coverage. +ignore moq-ffi::test::datagrams_cross_a_default_connection /quest/m0/test-flakes-2/README.md From dff984d3b7df9edc079914ef1412c380b293b84d Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 16:21:26 -0800 Subject: [PATCH 20/24] fix(ffi): select Cargo-reported native artifacts Co-Authored-By: GPT-6.1 Sol --- dart/moq_ffi/hook/build.dart | 22 ++++++++++++++- rs/moq-ffi/build.sh | 52 +++++++++++++----------------------- sh/dart/bench.sh | 4 ++- sh/dart/build.test.py | 30 +++++++++++++++++---- sh/dart/check.sh | 2 +- sh/dart/generate.sh | 16 ++++++----- sh/gh/ffi.test.py | 28 ++++++++++++++----- sh/rs/ffi-artifact.jq | 10 +++++++ 8 files changed, 109 insertions(+), 55 deletions(-) create mode 100644 sh/rs/ffi-artifact.jq diff --git a/dart/moq_ffi/hook/build.dart b/dart/moq_ffi/hook/build.dart index 15702799b6f..ec293a68a47 100644 --- a/dart/moq_ffi/hook/build.dart +++ b/dart/moq_ffi/hook/build.dart @@ -95,6 +95,7 @@ Future<_Resolved> _build(Uri workspace, String target, String library) async { final targetDir = workspace.resolve('target/dart/'); final cargoArgs = [ 'build-ffi', + '--message-format=json-render-diagnostics', '--features', 'testing', '--target-dir', @@ -136,7 +137,26 @@ Future<_Resolved> _build(Uri workspace, String target, String library) async { ); } - final built = targetDir.resolve('${native ? '' : '$target/'}debug/$library'); + final artifacts = LineSplitter.split(result.stdout as String) + .map((line) => jsonDecode(line) as Map) + .where( + (message) => + message['reason'] == 'compiler-artifact' && + (message['target'] as Map)['name'] == 'moq_ffi', + ) + .expand((message) => (message['filenames'] as List).cast()) + .map((path) => File(path).uri) + .where((uri) => uri.pathSegments.last == library) + .toSet(); + if (artifacts.length != 1) { + throw StateError('expected one moq-ffi cdylib from Cargo: $artifacts'); + } + final built = artifacts.single; + final scoped = targetDir.resolve('$target/debug/$library'); + final unscoped = targetDir.resolve('debug/$library'); + if (built != scoped && !(native && built == unscoped)) { + throw StateError('Cargo artifact does not match target $target: $built'); + } if (!await File.fromUri(built).exists()) { throw StateError('cargo did not produce ${built.toFilePath()}'); } diff --git a/rs/moq-ffi/build.sh b/rs/moq-ffi/build.sh index f3478d11bde..d4945d2e89f 100755 --- a/rs/moq-ffi/build.sh +++ b/rs/moq-ffi/build.sh @@ -15,9 +15,8 @@ RS_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" WORKSPACE_DIR="$(cd "$RS_DIR/.." && pwd)" # Resolve cargo target directory (respects CARGO_TARGET_DIR, .cargo/config, etc.) -TARGET_BASE_DIR=$(cargo metadata --format-version 1 --manifest-path "$WORKSPACE_DIR/Cargo.toml" --no-deps 2>/dev/null | - sed -n 's/.*"target_directory":"\([^"]*\)".*/\1/p' || - echo "$WORKSPACE_DIR/target") +TARGET_BASE_DIR=$(cargo metadata --format-version 1 --manifest-path "$WORKSPACE_DIR/Cargo.toml" --no-deps | + jq -er .target_directory) # Defaults TARGET="" @@ -122,7 +121,7 @@ build_target() { # The shared default build (.cargo/config.toml): releases carry the OpenH264 # software fallback, the only encoder on API-24 Android and the Apple # simulators. It is a no-op under --no-default-features. - local cargo_args=(build-ffi --release --target-dir "$TARGET_BASE_DIR" --manifest-path "$WORKSPACE_DIR/Cargo.toml") + local cargo_args=(build-ffi --release --message-format=json-render-diagnostics --target-dir "$TARGET_BASE_DIR" --manifest-path "$WORKSPACE_DIR/Cargo.toml") if [[ "$NO_DEFAULT_FEATURES" == true ]]; then cargo_args+=(--no-default-features) fi @@ -136,9 +135,10 @@ build_target() { rustup target add "$target" fi + local messages if is_android "$target"; then # Android targets use cargo-ndk - (cd "$WORKSPACE_DIR" && cargo ndk --target "$target" --platform 24 -- "${cargo_args[@]}") + messages=$(cd "$WORKSPACE_DIR" && cargo ndk --target "$target" --platform 24 -- "${cargo_args[@]}") else # Set up cross-compilation for Linux ARM64 if [[ "$target" == "aarch64-unknown-linux-gnu" && "$target" != "$HOST_TARGET" ]]; then @@ -149,33 +149,17 @@ build_target() { if [[ "$target" != "$HOST_TARGET" ]]; then cargo_args+=(--target "$target") fi - (cd "$WORKSPACE_DIR" && cargo "${cargo_args[@]}") - fi -} - -# Native builds share the bindings' host artifacts; cross builds stay scoped -# by triple. Packaging still uses the requested triple in its output names. -artifact_dir() { - local target="$1" - if [[ "$target" == "$HOST_TARGET" ]]; then - echo "$TARGET_BASE_DIR/release" - else - echo "$TARGET_BASE_DIR/$target/release" - fi -} - -find_cdylib() { - local target="$1" - local target_dir - target_dir=$(artifact_dir "$target") - - if [[ "$target" == *"-apple-"* ]]; then - echo "$target_dir/libmoq_ffi.dylib" - elif [[ "$target" == *"-windows-"* ]]; then - echo "$target_dir/moq_ffi.dll" - else - echo "$target_dir/libmoq_ffi.so" + messages=$(cd "$WORKSPACE_DIR" && cargo "${cargo_args[@]}") fi + local library + case "$target" in + *-apple-*) library=libmoq_ffi.dylib ;; + *-windows-*) library=moq_ffi.dll ;; + *) library=libmoq_ffi.so ;; + esac + BUILT_LIBRARY=$(jq -ers --arg root "$TARGET_BASE_DIR" --arg target "$target" \ + --arg host "$HOST_TARGET" --arg profile release --arg library "$library" \ + -f "$WORKSPACE_DIR/sh/rs/ffi-artifact.jq" <<<"$messages") } # Generate language bindings into $OUTPUT_DIR/bindings//. Tarring is @@ -243,7 +227,7 @@ if [[ "$BINDINGS_ONLY" == true ]]; then cdylib="$LIBRARY" else build_target "$HOST_TARGET" - cdylib=$(find_cdylib "$HOST_TARGET") + cdylib="$BUILT_LIBRARY" fi if [[ ! -f "$cdylib" ]]; then echo "Error: cdylib not found at $cdylib" >&2 @@ -266,7 +250,7 @@ echo "Packaging $NAME..." rm -rf "$PACKAGE_DIR" mkdir -p "$PACKAGE_DIR/lib" -TARGET_DIR=$(artifact_dir "$TARGET") +TARGET_DIR=$(dirname "$BUILT_LIBRARY") if [[ "$TARGET" == *"-windows-"* ]]; then cp "$TARGET_DIR/moq_ffi.dll" "$PACKAGE_DIR/lib/" @@ -324,7 +308,7 @@ fi # Generate bindings if we can run the library on this host cd "$WORKSPACE_DIR" if can_run_on_host "$TARGET"; then - cdylib=$(find_cdylib "$TARGET") + cdylib="$BUILT_LIBRARY" if [[ -f "$cdylib" ]]; then generate_bindings "$cdylib" diff --git a/sh/dart/bench.sh b/sh/dart/bench.sh index ef9b81be831..b671bc435a6 100755 --- a/sh/dart/bench.sh +++ b/sh/dart/bench.sh @@ -24,7 +24,9 @@ case "$host" in *) library=libmoq_ffi.so ;; esac target_dir=$(cargo metadata --format-version 1 --no-deps | jq -r .target_directory) -library_path=$(jq -cn --arg path "$target_dir/release/$library" '$path') +messages=$(cargo build-ffi --release --message-format=json-render-diagnostics) +library_path=$(jq -cs --arg root "$target_dir" --arg target "$host" --arg host "$host" \ + --arg profile release --arg library "$library" -f sh/rs/ffi-artifact.jq <<<"$messages") cat >>dart/moq/pubspec.yaml <> "{calls}"\n' - f'printf "%s" "${{CC:-unset}}" > "{compiler_env}"\n', + f'printf "%s" "${{CC:-unset}}" > "{compiler_env}"\n' + f"echo '{artifact}'\n", "rustc": '#!/bin/sh\necho "host: x86_64-unknown-linux-gnu"\n', "dart": "#!/bin/sh\nexit 0\n", "uniffi_bindgen_dart": f'#!/bin/sh\ntest "$2" = "{library}" || exit 2\n' @@ -58,13 +68,16 @@ def test_generator_profiles(self): self.assertNotIn("--target", args) self.assertEqual( args[1:], - ["--release"] if release else ["--features", "testing", "--target-dir", str(ROOT / "target/dart")], + (["--release"] if release else ["--features", "testing", "--target-dir", str(ROOT / "target/dart")]) + + ["--message-format=json-render-diagnostics"], ) def test_failed_benchmark_restores_manifest(self): with tempfile.TemporaryDirectory() as directory: root = Path(directory) (root / "sh/dart").mkdir(parents=True) + (root / "sh/rs").mkdir() + shutil.copy(ROOT / "sh/rs/ffi-artifact.jq", root / "sh/rs/ffi-artifact.jq") (root / "dart/moq").mkdir(parents=True) shutil.copy(ROOT / "sh/dart/bench.sh", root / "sh/dart/bench.sh") generate = root / "sh/dart/generate.sh" @@ -76,8 +89,15 @@ def test_failed_benchmark_restores_manifest(self): tools.mkdir() target = root / "external output" metadata = json.dumps({"target_directory": str(target)}) + artifact = json.dumps( + { + "reason": "compiler-artifact", + "target": {"name": "moq_ffi"}, + "filenames": [str(target / "release/libmoq_ffi.so")], + } + ) for name, source in { - "cargo": f"#!/bin/sh\necho '{metadata}'\n", + "cargo": f"#!/bin/sh\nif [ \"$1\" = metadata ]; then echo '{metadata}'; else echo '{artifact}'; fi\n", "git": f'#!/bin/sh\necho "{root}"\n', "rustc": '#!/bin/sh\necho "host: x86_64-unknown-linux-gnu"\n', "dart": '#!/bin/sh\nif [ "$1" = run ]; then ' diff --git a/sh/dart/check.sh b/sh/dart/check.sh index 02c64c3e32a..94a0fe72026 100755 --- a/sh/dart/check.sh +++ b/sh/dart/check.sh @@ -125,7 +125,7 @@ done # changes the hook's filter would otherwise silently double this check's Rust # build. Cargo rewrites the .d dep-info file even on a no-op, so only the # libraries count. -if [[ -n "$(find "$DART_DIR/../target/dart/debug" -maxdepth 1 -name '*moq_ffi.*' ! -name '*.d' -newer "$generated/built")" ]]; then +if [[ -n "$(find "$DART_DIR/../target/dart" -mindepth 2 -maxdepth 3 -name '*moq_ffi.*' ! -name '*.d' -newer "$generated/built")" ]]; then drift=$( { diff <(tr '\0' '\n' <"$generated/generate.env") <(tr '\0' '\n' <"$generated/hook.env") || true; } | sed -n 's/^[<>] \([A-Za-z_][A-Za-z0-9_]*\)=.*/\1/p' | sort -u | paste -sd ' ' - diff --git a/sh/dart/generate.sh b/sh/dart/generate.sh index 5de6efd12c1..ad5a4c87932 100755 --- a/sh/dart/generate.sh +++ b/sh/dart/generate.sh @@ -47,19 +47,21 @@ case "$profile" in exit 1 ;; esac -(cd "$WORKSPACE_DIR" && "${build[@]}") +messages=$(cd "$WORKSPACE_DIR" && "${build[@]}" --message-format=json-render-diagnostics) -target_dir="$WORKSPACE_DIR/target" if [[ "$profile" == debug ]]; then - target_dir="$target_dir/dart" + target_dir=$(cd "$WORKSPACE_DIR" && env -i "${hook_env[@]}" \ + CARGO_TARGET_DIR="$WORKSPACE_DIR/target/dart" cargo metadata --format-version 1 --no-deps | jq -er .target_directory) else - target_dir=$(cd "$WORKSPACE_DIR" && cargo metadata --format-version 1 --no-deps | jq -r .target_directory) + target_dir=$(cd "$WORKSPACE_DIR" && cargo metadata --format-version 1 --no-deps | jq -er .target_directory) fi case "$host" in - *-apple-*) library="$target_dir/$profile/libmoq_ffi.dylib" ;; - *-windows-*) library="$target_dir/$profile/moq_ffi.dll" ;; - *) library="$target_dir/$profile/libmoq_ffi.so" ;; + *-apple-*) name=libmoq_ffi.dylib ;; + *-windows-*) name=moq_ffi.dll ;; + *) name=libmoq_ffi.so ;; esac +library=$(jq -ers --arg root "$target_dir" --arg target "$host" --arg host "$host" \ + --arg profile "$profile" --arg library "$name" -f "$WORKSPACE_DIR/sh/rs/ffi-artifact.jq" <<<"$messages") mkdir -p "$OUTPUT_DIR" rm -f "$OUTPUT_DIR/moq.dart" "$OUTPUT_DIR/uniffi_runtime.dart" diff --git a/sh/gh/ffi.test.py b/sh/gh/ffi.test.py index 28c7b65b3f9..289377d7a31 100644 --- a/sh/gh/ffi.test.py +++ b/sh/gh/ffi.test.py @@ -182,15 +182,24 @@ def test_native_and_cross_builds_stage_the_selected_artifacts(self): # A native request must share host units, even when --target was # explicitly passed to the packager. A cross request must keep its # triple and linker. Minimal builds must never overwrite the default. - for host, target, minimal in [ - ("x86_64-unknown-linux-gnu", "x86_64-unknown-linux-gnu", False), - ("aarch64-unknown-linux-gnu", "aarch64-unknown-linux-gnu", False), - ("x86_64-unknown-linux-gnu", "aarch64-unknown-linux-gnu", False), - ("x86_64-unknown-linux-gnu", "x86_64-unknown-linux-gnu", True), + for host, target, minimal, configured in [ + ("x86_64-unknown-linux-gnu", "x86_64-unknown-linux-gnu", False, False), + ("aarch64-unknown-linux-gnu", "aarch64-unknown-linux-gnu", False, False), + ("x86_64-unknown-linux-gnu", "aarch64-unknown-linux-gnu", False, False), + ("x86_64-unknown-linux-gnu", "x86_64-unknown-linux-gnu", True, False), + ("x86_64-unknown-linux-gnu", "x86_64-unknown-linux-gnu", False, True), + ("x86_64-unknown-linux-gnu", "x86_64-unknown-linux-gnu", False, "wrong"), ]: with self.subTest(host=host, target=target, minimal=minimal): payload = f"{host}:{target}:{minimal}".encode() self.env["BUILD_ID"] = payload.decode() + self.env["CONFIGURED_TARGET"] = ( + "aarch64-unknown-linux-gnu" if configured == "wrong" else host if configured else "" + ) + if configured: + default_library = self.root / "target/release/libmoq_ffi.so" + default_library.parent.mkdir(parents=True, exist_ok=True) + default_library.write_bytes(b"stale default") default_library = self.root / "target/release/libmoq_ffi.so" if minimal: default_library.parent.mkdir(parents=True, exist_ok=True) @@ -214,11 +223,14 @@ def test_native_and_cross_builds_stage_the_selected_artifacts(self): "linker": os.environ.get("CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER"), })) directory = pathlib.Path(args[args.index("--target-dir") + 1]) - if target: directory /= target + effective = target or os.environ.get("CONFIGURED_TARGET") + if effective: directory /= effective directory /= "release" directory.mkdir(parents=True, exist_ok=True) for name in ["libmoq_ffi.so", "libmoq_ffi.a"]: (directory / name).write_bytes(os.environ["BUILD_ID"].encode()) + print(json.dumps({"reason": "compiler-artifact", "target": {"name": "moq_ffi"}, + "filenames": [str(directory / "libmoq_ffi.so"), str(directory / "libmoq_ffi.a")]})) elif args[0] == "run": assert pathlib.Path(args[args.index("--library") + 1]).read_bytes() == os.environ["BUILD_ID"].encode() else: raise AssertionError(args) @@ -239,6 +251,10 @@ def test_native_and_cross_builds_stage_the_selected_artifacts(self): if minimal: args.append("--no-default-features") result = subprocess.run(args, env=self.env, cwd=self.root, capture_output=True, text=True) + if configured == "wrong": + self.assertNotEqual(result.returncode, 0) + self.assertIn("does not match the requested target", result.stderr) + continue self.assertEqual(result.returncode, 0, result.stderr) built = json.loads((self.root / "build").read_text()) self.assertEqual(built["target"], target if target != host else None) diff --git a/sh/rs/ffi-artifact.jq b/sh/rs/ffi-artifact.jq new file mode 100644 index 00000000000..fdef619147f --- /dev/null +++ b/sh/rs/ffi-artifact.jq @@ -0,0 +1,10 @@ +# Select only this invocation's cdylib, rejecting an implicit different target. +def path: gsub("\\\\"; "/"); +($root | path) as $base | +[.[] | select(.reason == "compiler-artifact" and .target.name == "moq_ffi") | + .filenames[] | path | select(endswith("/" + $library))] | unique | +if length != 1 then error("expected one moq-ffi cdylib from Cargo") else .[0] end | +. as $file | ($file | rtrimstr("/" + $library)) as $directory | +if $directory == ($base + "/" + $target + "/" + $profile) or + ($target == $host and $directory == ($base + "/" + $profile)) +then $file else error("Cargo artifact does not match the requested target/profile: " + $file) end From 73664b4d4c590dc13d81e3247ccc393e86837b8e Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 16:28:14 -0800 Subject: [PATCH 21/24] test(ffi): restore default connection datagram coverage Co-Authored-By: GPT-6.1 Sol --- quest/m0/test-flakes-2/README.md | 7 ------- rs/moq-ffi/src/test.rs | 1 - sh/gh/test-inventory.allow | 3 --- 3 files changed, 11 deletions(-) diff --git a/quest/m0/test-flakes-2/README.md b/quest/m0/test-flakes-2/README.md index 56ca5ee2da6..31833ee99da 100644 --- a/quest/m0/test-flakes-2/README.md +++ b/quest/m0/test-flakes-2/README.md @@ -88,13 +88,6 @@ has failed it, so it needs no child of its own (noted 2026-11-03, Added 2026-11-03 (maintainer, `/quest-plan`): five more merge-queue failures from 2026-11-03 and early 2026-11-04 UTC, one child each. -Disabled 2026-11-04 during [moq-dev/moq#7666](https://github.com/moq-dev/moq/pull/7666): -`moq-ffi test::datagrams_cross_a_default_connection` timed out at `consumer.recv()` -after 10 seconds in loaded CI, then passed unchanged in 37 ms in isolation -(current `origin/main` passed in 23 ms). Investigate the demand/readiness race -or packet delivery at its cause, then re-enable the test and remove its -`sh/gh/test-inventory.allow` entry. Do not add retries or raise the timeout. - Added 2026-11-04 (maintainer, `/quest-plan`): moq-gst's interleaved restart test, which failed two merge-queue batches and two loaded local runs. diff --git a/rs/moq-ffi/src/test.rs b/rs/moq-ffi/src/test.rs index a942f2c6463..48a5bc1f66d 100644 --- a/rs/moq-ffi/src/test.rs +++ b/rs/moq-ffi/src/test.rs @@ -6020,7 +6020,6 @@ async fn datagram_connection( /// A native datagram-only reader reaches a publisher on the default lite-06 path. #[tokio::test] -#[ignore = "flaky: datagram receive can time out after demand is signalled; investigate readiness"] async fn datagrams_cross_a_default_connection() { let (broadcast, remote, session, _server) = datagram_connection("sensor", vec![]).await; let producer = broadcast diff --git a/sh/gh/test-inventory.allow b/sh/gh/test-inventory.allow index b5093c2f0e4..6f44c275b3f 100644 --- a/sh/gh/test-inventory.allow +++ b/sh/gh/test-inventory.allow @@ -38,6 +38,3 @@ ignore moq-video::frame::tests::d3d11_resize_matches_cpu /quest/m3/video-hardwar ignore moq-video::render::export::dx12::tests::exports_an_nv12_texture /quest/m3/video-hardware.md ignore moq-video::render::export::dx12::tests::media_foundation_encodes_the_export_in_place /quest/m3/video-hardware.md - -# Disabled after a loaded CI timeout; investigate and restore coverage. -ignore moq-ffi::test::datagrams_cross_a_default_connection /quest/m0/test-flakes-2/README.md From 0dc39bb58a4a63c0f2f5f50af2ab7627bcf82162 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 16:43:06 -0800 Subject: [PATCH 22/24] fix(ffi): resolve Android artifacts after cargo-ndk consumes JSON Co-Authored-By: GPT-6.1 Sol --- dart/moq_ffi/hook/build.dart | 45 +++++++++++++++++++++--------------- rs/moq-ffi/build.sh | 7 ++++-- sh/gh/ffi.test.py | 15 ++++++++---- 3 files changed, 42 insertions(+), 25 deletions(-) diff --git a/dart/moq_ffi/hook/build.dart b/dart/moq_ffi/hook/build.dart index ec293a68a47..70566c00e06 100644 --- a/dart/moq_ffi/hook/build.dart +++ b/dart/moq_ffi/hook/build.dart @@ -111,10 +111,11 @@ Future<_Resolved> _build(Uri workspace, String target, String library) async { rustc.stdout as String, ).firstWhere((line) => line.startsWith('host: ')).substring('host: '.length); final native = target == host; + final android = target.contains('-android'); // Android needs the NDK's linker and sysroot, which only cargo-ndk sets up. // This mirrors rs/moq-ffi/build.sh. - final args = target.contains('-android') + final args = android ? ['ndk', '--target', target, '--platform', '24', '--', ...cargoArgs] : [ ...cargoArgs, @@ -137,25 +138,31 @@ Future<_Resolved> _build(Uri workspace, String target, String library) async { ); } - final artifacts = LineSplitter.split(result.stdout as String) - .map((line) => jsonDecode(line) as Map) - .where( - (message) => - message['reason'] == 'compiler-artifact' && - (message['target'] as Map)['name'] == 'moq_ffi', - ) - .expand((message) => (message['filenames'] as List).cast()) - .map((path) => File(path).uri) - .where((uri) => uri.pathSegments.last == library) - .toSet(); - if (artifacts.length != 1) { - throw StateError('expected one moq-ffi cdylib from Cargo: $artifacts'); - } - final built = artifacts.single; final scoped = targetDir.resolve('$target/debug/$library'); - final unscoped = targetDir.resolve('debug/$library'); - if (built != scoped && !(native && built == unscoped)) { - throw StateError('Cargo artifact does not match target $target: $built'); + final Uri built; + if (android) { + // cargo-ndk consumes Cargo's artifact messages and always sets --target. + built = scoped; + } else { + final artifacts = LineSplitter.split(result.stdout as String) + .map((line) => jsonDecode(line) as Map) + .where( + (message) => + message['reason'] == 'compiler-artifact' && + (message['target'] as Map)['name'] == 'moq_ffi', + ) + .expand((message) => (message['filenames'] as List).cast()) + .map((path) => File(path).uri) + .where((uri) => uri.pathSegments.last == library) + .toSet(); + if (artifacts.length != 1) { + throw StateError('expected one moq-ffi cdylib from Cargo: $artifacts'); + } + built = artifacts.single; + final unscoped = targetDir.resolve('debug/$library'); + if (built != scoped && !(native && built == unscoped)) { + throw StateError('Cargo artifact does not match target $target: $built'); + } } if (!await File.fromUri(built).exists()) { throw StateError('cargo did not produce ${built.toFilePath()}'); diff --git a/rs/moq-ffi/build.sh b/rs/moq-ffi/build.sh index d4945d2e89f..08336d42ad7 100755 --- a/rs/moq-ffi/build.sh +++ b/rs/moq-ffi/build.sh @@ -137,8 +137,11 @@ build_target() { local messages if is_android "$target"; then - # Android targets use cargo-ndk - messages=$(cd "$WORKSPACE_DIR" && cargo ndk --target "$target" --platform 24 -- "${cargo_args[@]}") + # cargo-ndk consumes Cargo's artifact messages. It always passes an + # explicit target, so its output directory is unambiguous. + (cd "$WORKSPACE_DIR" && cargo ndk --target "$target" --platform 24 -- "${cargo_args[@]}") + BUILT_LIBRARY="$TARGET_BASE_DIR/$target/release/libmoq_ffi.so" + return else # Set up cross-compilation for Linux ARM64 if [[ "$target" == "aarch64-unknown-linux-gnu" && "$target" != "$HOST_TARGET" ]]; then diff --git a/sh/gh/ffi.test.py b/sh/gh/ffi.test.py index 289377d7a31..ad298dfdabf 100644 --- a/sh/gh/ffi.test.py +++ b/sh/gh/ffi.test.py @@ -186,6 +186,7 @@ def test_native_and_cross_builds_stage_the_selected_artifacts(self): ("x86_64-unknown-linux-gnu", "x86_64-unknown-linux-gnu", False, False), ("aarch64-unknown-linux-gnu", "aarch64-unknown-linux-gnu", False, False), ("x86_64-unknown-linux-gnu", "aarch64-unknown-linux-gnu", False, False), + ("x86_64-unknown-linux-gnu", "aarch64-linux-android", False, False), ("x86_64-unknown-linux-gnu", "x86_64-unknown-linux-gnu", True, False), ("x86_64-unknown-linux-gnu", "x86_64-unknown-linux-gnu", False, True), ("x86_64-unknown-linux-gnu", "x86_64-unknown-linux-gnu", False, "wrong"), @@ -214,6 +215,10 @@ def test_native_and_cross_builds_stage_the_selected_artifacts(self): """import json, os, pathlib, sys root = pathlib.Path(os.environ["TEST_ROOT"]) args = sys.argv[1:] +ndk = args[0] == "ndk" +if ndk: + target = args[args.index("--target") + 1] + args = args[args.index("--") + 1:] + ["--target", target] if args[0] == "metadata": print(json.dumps({"target_directory": str(root / "target")}, separators=(",", ":"))) elif args[0] == "build-ffi": @@ -229,8 +234,9 @@ def test_native_and_cross_builds_stage_the_selected_artifacts(self): directory.mkdir(parents=True, exist_ok=True) for name in ["libmoq_ffi.so", "libmoq_ffi.a"]: (directory / name).write_bytes(os.environ["BUILD_ID"].encode()) - print(json.dumps({"reason": "compiler-artifact", "target": {"name": "moq_ffi"}, - "filenames": [str(directory / "libmoq_ffi.so"), str(directory / "libmoq_ffi.a")]})) + if not ndk: + print(json.dumps({"reason": "compiler-artifact", "target": {"name": "moq_ffi"}, + "filenames": [str(directory / "libmoq_ffi.so"), str(directory / "libmoq_ffi.a")]})) elif args[0] == "run": assert pathlib.Path(args[args.index("--library") + 1]).read_bytes() == os.environ["BUILD_ID"].encode() else: raise AssertionError(args) @@ -258,14 +264,15 @@ def test_native_and_cross_builds_stage_the_selected_artifacts(self): self.assertEqual(result.returncode, 0, result.stderr) built = json.loads((self.root / "build").read_text()) self.assertEqual(built["target"], target if target != host else None) - self.assertEqual(built["linker"], "aarch64-linux-gnu-gcc" if target != host else None) + self.assertEqual(built["linker"], "aarch64-linux-gnu-gcc" if target == "aarch64-unknown-linux-gnu" and target != host else None) self.assertEqual("--no-default-features" in built["args"], minimal) self.assertEqual( built["args"][built["args"].index("--target-dir") + 1], str(self.root / "target" / "minimal" if minimal else self.root / "target"), ) staged = self.root / f"dist/moq-ffi-1.2.3-{target}/lib" - self.assertEqual((staged / "libmoq_ffi.a").read_bytes(), payload) + if not target.endswith("-android"): + self.assertEqual((staged / "libmoq_ffi.a").read_bytes(), payload) self.assertEqual((staged / "libmoq_ffi.so").read_bytes(), payload) if minimal: self.assertEqual(default_library.read_bytes(), default_bytes) From eaa9f82abc25a0c26058ab219c512419a08fff98 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 16:45:21 -0800 Subject: [PATCH 23/24] style: wrap the Android packaging fixture assertion Co-Authored-By: GPT-6.1 Sol --- sh/gh/ffi.test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sh/gh/ffi.test.py b/sh/gh/ffi.test.py index ad298dfdabf..d5f8b0dd475 100644 --- a/sh/gh/ffi.test.py +++ b/sh/gh/ffi.test.py @@ -264,7 +264,10 @@ def test_native_and_cross_builds_stage_the_selected_artifacts(self): self.assertEqual(result.returncode, 0, result.stderr) built = json.loads((self.root / "build").read_text()) self.assertEqual(built["target"], target if target != host else None) - self.assertEqual(built["linker"], "aarch64-linux-gnu-gcc" if target == "aarch64-unknown-linux-gnu" and target != host else None) + self.assertEqual( + built["linker"], + "aarch64-linux-gnu-gcc" if target == "aarch64-unknown-linux-gnu" and target != host else None, + ) self.assertEqual("--no-default-features" in built["args"], minimal) self.assertEqual( built["args"][built["args"].index("--target-dir") + 1], From 47839e27cd9d8a3ceef44aa516d313298886e8e8 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 21:19:29 -0800 Subject: [PATCH 24/24] test(ffi): isolate the packaging fixture from a developer's linker env The native case asserts no aarch64 linker is set, so an exported CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER failed it. Also name the accepted evidence (estimated compiler work, not CPU) in the CI epic's hakari entry. Co-Authored-By: Claude Opus 5.5 --- quest/m0/ci/README.md | 2 +- sh/gh/ffi.test.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/quest/m0/ci/README.md b/quest/m0/ci/README.md index b67e530d0b9..7c063c4e792 100644 --- a/quest/m0/ci/README.md +++ b/quest/m0/ci/README.md @@ -167,7 +167,7 @@ The historical samples locate candidates; they are not controlled benchmarks. - [Measure the parallel frontend](/quest/m0/ci/nightly-levers.md) - a pinned nightly's parallel frontend, adopted only if the numbers beat its risks; Cranelift is ruled out - [Verify the R2 Rust cache](/quest/m0/ci/mbx-r2-verify.md) - confirm the hosted Nightly jobs reuse the previous Nightly, then measure restore time and expiry - [Verify the Nix cache](/quest/m0/ci/nix-cache-verify.md) - confirm releases use `nix.moq.dev`, check its bucket sizes, and retire Cachix -- [Record hosted cargo-hakari evidence](/quest/m0/ci/hakari.md) - compare scheduled macOS and Windows cache hits and CPU before and after the workspace-hack +- [Record hosted cargo-hakari evidence](/quest/m0/ci/hakari.md) - compare scheduled macOS and Windows cache hits and estimated compiler work saved before and after the workspace-hack - [Drop main from the publish Environment](/quest/m0/ci/publish-release-only.md) - the maintainer narrows `publish` to `release` and release tags once no job naming it runs as `main` - [Binary release publishers run on their tag](/quest/m0/ci/release-tag-publishers.md) - brew, Go and Swift releases stop running through `workflow_run` on main - [The bench comparison builds moq-gst's catalog bench on its base](/quest/m0/ci/bench-base-build.md) - A paired bench comparison that selects `rust/gst/moq-gst/catalog` against `origin/main` builds the base side and reports a comparison, instead of marking it unavailable with "base build failed" diff --git a/sh/gh/ffi.test.py b/sh/gh/ffi.test.py index d5f8b0dd475..5521e741cb5 100644 --- a/sh/gh/ffi.test.py +++ b/sh/gh/ffi.test.py @@ -35,6 +35,8 @@ def setUp(self): GITHUB_REPOSITORY="moq-dev/moq", TEST_ROOT=str(self.root), ) + # The native case asserts that only a cross build sets this linker. + self.env.pop("CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER", None) def tool(self, name, body): path = self.bin / name