diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml index 5a804692b2e..6933677393f 100644 --- a/.github/workflows/cpp.yml +++ b/.github/workflows/cpp.yml @@ -36,7 +36,7 @@ jobs: - uses: ./.github/actions/just - name: Install uniffi-bindgen-cpp - run: cargo install uniffi-bindgen-cpp --locked --git https://github.com/kixelated/uniffi-bindgen-cpp --tag v0.11.0-kixelated.6+v0.32.2 + run: cargo install uniffi-bindgen-cpp --locked --git https://github.com/kixelated/uniffi-bindgen-cpp --tag v0.11.0-kixelated.7+v0.32.2 - name: Check run: just cpp check diff --git a/.github/workflows/platform.yml b/.github/workflows/platform.yml index 921ec319de7..68d16116585 100644 --- a/.github/workflows/platform.yml +++ b/.github/workflows/platform.yml @@ -105,7 +105,7 @@ jobs: - name: Install uniffi-bindgen-cpp if: needs.scope.outputs.cpp == 'true' || needs.scope.outputs.obs == 'true' shell: bash - run: cargo install uniffi-bindgen-cpp --locked --git https://github.com/kixelated/uniffi-bindgen-cpp --tag v0.11.0-kixelated.6+v0.32.2 + run: cargo install uniffi-bindgen-cpp --locked --git https://github.com/kixelated/uniffi-bindgen-cpp --tag v0.11.0-kixelated.7+v0.32.2 - name: Rust compile and tests if: needs.scope.outputs.rs == 'true' shell: bash @@ -151,7 +151,7 @@ jobs: secret-access-key: ${{ secrets.MBX_R2_SECRET_ACCESS_KEY }} - name: Install uniffi-bindgen-cpp if: needs.scope.outputs.obs == 'true' - run: cargo install uniffi-bindgen-cpp --locked --git https://github.com/kixelated/uniffi-bindgen-cpp --tag v0.11.0-kixelated.6+v0.32.2 + run: cargo install uniffi-bindgen-cpp --locked --git https://github.com/kixelated/uniffi-bindgen-cpp --tag v0.11.0-kixelated.7+v0.32.2 - name: Rust compile and tests if: needs.scope.outputs.rs == 'true' env: diff --git a/.github/workflows/release-cpp.yml b/.github/workflows/release-cpp.yml index d64bf51b862..62fa3a44fc5 100644 --- a/.github/workflows/release-cpp.yml +++ b/.github/workflows/release-cpp.yml @@ -74,7 +74,7 @@ jobs: # The tag flake.nix pins; see the comment there. - name: Install uniffi-bindgen-cpp shell: bash - run: cargo install uniffi-bindgen-cpp --locked --git https://github.com/kixelated/uniffi-bindgen-cpp --tag v0.11.0-kixelated.6+v0.32.2 + run: cargo install uniffi-bindgen-cpp --locked --git https://github.com/kixelated/uniffi-bindgen-cpp --tag v0.11.0-kixelated.7+v0.32.2 # The package version lives in cpp/moq/VERSION; a tag that disagrees is a mistake. - name: Check version diff --git a/.github/workflows/release-shared-ffi.yml b/.github/workflows/release-shared-ffi.yml index 25dbe695f7c..60a885953ee 100644 --- a/.github/workflows/release-shared-ffi.yml +++ b/.github/workflows/release-shared-ffi.yml @@ -91,7 +91,7 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable - name: Install uniffi-bindgen-cpp - run: cargo install uniffi-bindgen-cpp --locked --git https://github.com/kixelated/uniffi-bindgen-cpp --tag v0.11.0-kixelated.6+v0.32.2 + run: cargo install uniffi-bindgen-cpp --locked --git https://github.com/kixelated/uniffi-bindgen-cpp --tag v0.11.0-kixelated.7+v0.32.2 - name: Download default-feature input uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8 with: diff --git a/cpp/moq/README.md b/cpp/moq/README.md index 6741ab9e770..dd1255cb823 100644 --- a/cpp/moq/README.md +++ b/cpp/moq/README.md @@ -19,7 +19,7 @@ The generator is a fork, [kixelated/uniffi-bindgen-cpp](https://github.com/kixel ```bash cargo install uniffi-bindgen-cpp --locked \ --git https://github.com/kixelated/uniffi-bindgen-cpp \ - --tag v0.11.0-kixelated.6+v0.32.2 + --tag v0.11.0-kixelated.7+v0.32.2 ``` `flake.nix` pins the same tag and lists every other place that names it. diff --git a/flake.nix b/flake.nix index d15ba098697..2882faf1700 100644 --- a/flake.nix +++ b/flake.nix @@ -408,16 +408,16 @@ # Move back upstream once one tags both. uniffi-bindgen-cpp = pkgs.rustPlatform.buildRustPackage rec { pname = "uniffi-bindgen-cpp"; - version = "0.11.0-kixelated.6+v0.32.2"; + version = "0.11.0-kixelated.7+v0.32.2"; src = pkgs.fetchFromGitHub { owner = "kixelated"; repo = "uniffi-bindgen-cpp"; rev = "v${version}"; - hash = "sha256-r0O/iAad2Z82KhG+6AOvqESAktaR7THQQVoR2CyP+ok="; + hash = "sha256-nErLn2hQus5omIaFheJWy06wKQS9HiKNtksxaJm9Z8k="; }; - cargoHash = "sha256-0YWQF8eSUsemU0Y3jgZh7Kgtno/58zBAxPYpcBwPRuk="; + cargoHash = "sha256-fz7fn6D12zmFFSVSdySDfNRtQe+n4KCB9bXAsuvq/QY="; # The workspace's other member is the fixture crate, which pulls the # uniffi examples in from git; build only the generator. diff --git a/quest/m1/c/README.md b/quest/m1/c/README.md index 745c01f003d..0f13a5b2123 100644 --- a/quest/m1/c/README.md +++ b/quest/m1/c/README.md @@ -68,4 +68,3 @@ requests internally and keeps its ABI, so that quest does not wait here. - [moq-c package](/quest/m1/c/package.md) - the generated header ships as `moq-c` 0.8.0 with `moq::c`, pkg-config, and a release workflow - [C consumers](/quest/m1/c/consumers.md) - the C interop client and `doc/lib/c` samples move onto the generated API - [Async failure contract](/quest/m1/c/async-failure-contract.md) - a generated async call that fails early fires no callback, and one that started always delivers its terminal callback -- [Durations in generated C](/quest/m1/c/duration.md) - the C backend renders UniFFI's `Duration` instead of refusing it diff --git a/quest/m1/c/duration.md b/quest/m1/c/duration.md deleted file mode 100644 index bb7fa2df58a..00000000000 --- a/quest/m1/c/duration.md +++ /dev/null @@ -1,25 +0,0 @@ -# [S] Durations in generated C - -## Goal - -The C backend of the `kixelated/uniffi-bindgen-cpp` fork renders UniFFI's -builtin `Duration` instead of bailing with "the C backend does not support -`Duration` yet", so moq-ffi can export typed durations without losing the -generated C. A tagged fork release carries it and moq pins that tag. - -## Plan - -Found 2026-10-23 while checking [binding durations](/quest/m1/ffi-durations.md): -Go, Dart, C++, Python, Swift, and Kotlin already map `Duration`; only -`bindings/c/gen_c.rs` refuses it, alongside `Timestamp`, `Set`, and `Custom`. - -- Pick the C spelling to mirror the C++ package, which uses - `std::chrono::duration`. A single nanosecond count - keeps C callers free of a struct for the common case; check that it covers - every value moq-ffi exposes and refuses the rest loudly. -- Test it with a fixture in the fork, both directions and inside records and - optionals, the way the fork tests its other C types. -- Tag the fork with the next `-kixelated.N` and move every place that names - the pinned tag together (the flake's comment lists them). - -Public API: none until moq-ffi exports a `Duration`. Wire: none. diff --git a/quest/m1/ffi-durations.md b/quest/m1/ffi-durations.md index 33fdef3ef65..4563c8db6d8 100644 --- a/quest/m1/ffi-durations.md +++ b/quest/m1/ffi-durations.md @@ -17,15 +17,14 @@ breaks these options this release, so binding users migrate them once. Checked 2026-10-23 against the pinned generators: UniFFI's builtin `Duration` maps to `time.Duration` in Go, Dart's `Duration`, and `std::chrono` nanoseconds in C++, and Python, Swift, and Kotlin are built -into UniFFI. Only the generated C refuses it, which the C prerequisite below -fixes. +into UniFFI. The generated C renders it as `moq_duration`, `int64_t` +nanoseconds like C++, since `uniffi-bindgen-cpp` `v0.11.0-kixelated.7`. +C and C++ abort on a duration past `INT64_MAX` nanoseconds (about 292 +years), so moq-ffi must not hand out a saturated `Duration::MAX` where it +clamps to `u64::MAX` microseconds today (`auth.rs`, `session.rs`). Public API: moq-ffi, moq-c, every wrapper breaking. Wire: none. -## Required - -- [Durations in generated C](/quest/m1/c/duration.md) - the C backend renders UniFFI's `Duration` instead of refusing it - ## Related - [Exact timestamps in every binding](/quest/m1/binding-timestamps.md) - the same move for media timestamps diff --git a/rs/moq-ffi/build.sh b/rs/moq-ffi/build.sh index 64ef4cb71ae..7c4d015fe81 100755 --- a/rs/moq-ffi/build.sh +++ b/rs/moq-ffi/build.sh @@ -192,7 +192,7 @@ generate_bindings() { # C++ uses a third-party bindgen too: a fork carrying LiveKit's async support # ported to uniffi 0.32, which upstream has not released. Install it with: - # cargo install --locked uniffi-bindgen-cpp --git https://github.com/kixelated/uniffi-bindgen-cpp --tag v0.11.0-kixelated.6+v0.32.2 + # cargo install --locked uniffi-bindgen-cpp --git https://github.com/kixelated/uniffi-bindgen-cpp --tag v0.11.0-kixelated.7+v0.32.2 if command -v uniffi-bindgen-cpp >/dev/null 2>&1; then echo " Generating cpp bindings..." uniffi-bindgen-cpp --library "$lib_path" \