From 3d4b1f5fe516d4fb6f9194e80c39976ae2921414 Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Wed, 28 Oct 2026 21:15:47 -0700 Subject: [PATCH 1/2] chore(quest): claim quest/m1/ffi-export/recursion-lint.md Quest-Claim: 8cd28a5919af4a1d From 4f2212fbc644adbd40c311824c4fad2457312275 Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Wed, 28 Oct 2026 21:45:53 -0700 Subject: [PATCH 2/2] fix(ffi): fail moq's export on the recursion depth lint At the current moq pin the lint no longer fires. Deny it in the export build so a pin bump that brings it back fails instead of warning. Co-Authored-By: Claude Opus 5.5 --- ffi/justfile | 4 +++- quest/m1/ffi-export/README.md | 1 - quest/m1/ffi-export/recursion-lint.md | 19 ------------------- 3 files changed, 3 insertions(+), 21 deletions(-) delete mode 100644 quest/m1/ffi-export/recursion-lint.md diff --git a/ffi/justfile b/ffi/justfile index be40a0ad0..4d6cd90bc 100644 --- a/ffi/justfile +++ b/ffi/justfile @@ -68,7 +68,9 @@ moq checkout="": (standin checkout) cargo run --locked --quiet -- --config moq/ffi.toml --manifest-path target/moq-ffi/Cargo.toml --out "$out" # The lockfile the check resolved with pins what the export depends on. cp target/moq-ffi/Cargo.lock "$out/Cargo.lock" - cargo build --quiet --release --manifest-path "$out/Cargo.toml" --features kotlin + # A later nightly makes this future-compat lint a hard error; fail on it in moq's crates + # and the glue now, while the pin can still move. + RUSTFLAGS="-D recursion_depth_exceeding_limit" cargo build --quiet --release --manifest-path "$out/Cargo.toml" --features kotlin cc -std=c11 -pedantic -Wall -Wextra -Werror -I "$out/include" moq/moq.c "$out/target/release/libmoq.a" -lpthread -ldl -lm -o target/moq-test target/moq-test # The C++ header at OBS's standard, without exceptions or RTTI. diff --git a/quest/m1/ffi-export/README.md b/quest/m1/ffi-export/README.md index 689e7faf2..a9b3002e7 100644 --- a/quest/m1/ffi-export/README.md +++ b/quest/m1/ffi-export/README.md @@ -54,7 +54,6 @@ Every generator on the C ABI: - [Sessions on moq-tokio](/quest/m1/ffi-export/session-tokio.md) - bindings connect and accept with one call, the library running moq-tokio inside - [Sessions on sans-IO QUIC](/quest/m1/ffi-export/session-quic.md) - bindings move UDP datagrams and drive the session's poll themselves - [Glue that builds without warnings](/quest/m1/ffi-export/warnings.md) - the exporter's Rust glue builds with `-D warnings` -- [The recursion depth lint on moq's export](/quest/m1/ffi-export/recursion-lint.md) - `just ffi moq` builds clean before the lint becomes an error - [C++ bindings on MSVC and Clang](/quest/m1/ffi-export/cpp.md) - the C++ header built and tested beyond GCC on Linux - [Kotlin bindings: zero-copy payloads and the read path](/quest/m1/ffi-export/kotlin.md) - the Kotlin lends bytes without a copy, and reads at JNI's cost - [Kotlin bindings on Android](/quest/m1/ffi-export/kotlin-android.md) - an R8 keep rule for JNI's lookups, and an emulator run in CI diff --git a/quest/m1/ffi-export/recursion-lint.md b/quest/m1/ffi-export/recursion-lint.md deleted file mode 100644 index c0d40731e..000000000 --- a/quest/m1/ffi-export/recursion-lint.md +++ /dev/null @@ -1,19 +0,0 @@ -# [S] The recursion depth lint on moq's export - -## Goal - -`just ffi moq` builds with no `recursion_depth_exceeding_limit` warning, before the pinned -nightly turns that future-compat lint into a hard error and the export stops building. - -## Plan - -Found by [#144](https://github.com/kixelated/rust2/pull/144) on 2026-10-27: the lint fires on -`Send` checks in moq-net, moq-tokio, and the generated `moq_ffi`. - -- Find which types' `Send` checks recurse that deep, and whether the generated glue makes - them deeper than moq's own code does. -- Fix the generated part here. A part in moq's own crates is moq's change, recorded in - moq's tree; a `recursion_limit` raise is a stopgap only if neither can avoid the depth. -- Fail the build on the lint once it is gone, so it does not come back. - -Public API: none.