From acc95bda1644a7c1b802ec4b30f32948bbaa987e Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sat, 31 Oct 2026 15:26:09 -0700 Subject: [PATCH 1/6] chore(quest): claim quest/m1/vendor-sync/uniffi.md Quest-Claim: be82868751423471 From c9971cbd48a8a22c83a4039314c9428eae6bace2 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sat, 31 Oct 2026 15:41:03 -0700 Subject: [PATCH 2/6] chore(uniffi): checkpoint upstream audit and blocked ports Record checked upstream heads, reproduced fixes, tested fork and rust2 drafts, and the local Cargo/review blockers. Leave pin integration and the quest unfinished. Co-Authored-By: GPT-6.1 Sol --- quest/m1/vendor-sync/uniffi.md | 81 +++++++++++++++++++++++++--------- 1 file changed, 59 insertions(+), 22 deletions(-) diff --git a/quest/m1/vendor-sync/uniffi.md b/quest/m1/vendor-sync/uniffi.md index 44fa8ba4651..ae7273ff90d 100644 --- a/quest/m1/vendor-sync/uniffi.md +++ b/quest/m1/vendor-sync/uniffi.md @@ -27,25 +27,62 @@ A port means a commit on the fork and a pin bump in moq (`flake.nix` and the places its "five places" comments name), with regenerated bindings diffed and each wrapper's check run. -Last checked (2026-10-30), with each fork's base and pin: - -| Fork | Base | Pin | Upstream head | Behind | -|---|---|---|---|---| -| uniffi-rs | `v0.32.2` (`7bc621ee`) | `88d835d6` | `ef9625b6` | 105 on `main`, no newer release | -| uniffi-bindgen-go | `0b7fb4ce` | `v0.10.0-kixelated.1+v0.32.0` | `0b7fb4ce` | 0 | -| uniffi-dart | `72d26c1f` | `v0.3.1-kixelated.6+v0.32.0` | `34f57ea7` | 26 | -| uniffi-bindgen-cpp | `20bef754` | `v0.11.0-kixelated.7+v0.32.2` | `20bef754` | 0 | - -First run, check these first: - -- uniffi-dart [`71dc9f8b`](https://github.com/Uniffi-Dart/uniffi-dart/commit/71dc9f8b) - frees native scratch after an owned input conversion, a leak in every Dart - call that takes one. Upstream also merged the library-mode CLI and the enum - collision fix the fork carries, so rebasing the fork onto upstream may - shrink it; also check `019f3192` (custom types lowered to their builtin in - FFI signatures) and `a316d101` (`$` escaped in string defaults). -- uniffi-rs `main`, unreleased: [`2ccd07e2`](https://github.com/mozilla/uniffi-rs/commit/2ccd07e2) - (Kotlin checksum compares the right u16), - [`d1f766f4`](https://github.com/mozilla/uniffi-rs/commit/d1f766f4) (Kotlin - Throwable handling), and [`f903c36c`](https://github.com/mozilla/uniffi-rs/commit/f903c36c) - (Python prefers the running event loop). +Checked upstream on 2026-10-31, against these unchanged MoQ pins: + +| Fork | Base | Pin | Upstream head checked | +|---|---|---|---| +| uniffi-rs | `v0.32.2` (`7bc621ee`) | `88d835d6` | [`ef9625b6`](https://github.com/mozilla/uniffi-rs/commit/ef9625b68dd51207f55f024a27649e58edb52b09) | +| uniffi-bindgen-go | `0b7fb4ce` | `v0.10.0-kixelated.1+v0.32.0` | [`0b7fb4ce`](https://github.com/NordSecurity/uniffi-bindgen-go/commit/0b7fb4ceef12021bd7f790cc516fa9133e001813) | +| uniffi-dart | `72d26c1f` | `v0.3.1-kixelated.6+v0.32.0` | [`e644a4ad`](https://github.com/Uniffi-Dart/uniffi-dart/commit/e644a4ad980f72697aba211fd30cb4fbd8fc7324) | +| uniffi-bindgen-cpp | `20bef754` | `v0.11.0-kixelated.7+v0.32.2` | [`20bef754`](https://github.com/livekit/uniffi-bindgen-cpp/commit/20bef754391023df147267482513c35120dee343) | + +Each upstream's public GitHub security-advisories endpoint returned no +published advisories. Go and C++ have no new upstream commits. Kotlin's +checksum mask is already in the pin, backported as `2a8331b7` before 0.32.2. + +Tested ports are held in draft checkpoints, not a completed sync: + +- [kixelated/uniffi-rs#1](https://github.com/kixelated/uniffi-rs/pull/1), head + `35209f3f87051b940f68138fe685ed3ecfb02038`: Python's running-loop preference + (`f903c36c`), preserving the 0.32 setter name. The upstream two-loop + regression reproduces the cross-loop failure before the port, and the + futures Python suite passes afterward. Formatting passes. +- [kixelated/uniffi-dart#7](https://github.com/kixelated/uniffi-dart/pull/7), head + `657cbff560dcca4cd32e32cbe0c4f3b3e34803b7`: nested input-scratch cleanup from + `71dc9f8b` and disposal status reservation from `a2751c4c`, in all three + object/trait implementations. Fault injection reproduces leaked scratch + and lost native drops before the port; input_scratch, callbacks, and + trait_interfaces fixture suites pass afterward. Formatting passes. +- [moq-dev/rust2#364](https://github.com/moq-dev/rust2/pull/364), head + `832a146a2c5c09e15e87880f21a884c33a8f6564`: mirrors both ports. Its four + foreign-language fixture suites and full `just check` pass. `just ci` was + stopped cleanly during the unrelated TypeScript differential tests after + the review blocker was confirmed; full CI remains incomplete. + +Dart already carries successful scratch cleanup, copied returned bytes, +returned/error RustBuffer ownership, disposal guards, the library-mode CLI, +and enum collision fix. MoQ exports no foreign-implementable traits, custom +types, dollar-bearing defaults, or recursive enum graphs. Kotlin Throwable +handling, Swift async callback concurrency, Dart incoming callback buffers, +custom FFI lowering, string-default escaping, and recursive/custom-type fixes +have no current generated MoQ consumer. The parser, JNI backend, mutable +bytes, library-mode removal, and dependency updates are outside this port. + +Blocked checkpoint (2026-10-31): + +- Both fork `quest review --base origin/moq-0.32` attempts failed before + reviewing: Claude Code reports its weekly limit, resetting 2026-11-02 at + 02:00 America/Los_Angeles. No substitute review or exemption was used. +- MoQ's `quest gate just ci` fails in the unchanged + `sh/rs/test-lints.test.py`: mbx cannot launch Cargo (`Argument list too + long`, os error 7), so the expected Clippy diagnostic is absent. The source + files match `origin/main`. Open PRs were searched; the inspected + [dispatcher environment fix](https://github.com/moq-dev/moq/pull/7432) + does not address this Cargo launch failure. The other selected checks pass. + A direct MoQ build preflight passed, so that alone does not clear this gate. + +Remaining: complete the required other-vendor reviews and rust2's full CI; +then integrate the reviewed pins with the existing Nix patches/lock data, +diff regenerated bindings, and run every wrapper's check plus +`just test interop --all`. Pins and generated output remain unchanged in +this checkpoint. Keep this quest open until the whole operation passes. From 7c5dac349dc0126db9e6792c2d86f80ee33516e7 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sat, 31 Oct 2026 22:56:37 -0700 Subject: [PATCH 3/6] chore(uniffi): pin the reviewed generator ports and regenerate Dart Point the Python/Kotlin/Swift generator at kixelated/uniffi-rs#1's head (running-loop preference) and the Dart generator at kixelated/uniffi-dart#7's head (allocation-failure ownership), add the new fixture to the Nix lock data, and regenerate the committed Dart bindings. Co-Authored-By: Claude Opus 5.5 --- Cargo.lock | 104 +++--- dart/README.md | 6 +- dart/moq_ffi/lib/src/moq.dart | 450 ++++++++++++++++++----- dart/moq_ffi/lib/src/uniffi_runtime.dart | 18 +- flake.nix | 8 +- nix/uniffi-dart-Cargo.lock | 9 + rs/uniffi-bindgen/Cargo.toml | 2 +- 7 files changed, 430 insertions(+), 167 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fc99949eb79..de18570d43b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -228,7 +228,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -239,7 +239,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -282,7 +282,7 @@ dependencies = [ "objc2-foundation 0.3.2", "parking_lot", "percent-encoding", - "windows-sys 0.61.2", + "windows-sys 0.52.0", "x11rb 0.13.2", ] @@ -1561,7 +1561,7 @@ version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "faf9468729b8cbcea668e36183cb69d317348c2e08e994829fb56ebfdfbaac34" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -2132,7 +2132,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c54e03a951783e8b327515db3f2a2fd0e3bed362a96b066f341ce66ed49b4ead" dependencies = [ "data-encoding", - "syn 3.0.6", + "syn 1.0.109", ] [[package]] @@ -2401,8 +2401,8 @@ checksum = "263c0ccfc6b3b6a93e959edad4f985779e76c0b36dbb2e13e3d27c690974adf1" dependencies = [ "cfg-if", "libc", - "socket2 0.6.5", - "windows-sys 0.61.2", + "socket2 0.5.10", + "windows-sys 0.60.2", ] [[package]] @@ -2799,7 +2799,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -3261,7 +3261,7 @@ dependencies = [ "gobject-sys", "libc", "system-deps 9.0.0", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -4515,7 +4515,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ "hermit-abi", "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -6850,7 +6850,7 @@ dependencies = [ "pin-project-lite", "rustc-hash 2.1.3", "rustls", - "socket2 0.6.5", + "socket2 0.5.10", "thiserror 2.0.21", "tokio", "tokio-stream", @@ -6893,7 +6893,7 @@ checksum = "4dc50afea61aff926e150a36c31f06094608848e114a3fe667d76ec233163b1c" dependencies = [ "cfg_aliases", "libc", - "socket2 0.6.5", + "socket2 0.5.10", "tracing", "windows-sys 0.61.2", ] @@ -6940,7 +6940,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -8610,7 +8610,7 @@ dependencies = [ "quinn-udp", "rustc-hash 2.1.3", "rustls", - "socket2 0.6.5", + "socket2 0.5.10", "thiserror 2.0.21", "tokio", "tracing", @@ -8649,9 +8649,9 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.6.5", + "socket2 0.5.10", "tracing", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -9205,7 +9205,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.12.1", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -9290,7 +9290,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -10221,7 +10221,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -10760,10 +10760,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.4.3", + "getrandom 0.3.4", "once_cell", "rustix 1.1.5", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -10782,7 +10782,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "230a1b821ccbd75b185820a1f1ff7b14d21da1e442e22c0863ea5f08771a8874" dependencies = [ "rustix 1.1.5", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -11479,7 +11479,7 @@ checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" dependencies = [ "memoffset", "tempfile", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -11535,23 +11535,23 @@ dependencies = [ [[package]] name = "uniffi" version = "0.32.2" -source = "git+https://github.com/kixelated/uniffi-rs?rev=88d835d#88d835d66abc6357b0bcd290b4c2adb35096cd10" +source = "git+https://github.com/kixelated/uniffi-rs?rev=35209f3#35209f3f87051b940f68138fe685ed3ecfb02038" dependencies = [ "anyhow", "camino", "cargo_metadata", "clap", - "uniffi_bindgen 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=88d835d)", - "uniffi_core 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=88d835d)", - "uniffi_macros 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=88d835d)", - "uniffi_pipeline 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=88d835d)", + "uniffi_bindgen 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=35209f3)", + "uniffi_core 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=35209f3)", + "uniffi_macros 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=35209f3)", + "uniffi_pipeline 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=35209f3)", ] [[package]] name = "uniffi-bindgen" version = "0.1.0" dependencies = [ - "uniffi 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=88d835d)", + "uniffi 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=35209f3)", ] [[package]] @@ -11573,7 +11573,7 @@ dependencies = [ "serde", "tempfile", "textwrap", - "toml 1.1.6+spec-1.1.0", + "toml 0.9.12+spec-1.1.0", "uniffi_internal_macros 0.32.2 (registry+https://github.com/rust-lang/crates.io-index)", "uniffi_meta 0.32.2 (registry+https://github.com/rust-lang/crates.io-index)", "uniffi_pipeline 0.32.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -11583,7 +11583,7 @@ dependencies = [ [[package]] name = "uniffi_bindgen" version = "0.32.2" -source = "git+https://github.com/kixelated/uniffi-rs?rev=88d835d#88d835d66abc6357b0bcd290b4c2adb35096cd10" +source = "git+https://github.com/kixelated/uniffi-rs?rev=35209f3#35209f3f87051b940f68138fe685ed3ecfb02038" dependencies = [ "anyhow", "askama", @@ -11598,11 +11598,11 @@ dependencies = [ "serde", "tempfile", "textwrap", - "toml 1.1.6+spec-1.1.0", - "uniffi_internal_macros 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=88d835d)", - "uniffi_meta 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=88d835d)", - "uniffi_pipeline 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=88d835d)", - "uniffi_udl 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=88d835d)", + "toml 0.9.12+spec-1.1.0", + "uniffi_internal_macros 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=35209f3)", + "uniffi_meta 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=35209f3)", + "uniffi_pipeline 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=35209f3)", + "uniffi_udl 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=35209f3)", ] [[package]] @@ -11620,7 +11620,7 @@ dependencies = [ [[package]] name = "uniffi_core" version = "0.32.2" -source = "git+https://github.com/kixelated/uniffi-rs?rev=88d835d#88d835d66abc6357b0bcd290b4c2adb35096cd10" +source = "git+https://github.com/kixelated/uniffi-rs?rev=35209f3#35209f3f87051b940f68138fe685ed3ecfb02038" dependencies = [ "anyhow", "bytes", @@ -11644,7 +11644,7 @@ dependencies = [ [[package]] name = "uniffi_internal_macros" version = "0.32.2" -source = "git+https://github.com/kixelated/uniffi-rs?rev=88d835d#88d835d66abc6357b0bcd290b4c2adb35096cd10" +source = "git+https://github.com/kixelated/uniffi-rs?rev=35209f3#35209f3f87051b940f68138fe685ed3ecfb02038" dependencies = [ "anyhow", "indexmap 2.14.2", @@ -11666,14 +11666,14 @@ dependencies = [ "quote", "serde", "syn 2.0.119", - "toml 1.1.6+spec-1.1.0", + "toml 0.9.12+spec-1.1.0", "uniffi_meta 0.32.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "uniffi_macros" version = "0.32.2" -source = "git+https://github.com/kixelated/uniffi-rs?rev=88d835d#88d835d66abc6357b0bcd290b4c2adb35096cd10" +source = "git+https://github.com/kixelated/uniffi-rs?rev=35209f3#35209f3f87051b940f68138fe685ed3ecfb02038" dependencies = [ "camino", "fs-err", @@ -11682,8 +11682,8 @@ dependencies = [ "quote", "serde", "syn 2.0.119", - "toml 1.1.6+spec-1.1.0", - "uniffi_meta 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=88d835d)", + "toml 0.9.12+spec-1.1.0", + "uniffi_meta 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=35209f3)", ] [[package]] @@ -11701,12 +11701,12 @@ dependencies = [ [[package]] name = "uniffi_meta" version = "0.32.2" -source = "git+https://github.com/kixelated/uniffi-rs?rev=88d835d#88d835d66abc6357b0bcd290b4c2adb35096cd10" +source = "git+https://github.com/kixelated/uniffi-rs?rev=35209f3#35209f3f87051b940f68138fe685ed3ecfb02038" dependencies = [ "anyhow", "siphasher", - "uniffi_internal_macros 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=88d835d)", - "uniffi_pipeline 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=88d835d)", + "uniffi_internal_macros 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=35209f3)", + "uniffi_pipeline 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=35209f3)", ] [[package]] @@ -11725,13 +11725,13 @@ dependencies = [ [[package]] name = "uniffi_pipeline" version = "0.32.2" -source = "git+https://github.com/kixelated/uniffi-rs?rev=88d835d#88d835d66abc6357b0bcd290b4c2adb35096cd10" +source = "git+https://github.com/kixelated/uniffi-rs?rev=35209f3#35209f3f87051b940f68138fe685ed3ecfb02038" dependencies = [ "anyhow", "heck", "indexmap 2.14.2", "tempfile", - "uniffi_internal_macros 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=88d835d)", + "uniffi_internal_macros 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=35209f3)", ] [[package]] @@ -11749,12 +11749,12 @@ dependencies = [ [[package]] name = "uniffi_udl" version = "0.32.2" -source = "git+https://github.com/kixelated/uniffi-rs?rev=88d835d#88d835d66abc6357b0bcd290b4c2adb35096cd10" +source = "git+https://github.com/kixelated/uniffi-rs?rev=35209f3#35209f3f87051b940f68138fe685ed3ecfb02038" dependencies = [ "anyhow", "textwrap", - "uniffi_meta 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=88d835d)", - "weedle2 5.0.0 (git+https://github.com/kixelated/uniffi-rs?rev=88d835d)", + "uniffi_meta 0.32.2 (git+https://github.com/kixelated/uniffi-rs?rev=35209f3)", + "weedle2 5.0.0 (git+https://github.com/kixelated/uniffi-rs?rev=35209f3)", ] [[package]] @@ -12308,7 +12308,7 @@ dependencies = [ [[package]] name = "weedle2" version = "5.0.0" -source = "git+https://github.com/kixelated/uniffi-rs?rev=88d835d#88d835d66abc6357b0bcd290b4c2adb35096cd10" +source = "git+https://github.com/kixelated/uniffi-rs?rev=35209f3#35209f3f87051b940f68138fe685ed3ecfb02038" dependencies = [ "nom 7.1.3", ] @@ -12540,7 +12540,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] diff --git a/dart/README.md b/dart/README.md index 53dba2c52f8..45bf2901a77 100644 --- a/dart/README.md +++ b/dart/README.md @@ -23,14 +23,14 @@ WebAssembly. Browser applications should use the TypeScript packages. ## Generator Bindings use [`kixelated/uniffi-dart`](https://github.com/kixelated/uniffi-dart) -tag `v0.3.1-kixelated.6+v0.32.0`, which carries the UniFFI 0.32, -library-mode CLI, and disposed-argument changes. The Nix development shell supplies that exact +revision `657cbff5`, which carries the UniFFI 0.32, library-mode CLI, +disposed-argument, and allocation-failure ownership changes. The Nix development shell supplies that exact revision plus the `nix/uniffi-dart-*.patch` fixes. Without Nix, install it without those fixes: ```bash cargo install --git https://github.com/kixelated/uniffi-dart \ - --tag 'v0.3.1-kixelated.6+v0.32.0' --features binary uniffi-dart + --rev 657cbff560dcca4cd32e32cbe0c4f3b3e34803b7 --features binary uniffi-dart ``` ## Releases diff --git a/dart/moq_ffi/lib/src/moq.dart b/dart/moq_ffi/lib/src/moq.dart index 535337e1521..69af0f0ea22 100644 --- a/dart/moq_ffi/lib/src/moq.dart +++ b/dart/moq_ffi/lib/src/moq.dart @@ -8792,9 +8792,15 @@ class MoqAudioCodec implements MoqAudioCodecInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqAudioCodecFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqaudiocodec(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqaudiocodec(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } } @@ -8878,9 +8884,15 @@ class MoqAudioConsumer implements MoqAudioConsumerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqAudioConsumerFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqaudioconsumer(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqaudioconsumer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void cancel() { @@ -8987,9 +8999,15 @@ class MoqAudioEncoder implements MoqAudioEncoderInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqAudioEncoderFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqaudioencoder(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqaudioencoder(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } MoqAudioPacket encode({required List pcm}) { @@ -9122,9 +9140,15 @@ class MoqAudioProducer implements MoqAudioProducerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqAudioProducerFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqaudioproducer(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqaudioproducer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } MoqTrackDemand demand() { @@ -9236,9 +9260,15 @@ class MoqGrantConsumer implements MoqGrantConsumerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqGrantConsumerFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqgrantconsumer(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqgrantconsumer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void cancel() { @@ -9332,9 +9362,15 @@ class MoqAllocator implements MoqAllocatorInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqAllocatorFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqallocator(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqallocator(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } MoqReservation reserve({ @@ -9414,11 +9450,15 @@ class MoqBandwidthConsumer implements MoqBandwidthConsumerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqBandwidthConsumerFinalizer.detach(this); - rustCall( - (status) => uniffi_moq_ffi_fn_free_moqbandwidthconsumer(_ptr, status), - ); + try { + uniffi_moq_ffi_fn_free_moqbandwidthconsumer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void cancel() { @@ -9513,9 +9553,15 @@ class MoqReservation implements MoqReservationInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqReservationFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqreservation(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqreservation(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } int? rate() { @@ -9610,11 +9656,15 @@ class MoqBroadcastConsumer implements MoqBroadcastConsumerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqBroadcastConsumerFinalizer.detach(this); - rustCall( - (status) => uniffi_moq_ffi_fn_free_moqbroadcastconsumer(_ptr, status), - ); + try { + uniffi_moq_ffi_fn_free_moqbroadcastconsumer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } UniffiRustFuture closed() { @@ -9750,9 +9800,15 @@ class MoqGroupConsumer implements MoqGroupConsumerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqGroupConsumerFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqgroupconsumer(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqgroupconsumer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void cancel() { @@ -9852,9 +9908,15 @@ class MoqTrackConsumer implements MoqTrackConsumerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqTrackConsumerFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqtrackconsumer(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqtrackconsumer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void cancel() { @@ -10002,9 +10064,15 @@ class MoqTrackDemand implements MoqTrackDemandInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqTrackDemandFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqtrackdemand(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqtrackdemand(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } String name() { @@ -10114,11 +10182,15 @@ class MoqJsonSnapshotConsumer implements MoqJsonSnapshotConsumerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqJsonSnapshotConsumerFinalizer.detach(this); - rustCall( - (status) => uniffi_moq_ffi_fn_free_moqjsonsnapshotconsumer(_ptr, status), - ); + try { + uniffi_moq_ffi_fn_free_moqjsonsnapshotconsumer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void cancel() { @@ -10234,11 +10306,15 @@ class MoqJsonSnapshotProducer implements MoqJsonSnapshotProducerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqJsonSnapshotProducerFinalizer.detach(this); - rustCall( - (status) => uniffi_moq_ffi_fn_free_moqjsonsnapshotproducer(_ptr, status), - ); + try { + uniffi_moq_ffi_fn_free_moqjsonsnapshotproducer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } MoqTrackDemand demand() { @@ -10342,11 +10418,15 @@ class MoqJsonStreamConsumer implements MoqJsonStreamConsumerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqJsonStreamConsumerFinalizer.detach(this); - rustCall( - (status) => uniffi_moq_ffi_fn_free_moqjsonstreamconsumer(_ptr, status), - ); + try { + uniffi_moq_ffi_fn_free_moqjsonstreamconsumer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void cancel() { @@ -10446,11 +10526,15 @@ class MoqJsonStreamProducer implements MoqJsonStreamProducerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqJsonStreamProducerFinalizer.detach(this); - rustCall( - (status) => uniffi_moq_ffi_fn_free_moqjsonstreamproducer(_ptr, status), - ); + try { + uniffi_moq_ffi_fn_free_moqjsonstreamproducer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void append({required String value, int? timestampUs = null}) { @@ -10554,11 +10638,15 @@ class MoqJsonWindowConsumer implements MoqJsonWindowConsumerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqJsonWindowConsumerFinalizer.detach(this); - rustCall( - (status) => uniffi_moq_ffi_fn_free_moqjsonwindowconsumer(_ptr, status), - ); + try { + uniffi_moq_ffi_fn_free_moqjsonwindowconsumer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void cancel() { @@ -10660,11 +10748,15 @@ class MoqJsonWindowProducer implements MoqJsonWindowProducerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqJsonWindowProducerFinalizer.detach(this); - rustCall( - (status) => uniffi_moq_ffi_fn_free_moqjsonwindowproducer(_ptr, status), - ); + try { + uniffi_moq_ffi_fn_free_moqjsonwindowproducer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void cut() { @@ -10795,11 +10887,15 @@ class MoqMediaCatalogConsumer implements MoqMediaCatalogConsumerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqMediaCatalogConsumerFinalizer.detach(this); - rustCall( - (status) => uniffi_moq_ffi_fn_free_moqmediacatalogconsumer(_ptr, status), - ); + try { + uniffi_moq_ffi_fn_free_moqmediacatalogconsumer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void cancel() { @@ -10898,11 +10994,15 @@ class MoqMediaCatalogProducer implements MoqMediaCatalogProducerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqMediaCatalogProducerFinalizer.detach(this); - rustCall( - (status) => uniffi_moq_ffi_fn_free_moqmediacatalogproducer(_ptr, status), - ); + try { + uniffi_moq_ffi_fn_free_moqmediacatalogproducer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void finish() { @@ -11033,12 +11133,15 @@ class MoqMediaContainerProducer implements MoqMediaContainerProducerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqMediaContainerProducerFinalizer.detach(this); - rustCall( - (status) => - uniffi_moq_ffi_fn_free_moqmediacontainerproducer(_ptr, status), - ); + try { + uniffi_moq_ffi_fn_free_moqmediacontainerproducer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void cut() { @@ -11172,11 +11275,15 @@ class MoqMediaGroupConsumer implements MoqMediaGroupConsumerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqMediaGroupConsumerFinalizer.detach(this); - rustCall( - (status) => uniffi_moq_ffi_fn_free_moqmediagroupconsumer(_ptr, status), - ); + try { + uniffi_moq_ffi_fn_free_moqmediagroupconsumer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void cancel() { @@ -11278,9 +11385,15 @@ class MoqMediaTimebase implements MoqMediaTimebaseInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqMediaTimebaseFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqmediatimebase(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqmediatimebase(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } } @@ -11362,11 +11475,15 @@ class MoqMediaTrackConsumer implements MoqMediaTrackConsumerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqMediaTrackConsumerFinalizer.detach(this); - rustCall( - (status) => uniffi_moq_ffi_fn_free_moqmediatrackconsumer(_ptr, status), - ); + try { + uniffi_moq_ffi_fn_free_moqmediatrackconsumer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void cancel() { @@ -11486,11 +11603,15 @@ class MoqMediaTrackProducer implements MoqMediaTrackProducerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqMediaTrackProducerFinalizer.detach(this); - rustCall( - (status) => uniffi_moq_ffi_fn_free_moqmediatrackproducer(_ptr, status), - ); + try { + uniffi_moq_ffi_fn_free_moqmediatrackproducer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void cut() { @@ -11630,12 +11751,15 @@ class MoqMediaTrackStreamProducer if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqMediaTrackStreamProducerFinalizer.detach(this); - rustCall( - (status) => - uniffi_moq_ffi_fn_free_moqmediatrackstreamproducer(_ptr, status), - ); + try { + uniffi_moq_ffi_fn_free_moqmediatrackstreamproducer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } MoqTrackDemand demand() { @@ -11726,11 +11850,15 @@ class MoqAnnounceConsumer implements MoqAnnounceConsumerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqAnnounceConsumerFinalizer.detach(this); - rustCall( - (status) => uniffi_moq_ffi_fn_free_moqannounceconsumer(_ptr, status), - ); + try { + uniffi_moq_ffi_fn_free_moqannounceconsumer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void cancel() { @@ -11816,11 +11944,15 @@ class MoqBroadcastPrepared implements MoqBroadcastPreparedInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqBroadcastPreparedFinalizer.detach(this); - rustCall( - (status) => uniffi_moq_ffi_fn_free_moqbroadcastprepared(_ptr, status), - ); + try { + uniffi_moq_ffi_fn_free_moqbroadcastprepared(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } MoqBroadcastProducer broadcast() { @@ -11904,11 +12036,15 @@ class MoqBroadcastRequest implements MoqBroadcastRequestInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqBroadcastRequestFinalizer.detach(this); - rustCall( - (status) => uniffi_moq_ffi_fn_free_moqbroadcastrequest(_ptr, status), - ); + try { + uniffi_moq_ffi_fn_free_moqbroadcastrequest(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } String path() { @@ -12002,9 +12138,15 @@ class MoqFollowing implements MoqFollowingInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqFollowingFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqfollowing(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqfollowing(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } UniffiRustFuture available() { @@ -12092,11 +12234,15 @@ class MoqOriginConsumer implements MoqOriginConsumerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqOriginConsumerFinalizer.detach(this); - rustCall( - (status) => uniffi_moq_ffi_fn_free_moqoriginconsumer(_ptr, status), - ); + try { + uniffi_moq_ffi_fn_free_moqoriginconsumer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } MoqAnnounceConsumer announced({required MoqAnnounceConfig config}) { @@ -12213,11 +12359,15 @@ class MoqOriginProducer implements MoqOriginProducerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqOriginProducerFinalizer.detach(this); - rustCall( - (status) => uniffi_moq_ffi_fn_free_moqoriginproducer(_ptr, status), - ); + try { + uniffi_moq_ffi_fn_free_moqoriginproducer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } MoqOriginConsumer consume() { @@ -12313,11 +12463,15 @@ class MoqOriginRequests implements MoqOriginRequestsInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqOriginRequestsFinalizer.detach(this); - rustCall( - (status) => uniffi_moq_ffi_fn_free_moqoriginrequests(_ptr, status), - ); + try { + uniffi_moq_ffi_fn_free_moqoriginrequests(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void cancel() { @@ -12403,9 +12557,15 @@ class MoqPublication implements MoqPublicationInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqPublicationFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqpublication(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqpublication(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void announce({required MoqAnnounceRoute route}) { @@ -12511,11 +12671,15 @@ class MoqBroadcastProducer implements MoqBroadcastProducerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqBroadcastProducerFinalizer.detach(this); - rustCall( - (status) => uniffi_moq_ffi_fn_free_moqbroadcastproducer(_ptr, status), - ); + try { + uniffi_moq_ffi_fn_free_moqbroadcastproducer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void close() { @@ -12625,11 +12789,15 @@ class MoqBroadcastRequests implements MoqBroadcastRequestsInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqBroadcastRequestsFinalizer.detach(this); - rustCall( - (status) => uniffi_moq_ffi_fn_free_moqbroadcastrequests(_ptr, status), - ); + try { + uniffi_moq_ffi_fn_free_moqbroadcastrequests(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void cancel() { @@ -12721,9 +12889,15 @@ class MoqFill implements MoqFillInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqFillFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqfill(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqfill(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } MoqGroupProducer accept({required int sequence}) { @@ -12923,9 +13097,15 @@ class MoqGroupProducer implements MoqGroupProducerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqGroupProducerFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqgroupproducer(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqgroupproducer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void abort({required int errorCode}) { @@ -13047,9 +13227,15 @@ class MoqTrackProducer implements MoqTrackProducerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqTrackProducerFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqtrackproducer(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqtrackproducer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void abort({required int errorCode}) { @@ -13243,9 +13429,15 @@ class MoqTrackRequest implements MoqTrackRequestInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqTrackRequestFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqtrackrequest(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqtrackrequest(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void abort({required int errorCode}) { @@ -13361,9 +13553,15 @@ class MoqTrackRequests implements MoqTrackRequestsInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqTrackRequestsFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqtrackrequests(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqtrackrequests(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void cancel() { @@ -13456,9 +13654,15 @@ class MoqRequest implements MoqRequestInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqRequestFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqrequest(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqrequest(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } UniffiRustFuture accept({ @@ -13624,9 +13828,15 @@ class MoqServer implements MoqServerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqServerFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqserver(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqserver(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } UniffiRustFuture accept() { @@ -13738,9 +13948,15 @@ class MoqClient implements MoqClientInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqClientFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqclient(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqclient(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void cancel() { @@ -13832,9 +14048,15 @@ class MoqSession implements MoqSessionInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqSessionFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqsession(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqsession(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } MoqAllocator allocator() { @@ -14029,9 +14251,15 @@ class MoqTokens implements MoqTokensInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqTokensFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqtokens(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqtokens(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } UniffiRustFuture answered() { @@ -14136,9 +14364,15 @@ class MoqVideoConsumer implements MoqVideoConsumerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqVideoConsumerFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqvideoconsumer(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqvideoconsumer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void cancel() { @@ -14226,11 +14460,15 @@ class MoqVideoDecodedFrame implements MoqVideoDecodedFrameInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqVideoDecodedFrameFinalizer.detach(this); - rustCall( - (status) => uniffi_moq_ffi_fn_free_moqvideodecodedframe(_ptr, status), - ); + try { + uniffi_moq_ffi_fn_free_moqvideodecodedframe(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } int height() { @@ -14363,9 +14601,15 @@ class MoqVideoEncoder implements MoqVideoEncoderInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqVideoEncoderFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqvideoencoder(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqvideoencoder(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void cut() { @@ -14496,9 +14740,15 @@ class MoqVideoProducer implements MoqVideoProducerInterface { if (_isDisposed) { return; } + final status = calloc(); _isDisposed = true; _MoqVideoProducerFinalizer.detach(this); - rustCall((status) => uniffi_moq_ffi_fn_free_moqvideoproducer(_ptr, status)); + try { + uniffi_moq_ffi_fn_free_moqvideoproducer(_ptr, status); + checkCallStatus(NullRustCallStatusErrorHandler(), status); + } finally { + calloc.free(status); + } } void cut() { diff --git a/dart/moq_ffi/lib/src/uniffi_runtime.dart b/dart/moq_ffi/lib/src/uniffi_runtime.dart index c61178325f7..3b7dd9cf392 100644 --- a/dart/moq_ffi/lib/src/uniffi_runtime.dart +++ b/dart/moq_ffi/lib/src/uniffi_runtime.dart @@ -181,17 +181,19 @@ final class RustBuffer extends Struct { RustBuffer toRustBuffer(Uint8List data) { final length = data.length; - final Pointer frameData = calloc(length); - final pointerList = frameData.asTypedList(length); - pointerList.setAll(0, data); - final bytes = calloc(); - bytes.ref.len = length; - bytes.ref.data = frameData; + final frameData = calloc(length); try { - return RustBuffer.fromBytes(bytes.ref); + frameData.asTypedList(length).setAll(0, data); + final bytes = calloc(); + try { + bytes.ref.len = length; + bytes.ref.data = frameData; + return RustBuffer.fromBytes(bytes.ref); + } finally { + calloc.free(bytes); + } } finally { calloc.free(frameData); - calloc.free(bytes); } } diff --git a/flake.nix b/flake.nix index 55eff6d1b55..5b173f63ede 100644 --- a/flake.nix +++ b/flake.nix @@ -363,15 +363,17 @@ # carries the uniffi 0.32 port, library-mode CLI, and RustBuffer leak # fixes while those changes remain open upstream. Its tags add a # `-kixelated.N` pre-release so they never collide with upstream's. + # Pinned to kixelated/uniffi-dart#7's head, which adds the upstream + # allocation-failure ownership fixes, until it lands and is tagged. uniffi-bindgen-dart = pkgs.rustPlatform.buildRustPackage rec { pname = "uniffi-bindgen-dart"; - version = "0.3.1-kixelated.6+v0.32.0"; + version = "0.3.1-kixelated.6-unstable-2026-10-31"; src = pkgs.fetchFromGitHub { owner = "kixelated"; repo = "uniffi-dart"; - rev = "v${version}"; - hash = "sha256-Ff5o3n4l1O578gJ5pInAqf6/MkM+lkwzovJtEffvpqk="; + rev = "657cbff560dcca4cd32e32cbe0c4f3b3e34803b7"; + hash = "sha256-uSApyCocEhADWu8Koj5vXIt0fMYQVjnBVKctDWQHqLM="; }; # The upstream repository ignores Cargo.lock so cargo installs test diff --git a/nix/uniffi-dart-Cargo.lock b/nix/uniffi-dart-Cargo.lock index 2ac246974fd..3addd398bc3 100644 --- a/nix/uniffi-dart-Cargo.lock +++ b/nix/uniffi-dart-Cargo.lock @@ -1009,6 +1009,15 @@ dependencies = [ "serde_core", ] +[[package]] +name = "input_scratch" +version = "0.1.0" +dependencies = [ + "anyhow", + "uniffi", + "uniffi-dart", +] + [[package]] name = "instant" version = "0.1.13" diff --git a/rs/uniffi-bindgen/Cargo.toml b/rs/uniffi-bindgen/Cargo.toml index 448ea829e81..548f60f0e36 100644 --- a/rs/uniffi-bindgen/Cargo.toml +++ b/rs/uniffi-bindgen/Cargo.toml @@ -21,7 +21,7 @@ cli = ["dep:uniffi"] [dependencies] # Generator-only fork of UniFFI 0.32.2. moq-ffi stays on crates.io so its # published package has no git dependencies. -uniffi = { git = "https://github.com/kixelated/uniffi-rs", rev = "88d835d", features = ["cli"], optional = true } +uniffi = { git = "https://github.com/kixelated/uniffi-rs", rev = "35209f3", features = ["cli"], optional = true } [lints] workspace = true From f26e005c05d9b866eb6183d8c48ea1d5f2d27549 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sat, 31 Oct 2026 23:08:53 -0700 Subject: [PATCH 4/6] fix(ci): check the bindings the UniFFI generator fork renders A pin bump in rs/uniffi-bindgen changes the Python, Kotlin, and Swift bindings, but matched none of their modules, so CI checked none of them. Co-Authored-By: Claude Opus 5.5 --- sh/dispatch-query.test.py | 7 +++++++ sh/dispatch.sh | 9 +++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/sh/dispatch-query.test.py b/sh/dispatch-query.test.py index 4b46dd72084..4b5c6d89f7d 100644 --- a/sh/dispatch-query.test.py +++ b/sh/dispatch-query.test.py @@ -94,6 +94,13 @@ def test_cargo_configuration_selects_rust(self): self.assertTrue(any(call.startswith("rs test-changed ") for call in calls), calls) (self.repo / path).unlink() + def test_generator_pin_checks_the_bindings_it_renders(self): + self.change("rs/uniffi-bindgen/Cargo.toml") + calls = self.run_ci() + for module in ("py", "kt", "swift"): + self.assertIn(f"{module} check", calls) + self.assertNotIn("go check", calls) + def test_nixpkgs_updates_check_browser_pins(self): self.change("flake.lock") self.expect(True) diff --git a/sh/dispatch.sh b/sh/dispatch.sh index 18907a26c16..06b41392e4e 100755 --- a/sh/dispatch.sh +++ b/sh/dispatch.sh @@ -85,10 +85,11 @@ declare -A scope=( [drill]='^(rs/|test/drill/)' # maturin bundles rs/moq-ffi into the moq-ffi wheel, and the other # bindings generate from it, built by the `cargo build-ffi` alias in - # .cargo/config.toml. Each check also compiles its doc samples. - [py]='^(py/|sh/py/|pyproject\.toml$|uv\.lock$|rs/moq-ffi/|doc/lib/py/|doc/lib/samples\.sh$)' - [kt]='^(\.cargo/config\.toml$|kt/|sh/kt/|rs/moq-ffi/|doc/lib/kt/|doc/lib/samples\.sh$)' - [swift]='^(\.cargo/config\.toml$|swift/|sh/swift/|rs/moq-ffi/|doc/lib/swift/|doc/lib/samples\.sh$)' + # .cargo/config.toml. Each check also compiles its doc samples. Python, + # Kotlin, and Swift render through the rs/uniffi-bindgen generator fork. + [py]='^(py/|sh/py/|pyproject\.toml$|uv\.lock$|rs/moq-ffi/|rs/uniffi-bindgen/|doc/lib/py/|doc/lib/samples\.sh$)' + [kt]='^(\.cargo/config\.toml$|kt/|sh/kt/|rs/moq-ffi/|rs/uniffi-bindgen/|doc/lib/kt/|doc/lib/samples\.sh$)' + [swift]='^(\.cargo/config\.toml$|swift/|sh/swift/|rs/moq-ffi/|rs/uniffi-bindgen/|doc/lib/swift/|doc/lib/samples\.sh$)' [go]='^(\.cargo/config\.toml$|go/|sh/go/|rs/moq-ffi/|doc/lib/go/|doc/lib/samples\.sh$)' [dart]='^(\.cargo/config\.toml$|dart/|sh/dart/|rs/moq-ffi/|doc/lib/dart/|doc/lib/samples\.sh$)' # The C package links moq-c's native-libs lists, and the C++ package's FFI pin. From 23bf65ca1b14f18a96bd3c203cb95268c30e517b Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sat, 31 Oct 2026 23:45:14 -0700 Subject: [PATCH 5/6] quest(uniffi): record the integrated pins and what remains Co-Authored-By: Claude Opus 5.5 --- quest/m1/vendor-sync/uniffi.md | 58 ++++++++++++++-------------------- 1 file changed, 23 insertions(+), 35 deletions(-) diff --git a/quest/m1/vendor-sync/uniffi.md b/quest/m1/vendor-sync/uniffi.md index ae7273ff90d..196c612e308 100644 --- a/quest/m1/vendor-sync/uniffi.md +++ b/quest/m1/vendor-sync/uniffi.md @@ -27,37 +27,36 @@ A port means a commit on the fork and a pin bump in moq (`flake.nix` and the places its "five places" comments name), with regenerated bindings diffed and each wrapper's check run. -Checked upstream on 2026-10-31, against these unchanged MoQ pins: +Checked upstream on 2026-10-31: | Fork | Base | Pin | Upstream head checked | |---|---|---|---| -| uniffi-rs | `v0.32.2` (`7bc621ee`) | `88d835d6` | [`ef9625b6`](https://github.com/mozilla/uniffi-rs/commit/ef9625b68dd51207f55f024a27649e58edb52b09) | +| uniffi-rs | `v0.32.2` (`7bc621ee`) | `35209f3f` | [`ef9625b6`](https://github.com/mozilla/uniffi-rs/commit/ef9625b68dd51207f55f024a27649e58edb52b09) | | uniffi-bindgen-go | `0b7fb4ce` | `v0.10.0-kixelated.1+v0.32.0` | [`0b7fb4ce`](https://github.com/NordSecurity/uniffi-bindgen-go/commit/0b7fb4ceef12021bd7f790cc516fa9133e001813) | -| uniffi-dart | `72d26c1f` | `v0.3.1-kixelated.6+v0.32.0` | [`e644a4ad`](https://github.com/Uniffi-Dart/uniffi-dart/commit/e644a4ad980f72697aba211fd30cb4fbd8fc7324) | +| uniffi-dart | `72d26c1f` | `657cbff5` | [`e644a4ad`](https://github.com/Uniffi-Dart/uniffi-dart/commit/e644a4ad980f72697aba211fd30cb4fbd8fc7324) | | uniffi-bindgen-cpp | `20bef754` | `v0.11.0-kixelated.7+v0.32.2` | [`20bef754`](https://github.com/livekit/uniffi-bindgen-cpp/commit/20bef754391023df147267482513c35120dee343) | Each upstream's public GitHub security-advisories endpoint returned no published advisories. Go and C++ have no new upstream commits. Kotlin's checksum mask is already in the pin, backported as `2a8331b7` before 0.32.2. -Tested ports are held in draft checkpoints, not a completed sync: +The two ports are reviewed and pinned by commit: - [kixelated/uniffi-rs#1](https://github.com/kixelated/uniffi-rs/pull/1), head - `35209f3f87051b940f68138fe685ed3ecfb02038`: Python's running-loop preference - (`f903c36c`), preserving the 0.32 setter name. The upstream two-loop - regression reproduces the cross-loop failure before the port, and the - futures Python suite passes afterward. Formatting passes. + `35209f3f`: Python's running-loop preference (`f903c36c`), preserving the + 0.32 setter name. It changes only the Python `Async.py` template, so the + Kotlin and Swift output is unchanged. - [kixelated/uniffi-dart#7](https://github.com/kixelated/uniffi-dart/pull/7), head - `657cbff560dcca4cd32e32cbe0c4f3b3e34803b7`: nested input-scratch cleanup from - `71dc9f8b` and disposal status reservation from `a2751c4c`, in all three - object/trait implementations. Fault injection reproduces leaked scratch - and lost native drops before the port; input_scratch, callbacks, and - trait_interfaces fixture suites pass afterward. Formatting passes. -- [moq-dev/rust2#364](https://github.com/moq-dev/rust2/pull/364), head - `832a146a2c5c09e15e87880f21a884c33a8f6564`: mirrors both ports. Its four - foreign-language fixture suites and full `just check` pass. `just ci` was - stopped cleanly during the unrelated TypeScript differential tests after - the review blocker was confirmed; full CI remains incomplete. + `657cbff5`: nested input-scratch cleanup from `71dc9f8b` and disposal status + reservation from `a2751c4c`, in all three object/trait implementations. + `nix/uniffi-dart-Cargo.lock` gains the new `input_scratch` fixture, the three + `nix/uniffi-dart-*.patch` files still apply, and the regenerated + `dart/moq_ffi` differs only in `toRustBuffer` and the 50 `dispose()` bodies. + The fork's `Testing` and `Test Downstream` failures (`futures_test.dart: + sleep`, bdk-dart, rust-payjoin) predate the port on every fork PR. +- [moq-dev/rust2#364](https://github.com/moq-dev/rust2/pull/364) mirrors both, + so the [rust2 switch](/quest/m2/uniffi-fork.md) keeps them. Its full + `just ci` passes on `ea3d4cf8`, which includes rust2's current main. Dart already carries successful scratch cleanup, copied returned bytes, returned/error RustBuffer ownership, disposal guards, the library-mode CLI, @@ -68,21 +67,10 @@ custom FFI lowering, string-default escaping, and recursive/custom-type fixes have no current generated MoQ consumer. The parser, JNI backend, mutable bytes, library-mode removal, and dependency updates are outside this port. -Blocked checkpoint (2026-10-31): +With these pins, MoQ's `just ci`, every wrapper check (py, kt, go, dart, c, +cpp, obs_compile; swift skips off macOS), and `just test interop --all` pass. -- Both fork `quest review --base origin/moq-0.32` attempts failed before - reviewing: Claude Code reports its weekly limit, resetting 2026-11-02 at - 02:00 America/Los_Angeles. No substitute review or exemption was used. -- MoQ's `quest gate just ci` fails in the unchanged - `sh/rs/test-lints.test.py`: mbx cannot launch Cargo (`Argument list too - long`, os error 7), so the expected Clippy diagnostic is absent. The source - files match `origin/main`. Open PRs were searched; the inspected - [dispatcher environment fix](https://github.com/moq-dev/moq/pull/7432) - does not address this Cargo launch failure. The other selected checks pass. - A direct MoQ build preflight passed, so that alone does not clear this gate. - -Remaining: complete the required other-vendor reviews and rust2's full CI; -then integrate the reviewed pins with the existing Nix patches/lock data, -diff regenerated bindings, and run every wrapper's check plus -`just test interop --all`. Pins and generated output remain unchanged in -this checkpoint. Keep this quest open until the whole operation passes. +Remaining: land the two fork PRs so their heads stay reachable from +`moq-0.32` (a merge commit or fast-forward, not a squash), tag the Dart head +`v0.3.1-kixelated.7+v0.32.0`, and point `flake.nix` and `dart/README.md` back +at that tag. Then land rust2#364 and this quest. From 1f24fa1aa182e273674d30a51798723361ef37cb Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sun, 1 Nov 2026 21:05:08 -0800 Subject: [PATCH 6/6] chore(dart): pin uniffi-dart v0.3.1-kixelated.7+v0.32.0 kixelated/uniffi-dart#7 landed on moq-0.32 and its head 657cbff5 is now tagged, so the flake and README go back to the fork's tag convention. The source hash is unchanged. Co-Authored-By: Claude Opus 5.5 --- dart/README.md | 4 ++-- flake.nix | 52 ++++++++++++++++++++++++++++++++------------------ 2 files changed, 35 insertions(+), 21 deletions(-) diff --git a/dart/README.md b/dart/README.md index 45bf2901a77..a193fbb5089 100644 --- a/dart/README.md +++ b/dart/README.md @@ -23,14 +23,14 @@ WebAssembly. Browser applications should use the TypeScript packages. ## Generator Bindings use [`kixelated/uniffi-dart`](https://github.com/kixelated/uniffi-dart) -revision `657cbff5`, which carries the UniFFI 0.32, library-mode CLI, +tag `v0.3.1-kixelated.7+v0.32.0`, which carries the UniFFI 0.32, library-mode CLI, disposed-argument, and allocation-failure ownership changes. The Nix development shell supplies that exact revision plus the `nix/uniffi-dart-*.patch` fixes. Without Nix, install it without those fixes: ```bash cargo install --git https://github.com/kixelated/uniffi-dart \ - --rev 657cbff560dcca4cd32e32cbe0c4f3b3e34803b7 --features binary uniffi-dart + --tag 'v0.3.1-kixelated.7+v0.32.0' --features binary uniffi-dart ``` ## Releases diff --git a/flake.nix b/flake.nix index 5b173f63ede..c0cf5c47e82 100644 --- a/flake.nix +++ b/flake.nix @@ -32,7 +32,7 @@ # The quest CLI, which also serves the quest guide and skills the stubs in # .claude/skills call. Bump the rev to upgrade them. quest = { - url = "github:moq-dev/quest/1ef2ca70053ed8bc4785ddaaafb2a6c445e87614"; + url = "github:moq-dev/quest/7a191e6197c691f477b4c55edba34cc425c3e77c"; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-utils.follows = "flake-utils"; }; @@ -158,6 +158,8 @@ cargo-semver-checks cargo-deny cargo-bloat + # Weekly mutation testing of the security-critical modules (`just rs mutants`). + cargo-mutants cargo-nextest cargo-codspeed # Source-based test coverage (`just rs coverage`). @@ -287,14 +289,24 @@ # skip a module whose tools aren't on $PATH. CI sets CI_STRICT=1, # which turns that skip into an error (see the tools map in # sh/dispatch.sh), so this list and that one have to stay in step. - lintDeps = with pkgs; [ - shellcheck - shfmt - actionlint - zizmor - taplo - nixfmt - ]; + lintDeps = + with pkgs; + [ + shellcheck + shfmt + actionlint + zizmor + taplo + nixfmt + # Formats and lints every Python file; the same version uv.lock pins. + ruff + ] + # Apple's formatter, so `just swift check` checks formatting off macOS + # too. nixpkgs marks the Swift compiler it builds with broken on + # aarch64-linux, where the check skips instead. + ++ lib.optionals (!(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64)) [ + swift-format + ]; # Kotlin wrapper (kt/) toolchain so `just kt check` actually compiles # the wrapper and runs :moq:jvmTest instead of silently skipping. @@ -304,6 +316,8 @@ ktDeps = with pkgs; [ jdk17 gradle_8 + # `just kt check` fails on Kotlin it would reformat; `just kt fix` applies it. + ktfmt ]; # uniffi-bindgen-go renders rs/moq-ffi into the generated half of @@ -314,8 +328,9 @@ # targets (v0.10.0-kixelated.1+v0.32.0 -> uniffi 0.32), and it only # understands metadata emitted by that uniffi, so it moves with the `uniffi` # dependency in rs/moq-ffi/Cargo.toml. Five other places name the same - # generator version and must be bumped together: the repo and revision - # in release-ffi.yml, and the `cargo install` line in + # generator version and must be bumped together: the commit the tag + # peels to in .github/actions/uniffi-bindgen, which CI jobs outside + # the dev shell build, and the `cargo install` line in # rs/moq-ffi/build.sh, go/ffi/README.md, sh/go/check.sh, and # sh/go/stage.sh. # @@ -363,16 +378,14 @@ # carries the uniffi 0.32 port, library-mode CLI, and RustBuffer leak # fixes while those changes remain open upstream. Its tags add a # `-kixelated.N` pre-release so they never collide with upstream's. - # Pinned to kixelated/uniffi-dart#7's head, which adds the upstream - # allocation-failure ownership fixes, until it lands and is tagged. uniffi-bindgen-dart = pkgs.rustPlatform.buildRustPackage rec { pname = "uniffi-bindgen-dart"; - version = "0.3.1-kixelated.6-unstable-2026-10-31"; + version = "0.3.1-kixelated.7+v0.32.0"; src = pkgs.fetchFromGitHub { owner = "kixelated"; repo = "uniffi-dart"; - rev = "657cbff560dcca4cd32e32cbe0c4f3b3e34803b7"; + rev = "v${version}"; hash = "sha256-uSApyCocEhADWu8Koj5vXIt0fMYQVjnBVKctDWQHqLM="; }; @@ -401,10 +414,10 @@ # Like uniffi-bindgen-go, the tag pairs the generator's version with the # uniffi release it reads, so it moves with the `uniffi` dependency in # rs/moq-ffi/Cargo.toml. The other places name the same tag and must be - # bumped together: the `cargo install` lines in rs/moq-ffi/build.sh, - # cpp/moq/README.md, .github/workflows/{c,cpp}.yml, - # .github/workflows/platform.yml, .github/workflows/release-{c,cpp}.yml, - # and .github/workflows/release-shared-ffi.yml. + # bumped together: the commit the tag peels to in + # .github/actions/uniffi-bindgen, which CI jobs outside the dev shell + # (Windows among them) build, and the `cargo install` lines in + # rs/moq-ffi/build.sh and cpp/moq/README.md. # # This points at a fork of LiveKit's async branch (livekit/uniffi-bindgen-cpp # PR #1): neither LiveKit nor NordSecurity has a uniffi 0.32 generator, @@ -504,6 +517,7 @@ # too. Same 0.8.2 that obs-deps carries. simde qt6.qtbase + # clang-format, for the plugin and the c/ and cpp/moq packages. clang-tools gersemi ]