#!/usr/bin/env just --justfile # # Language-specific recipes for the Rust workspace under rs/. Invoked from # the repo root as `just rs ` via the `mod rs` import. # # The Rust crates form a single workspace whose root Cargo.toml lives at # the repository root, so these recipes run from the repo root rather than # from rs/ (cargo resolves paths relative to the workspace root either way). set working-directory := '..' # The `*-fuzz` crates are workspace members only so they share the root lockfile; libFuzzer # needs a nightly toolchain and sanitizer flags, so `just rs fuzz` is the one recipe # that may compile it. Every `--workspace` below therefore carries this, as does # sh/rs/select.sh, since it cannot read this. no_fuzz := "--exclude moq-net-fuzz --exclude moq-quic-fuzz" default: just check # Default features for the selected packages. Selection also checks feature # extremes; `features` covers the full matrix nightly. No `cargo # check` pass: clippy is a superset of it, and the two use different rustc # wrappers, so running both compiles the workspace twice. # # A bare `just rs check` is default-members, which skips moq-c, moq-ffi, # moq-gst, and moq-wasm; pass `--workspace` for all of it. # Compile, lint, format-check, doc-check, and verify dependency hygiene. [positional-arguments] check *args: bash sh/local.sh cargo clippy --locked --all-targets "$@" -- -D warnings just rs lint "$@" # `check` with clippy enforced by the `test` build. A selection can hold # nothing testable. # Compile, lint, and test in one build, plus everything else `check` verifies. [positional-arguments] check-test *args: just rs test --no-tests=pass "$@" just rs lint "$@" # Everything `check` verifies besides clippy. [positional-arguments] lint *args: python3 sh/rs/stats-docs.py # The environment is process-wide, so nothing writes it. A text check, because the # clock lint's test allowances also silence clippy's disallowed_methods. git grep --untracked -nE '(^|[^[:alnum:]_])(set_var|remove_var)[[:space:]]*\(' -- 'rs/*.rs'; [ $? -eq 1 ] || { echo "error: a write to the process environment: pass the value down, or run a test in a child with test_env::Env" >&2; exit 1; } cargo fmt --all --check RUSTDOCFLAGS="-D warnings" bash sh/local.sh cargo doc --locked --no-deps "$@" cargo shear cargo sort --workspace --check --no-format # Auto-fix clippy/format/shear/sort. [positional-arguments] 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 # Like `check`, but only the crates in a changed-file list plus their dependents. check-changed $LIST: sh/rs/select.sh check "$LIST" # Like `lint`, with the feature and target checks for the selected crates. lint-changed $LIST: sh/rs/select.sh lint "$LIST" # `feature-shapes` for the crates in a changed-file list plus their dependents. feature-shapes-changed $LIST: sh/rs/select.sh feature-shapes "$LIST" # Like `check-test`, but only the crates in a changed-file list plus their dependents. check-test-changed $LIST: sh/rs/select.sh check-test "$LIST" # Like `fix`, but only the crates in a changed-file list plus their dependents. fix-changed $LIST: sh/rs/select.sh fix "$LIST" # Like `test`, but only the crates in a changed-file list plus their dependents. test-changed $LIST: sh/rs/select.sh test "$LIST" # Compile moq-tokio at its feature extremes; --all also isolates crypto and transport modes. [positional-arguments] tokio-features *args: sh/rs/tokio-features.sh "$@" # Runs the `#[cfg(windows)]` code past the compiler, which the Linux gate # skips; platform.yml runs it on a Windows runner, scoped like `check-changed` # so a release PR compiles only the affected crates. Default # features, since jemalloc doesn't build on MSVC. # Compile what the branch changed since BASE on a Windows host, or everything with `--all`. windows $BASE="": sh/rs/platform.sh "$BASE" # Test the platform-sensitive crates on Windows, independent of the diff. windows-test: just rs test --manifest-path rs/moq-auth/Cargo.toml just rs test -p hang -p moq-tokio -p moq-sock -p moq-relay just rs test -p moq-video --no-default-features --features render -E 'test(/^render::export::/)' # Run io_uring tests when the branch affects the relay or its dependencies. [positional-arguments] uring-changed base="": #!/usr/bin/env bash set -euo pipefail changed=$(mktemp) trap 'rm -f "$changed"' EXIT bash sh/changed.sh "$1" > "$changed" bash sh/rs/select.sh uring "$changed" # Compile and test the io_uring relay path, which is off the default feature set. # Linux-only; CI_STRICT requires a supported kernel instead of skipping tests. [positional-arguments] uring *args: just rs uring-check "$@" bash sh/rs/nextest.sh cargo nextest run --locked -p moq-uring -p moq-relay --features moq-relay/io-uring --tests "$@" # Signal ownership and scoped tracing must also survive sharing one process. cargo test --locked -p moq-relay --test integration # Needs a second IPv6 address on lo, which the io_uring CI lanes add. bash sh/rs/nextest.sh cargo nextest run --locked -p moq-uring --test integration --run-ignored only -E 'test(=local_addr::a_v6_wildcard_answers_from_the_address_reached)' "$@" bash sh/local.sh cargo clippy --locked -p moq-uring -p moq-relay --features moq-relay/io-uring,moq-relay/qlog --all-targets "$@" -- -D warnings bash sh/rs/nextest.sh cargo nextest run --locked -p moq-uring --features qlog --tests "$@" # Compile the io_uring relay path, off the default feature set. [positional-arguments] uring-check *args: bash sh/local.sh cargo clippy --locked -p moq-uring -p moq-relay --features moq-relay/io-uring --all-targets "$@" -- -D warnings # The Apple-gated code in moq-video, moq-audio, and moq-sock, which # platform.yml compiles on a Mac runner alongside `windows`. # Compile what the branch changed since BASE on a macOS host, or everything with `--all`. macos $BASE="": sh/rs/platform.sh "$BASE" # Test the platform-sensitive crates on macOS, independent of the diff. macos-test: just rs test --manifest-path rs/moq-auth/Cargo.toml just rs test -p hang -p moq-tokio -p moq-sock just rs test -p moq-sock --features fast-apple-datapath just rs test -p moq-video --no-default-features -E 'test(encode::backend::videotoolbox::tests)' just rs test -p moq-video --no-default-features --features render -E 'test(/^render::export::/)' # The runner's paravirtual Metal device proves the IOSurface import, ignored elsewhere. just rs test -p moq-video --no-default-features --features render --lib --run-ignored only \ -E 'test(/^render::renderer::tests::(the_metal_import_matches_the_cpu_path|imports_survive_decoder_pool_recycling)$/)' # Compile and lint the capture and playback features, which the default check skips. [positional-arguments] capture *args: bash sh/local.sh cargo clippy --locked -p moq-video -p moq-audio -p moq-scene -p moq-studio --all-targets --features moq-video/capture,moq-audio/capture,moq-audio/playback,moq-scene/capture,moq-studio/capture "$@" -- -D warnings # The capture and playback tests drive synthetic devices, so they need no hardware. # Test the capture and playback features, which the default test pass skips. [positional-arguments] capture-test *args: just rs test -p moq-video -p moq-audio -p moq-scene -p moq-studio --features moq-video/capture,moq-audio/capture,moq-audio/playback,moq-scene/capture,moq-studio/capture "$@" # Compare SHM and GetImage through production capture on the current X11 display. x11-bench: just rs test --release -p moq-video --no-default-features --features capture -E 'test(x11_capture_workload)' --run-ignored only --no-capture # Compare RGB conversion allocation separately, without an X server. x11-rgb-bench: just rs test --release -p moq-video --no-default-features --features capture -E 'test(x11_rgb_workload)' --run-ignored only --no-capture # Use an isolated virtual X server and retain paired measurements for comparison. x11-bench-ci: #!/usr/bin/env bash set -euo pipefail log="${MOQ_X11_BENCH_LOG:-.tmp/x11-capture-benchmark.log}" mkdir -p "$(dirname "$log")" { git rev-parse HEAD rustc --version xvfb-run -a -s "-screen 0 1920x1080x24 -nolisten tcp" just rs x11-bench just rs x11-rgb-bench } 2>&1 | tee "$log" # moq-video's MediaCodec code is `#[cfg(target_os = "android")]`. Needs an NDK, # which the dev shell lacks, so android.yml runs it outside Nix. `check` rather # than a denying clippy: the capture plumbing is dead on a target without a # capture backend. # Compile the Android backends, which the host-target check skips, and assert the # moq-ffi library links logcat: `Log::init` is silent on Android without it. [positional-arguments] android *args: bash sh/local.sh cargo ndk -t arm64-v8a --platform 26 check --locked -p moq-video --all-targets "$@" bash sh/local.sh cargo ndk -t arm64-v8a --platform 26 -o target/android-jni build-ffi "$@" nm -D --undefined-only target/android-jni/arm64-v8a/libmoq_ffi.so | grep -q __android_log_ # moq-wasm's crate root is `#![cfg(target_arch = "wasm32")]`, so only a wasm32 # build sees the code. Not to be confused with `just js wasm`, which builds the # shippable `@moq/wasm` package. `moq-mux` and `moq-ffi` share the invocation # because moq-mux needs the getrandom backend only its siblings declare, and # features unify only within one cargo invocation. `moq-clock` rides along to # compile its browser clock backend. # Compile and lint the browser/WASM bindings, which the host-target check skips. [positional-arguments] wasm *args: bash sh/local.sh cargo clippy --locked -p moq-wasm -p moq-mux -p moq-ffi -p moq-clock --target wasm32-unknown-unknown --lib "$@" -- -D warnings # Run the browser clock backend on the root devShell's Playwright Chromium, # with the runtime and with reads alone. wasm-test: CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_RUNNER="bun {{ justfile_directory() }}/test/wasm/rust.ts" bash sh/local.sh cargo test --locked -p moq-clock --lib --target wasm32-unknown-unknown CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_RUNNER="bun {{ justfile_directory() }}/test/wasm/rust.ts" bash sh/local.sh cargo test --locked -p moq-clock --lib --target wasm32-unknown-unknown --no-default-features # Auto-fix the browser/WASM bindings. [positional-arguments] wasm-fix *args: bash sh/local.sh cargo clippy --locked --fix --allow-staged --allow-dirty -p moq-wasm -p moq-mux -p moq-ffi -p moq-clock --target wasm32-unknown-unknown --lib "$@" cargo fmt -p moq-wasm -p moq-mux -p moq-ffi -p moq-clock # Audit dependencies against deny.toml. Nightly: advisories land without a diff. audit: bash sh/local.sh cargo deny check --show-stats # Verify relay startup validation without a QUIC backend. relay-minimal: bash sh/rs/nextest.sh cargo nextest run --locked -p moq-relay --no-default-features --lib -E 'test(workers_require_a_quic_backend)' # Outside nextest because the staticlib link alone outlasts its hang budget. # Compile and run moq-c's C fixtures, and the C doc samples, against libmoq.a. Must run on Unix. c-tests: sh/rs/c-tests.sh # Benchmarks and examples stay in Nightly; the gate compiles the same targets # it tests, with both extremes exercising feature-gated implementation arms. # Isolate selected packages so a dependent cannot enable a feature that hides a warning. [positional-arguments] feature-shapes *args: bash sh/local.sh cargo hack clippy --locked --tests --no-default-features "$@" -- -D warnings bash sh/local.sh cargo hack clippy --locked --tests --all-features "$@" -- -D warnings # Compile the full feature matrix, including isolated combinations and their tests. features: just rs net-features --all just rs quic-features --all 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 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 bash sh/local.sh cargo check --locked -p moq-cli --no-default-features just rs test -p moq-cli --no-default-features --features capture,websocket -E 'test(capture_window)' just rs test -p moq-cli --no-default-features --features capture,pipewire,websocket -E 'test(capture_window)' bash sh/local.sh cargo check --locked -p moq-bench --no-default-features bash sh/local.sh cargo check --locked -p moq-boy --no-default-features bash sh/local.sh cargo check --locked -p moq-hls -p moq-rtmp -p moq-rtc --no-default-features --all-targets bash sh/local.sh cargo clippy --locked --workspace {{ no_fuzz }} --all-targets --all-features -- -D warnings RUSTDOCFLAGS="-D warnings" bash sh/local.sh cargo doc --locked --workspace {{ no_fuzz }} --all-features --no-deps bash sh/rs/nextest.sh cargo nextest run --locked --workspace {{ no_fuzz }} --all-targets --all-features # Compile and test the explicit-time model without async helpers or sessions. [positional-arguments] net-features *args: bash sh/rs/net-features.sh "$@" # Prove moq-quic leaves moq-clock's dev-only runtime to its consumers, and lints without its default features; a workspace build unifies both back in. [positional-arguments] quic-features *args: #!/usr/bin/env bash set -euo pipefail targets=(--tests) if [[ $# == 1 && $1 == --all ]]; then targets=(--all-targets) elif [[ $# != 0 ]]; then echo 'usage: just rs quic-features [--all]' >&2 exit 2 fi graph=$(cargo tree --locked -p moq-quic -e normal --prefix none) if grep -E '^(tokio|web-async) ' <<<"$graph"; then echo "moq-quic must not depend on a native runtime" >&2 exit 1 fi bash sh/local.sh cargo clippy --locked -p moq-quic "${targets[@]}" --no-default-features -- -D warnings # Compile media boundaries (--all isolates every mode) and prove expensive # native/render dependencies are absent when their features are excluded. [positional-arguments] media-features *args: sh/rs/media-features.sh "$@" # nextest kills a wedged test (`.config/nextest.toml` sets the timeout), but # skips doctests; `just rs doctest` covers those. clippy-driver as the workspace # wrapper enforces lint findings from the same compile. `--tests` builds library, # binary, and integration-test targets, including binary-only crates; benches and # examples compile and lint in Nightly's `features`. `build.warnings` denies # warnings without changing cargo's artifact fingerprint, unlike RUSTFLAGS. # Run library, binary, and integration tests, enforcing clippy from the same compile. [positional-arguments] test *args: CARGO_BUILD_WARNINGS=deny RUSTC_WORKSPACE_WRAPPER={{ quote(require("clippy-driver")) }} bash sh/rs/nextest.sh cargo nextest run --locked --tests "$@" # Exercise the ignored hardware tests for every GPU vendor on this Linux host. gpu: sh/rs/gpu.sh # The media tasks run against a recorder rather than a device (see # `rs/moq-cli/src/play/fake.rs`), so this needs no speaker or display. Only the # binary's own tests: the integration tests spawn verbs `play` leaves alone, # and the default pass already runs them. # Test moq-cli's `play` feature, which default features leave out. [positional-arguments] play *args: CARGO_BUILD_WARNINGS=deny RUSTC_WORKSPACE_WRAPPER={{ quote(require("clippy-driver")) }} bash sh/rs/nextest.sh cargo nextest run --locked -p moq-cli --features play,openh264 --bins "$@" # Compile and run the `/// ```` examples, which nextest skips. [positional-arguments] doctest *args: bash sh/local.sh cargo test --locked --doc "$@" # `--cfg loom` swaps kio's primitives for loom's, so it rebuilds the world and # executes only in Nightly; the selected Rust gate compiles it with `--no-run`. # `--release` because a model check runs the body once # per interleaving (411s -> 51s); the assertions are plain `assert!`. kio's # models search every interleaving; moq-net's cap preemptions (see # `tests/loom.rs`, `LOOM_MAX_PREEMPTIONS`). kio's own unit tests are # `cfg(not(loom))`. # Permutation-test the concurrent handoffs with loom. `crossbeam_loom` puts the # epoch collector that frees `kio::log` segments under loom too. [positional-arguments] loom *args: RUSTFLAGS="--cfg loom --cfg crossbeam_loom" cargo test --locked --release -p kio --lib loom:: "$@" RUSTFLAGS="--cfg loom --cfg crossbeam_loom" cargo test --locked --release -p moq-net --test loom "$@" RUSTFLAGS="--cfg loom --cfg crossbeam_loom" cargo test --locked --release -p moq-net --test expiry-loom "$@" # Run the moq-quic simulation's random workloads from a fresh seed, printing the settings that replay it, then the bandwidth probe's acceptance suite. quic-sim: #!/usr/bin/env bash set -euo pipefail export MOQ_QUIC_SEED=${MOQ_QUIC_SEED:-$((RANDOM << 15 | RANDOM))} export MOQ_QUIC_CASES=${MOQ_QUIC_CASES:-4096} echo "MOQ_QUIC_SEED=$MOQ_QUIC_SEED MOQ_QUIC_CASES=$MOQ_QUIC_CASES" # Release keeps the sweep inside nextest's hang budget; the checks stay on so it still catches what a debug run would. export CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS=true CARGO_PROFILE_RELEASE_OVERFLOW_CHECKS=true bash sh/rs/nextest.sh cargo nextest run --locked --release -p moq-quic --lib -E 'test(/^tests::sim::/)' # The bandwidth probe's acceptance suite, over fixed seeds: the merge gate runs only its short cases. bash sh/rs/nextest.sh cargo nextest run --locked --release -p moq-quic --lib --run-ignored only -E 'test(/^tests::probe::/)' # Prove downstream futures are Send at the default recursion limit on nightly. send-depth: bash sh/rs/send-depth.sh # Run moq-cli's `moq export` process tests, which feed a real relay and wait out follows in real time. [positional-arguments] cli-export *args: just rs test -p moq-cli --test integration --run-ignored only -E 'test(/^export::/)' "$@" # Exercise small connection and stream receive windows over real QUIC sockets. quic-stress: just rs test -p moq-tokio --lib --run-ignored only -E 'test(/^quic::driver::tests::stress_/)' # Render CPU frames, composite scenes, and publish a studio program through wgpu on # Mesa's software Vulkan driver, so no GPU is needed. render-sw: #!/usr/bin/env bash set -euo pipefail mesa=$(nix build --inputs-from . --no-link --print-out-paths nixpkgs#mesa) loader=$(nix build --inputs-from . --no-link --print-out-paths nixpkgs#vulkan-loader) icd=("$mesa"/share/vulkan/icd.d/lvp_icd.*.json) LD_LIBRARY_PATH="$loader/lib" VK_DRIVER_FILES="${icd[0]}" \ just rs test -p moq-video --features render --lib --run-ignored only \ -E 'test(/^render::renderer::tests::(the_declared_color_space_beats_the_size_guess|cpu_frames_survive_the_round_trip|config_size_overrides_the_frame_size|an_unimportable_gpu_frame_is_refused|the_output_follows_the_device)$/)' # Mesa's software driver exports no memory, so this covers the readback route. LD_LIBRARY_PATH="$loader/lib" VK_DRIVER_FILES="${icd[0]}" \ just rs test -p moq-video --features render,openh264 --lib --run-ignored only -E 'test(/^render::export::(nv12::)?tests::/)' LD_LIBRARY_PATH="$loader/lib" VK_DRIVER_FILES="${icd[0]}" \ just rs test -p moq-scene --lib --run-ignored only -E 'test(/^compositor::tests::/)' LD_LIBRARY_PATH="$loader/lib" VK_DRIVER_FILES="${icd[0]}" \ just rs test -p moq-studio --features openh264 --run-ignored only -E 'test(=engine::tests::the_program_reaches_a_relay)' # Run the ignored mDNS tests, which multicast on the host's network interfaces. multicast: just rs test -p moq-tokio --features mdns --lib --run-ignored only -E 'test(=mdns::tests::apps_partition_discovery) | test(/^mdns::tests::daemon_/)' just rs test -p moq-relay --features cluster-lan --run-ignored only -E 'test(/^lan_mesh::/)' # Run the long TS recovery arms; a failing arm keeps its export and ledgers under $HARNESS_RUNS. ts-recovery: just rs test -p moq-mux --lib --run-ignored only -E 'test(/^container::ts::recovery_test::long_/)' # Run moq-audio's ignored output-device tests against a private PulseAudio null sink. audio-devices: #!/usr/bin/env bash set -euo pipefail dir=$(mktemp -d) trap 'rm -rf "$dir"' EXIT python3 test/lib/pulse.py --dir "$dir/run" -- \ just rs test -p moq-audio --features aec,pulseaudio --run-ignored only -E 'not test(/benchmark_/)' # Needs nightly and cargo-fuzz; CI replays the corpus on stable through each # crate's own tests instead. See rs/moq-net/fuzz/README.md and rs/moq-quic/fuzz/README.md. # Fuzz a moq-net or moq-quic target by name: `just rs fuzz lite -- -max_total_time=300`. # `just rs fuzz --minimize lite` shrinks its corpus instead. [positional-arguments] fuzz target *args: sh/rs/fuzz.sh "$@" # No threshold: the report is for finding untested paths, not gating. # The LLVM tools come from the toolchain's `llvm-tools`. # Report native workspace or one crate's coverage under target/coverage/. coverage crate="workspace": bash sh/rs/coverage.sh '{{ crate }}' # Build the default workspace members. build: bash sh/local.sh cargo build --locked # Run the comparable epoll and io_uring UDP matrices. [positional-arguments] bench-udp *args: bash sh/local.sh cargo bench -p moq-uring --bench udp_tokio -- "$@" bash sh/local.sh cargo bench -p moq-uring --bench udp_uring -- "$@" # Measure a QUIC echo through the io_uring worker, ablating receive # batching, GRO, and GSO one at a time. Linux 6.12+ (skips loudly otherwise). [positional-arguments] bench-echo *args: bash sh/local.sh cargo bench -p moq-uring --bench echo_quic -- "$@" # Measure a full moq-lite session (publisher to subscriber) through the # io_uring worker, same ablations and per-iteration unit as bench-echo. # Linux 6.12+ (skips loudly otherwise). [positional-arguments] bench-session *args: bash sh/local.sh cargo bench -p moq-uring --bench session_lite -- "$@" # Create release PRs and publish crates via release-plz. release: release-plz release-pr --git-token "$GITHUB_TOKEN" release-plz release --git-token "$GITHUB_TOKEN" # Build a .deb or .rpm locally: `just rs package moq-relay deb`. package crate packager: sh/rs/package.sh {{ crate }} {{ packager }} # Build and package a workspace binary as a release tarball. [positional-arguments] package-binary *args: sh/rs/package-binary.sh "$@" # Build and package a workspace binary as a Windows .zip. [positional-arguments] package-windows *args: sh/rs/package-windows.sh "$@" # Render an nfpm config from the environment and build a .deb or .rpm: CONFIG PACKAGER OUTPUT. [positional-arguments] package-nfpm *args: sh/rs/package-nfpm.sh "$@" # Build and package the moq-ffi native libraries, or only its bindings. [positional-arguments] package-ffi *args: rs/moq-ffi/build.sh "$@" # Build and package moq-c. [positional-arguments] package-moq-c *args: rs/moq-c/build.sh "$@" # Build and package the moq-gst GStreamer plugin. [positional-arguments] package-gst *args: rs/moq-gst/build.sh "$@" # Load a packaged moq-gst plugin into the host's GStreamer and find its elements. [positional-arguments] gst-smoke *args: rs/moq-gst/smoke.sh "$@" # Build the Criterion benches CodSpeed simulates; CI runs them with `cargo codspeed run`. # Only single-threaded benches without I/O, whose instruction counts repeat. CodSpeed skips # `iter_custom`, so targets made only of it are left out too. Nightly still measures them all. codspeed: cargo codspeed build --locked -m simulation \ -p kio -p moq-audio -p moq-e2ee -p moq-json -p moq-mux -p moq-net -p moq-pattern -p moq-quic -p moq-rtmp \ --features moq-audio/bus,moq-net/fuzz,moq-quic/fuzz \ --bench tasks --bench waiter --bench bus --bench protect --bench codec --bench table \ --bench catalog --bench containers --bench decode_clock --bench export --bench jitter \ --bench parameter_sets --bench ts_programs --bench ts_schedule --bench ts_video \ --bench announce --bench auth --bench bandwidth --bench canonical --bench frame --bench interests \ --bench priority --bench retirement --bench schedule --bench stats --bench synced --bench tail \ --bench tracks --bench varint --bench viewers --bench matching \ --bench endpoint --bench receive --bench sent_packets --bench streams --bench chunk_interleaving # Held feed FETCH readiness across independent request and track counts. [positional-arguments] bench-feed-fetch *args: bash sh/rs/nextest.sh cargo nextest run --locked --release -p moq-net --lib --run-ignored only -E 'test(benchmark_feed_fetch_wakes)' --success-output immediate "$@" # Device-free mixer and resampler cost, swept over fanout, packetization, and layout. bench-playback: bash sh/rs/nextest.sh cargo nextest run --locked --release -p moq-audio --features playback --run-ignored only -E 'test(benchmark_mixer_callbacks) | test(benchmark_resampler)' --success-output immediate # Sweep retained RTMP chunk-stream IDs independently of message and chunk sizes. [positional-arguments] bench-rtmp *args: bash sh/local.sh cargo bench --locked -p moq-rtmp --bench chunk_interleaving -- "$@" # Refresh one credential across unrelated sessions and held token counts. [positional-arguments] bench-relay-auth *args: bash sh/local.sh cargo bench --locked -p moq-relay --bench auth -- "$@" # One relay's stats tick, plus the decode and aggregate tables. `--test` runs each tick once; the tables ignore it and print every configuration. [positional-arguments] bench-stats *args: bash sh/local.sh cargo bench --locked -p moq-stats --features bench --bench producer_tick --bench decode --bench aggregate -- "$@" # Sweep latency observations against writer count and report density. bench-latency: bash sh/rs/nextest.sh cargo nextest run --locked --release -p moq-bench --run-ignored only -E 'test(benchmark_observation_contention)' --success-output immediate # Exact TS receiver scheduling across PID and queued-unit fanout. [positional-arguments] bench-ts-schedule *args: bash sh/local.sh cargo bench --locked -p moq-mux --bench ts_schedule -- "$@" # Ingest an MPTS across program count, bitrate and stray PIDs, the strays against null packets that skip the accounting. [positional-arguments] bench-ts-programs *args: cargo bench --locked -p moq-mux --bench ts_programs -- "$@" # Sweep container export tracks and queued frames independently. [positional-arguments] bench-export *args: bash sh/local.sh cargo bench --locked -p moq-mux --bench export -- "$@" # Requested-pad catalog gating and resolved EOS lookup across renditions x touched pads. [positional-arguments] bench-gst-catalog *args: bash sh/local.sh cargo bench -p moq-gst --bench catalog "$@"