From 71a7ade21cab9f266bbb234cb638c94514f5d46e Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Wed, 28 Oct 2026 15:58:00 -0700 Subject: [PATCH 1/4] chore(quest): claim quest/m1/moq-pin.md Quest-Claim: ab2ec9cf05b1176f From 4e6c9d85ebc46eb230eebcb22fb1c4ea56e1da61 Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Wed, 28 Oct 2026 16:12:08 -0700 Subject: [PATCH 2/4] feat!: bump the moq pin past the fallback runtime Co-Authored-By: Claude Opus 5.5 --- ffi/moq/ffi.toml | 88 ++++++++++++---------------- ffi/moq/moq.c | 55 ++++++++--------- ffi/moq/moq.cpp | 24 ++++---- ffi/moq/moq.kt | 26 ++++---- quest/m1/README.md | 1 - quest/m1/ffi-export/README.md | 1 + quest/m1/ffi-export/session-tokio.md | 3 +- quest/m1/ffi-export/warnings.md | 14 +++++ quest/m1/moq-pin.md | 20 ------- ts/fixtures/reject/census.md | 4 +- ts/fixtures/reject/src/lib.rs | 12 ++++ ts/justfile | 2 +- ts/src/lower/dynamic.rs | 7 ++- 13 files changed, 129 insertions(+), 128 deletions(-) create mode 100644 quest/m1/ffi-export/warnings.md delete mode 100644 quest/m1/moq-pin.md diff --git a/ffi/moq/ffi.toml b/ffi/moq/ffi.toml index 8ee7e5425..b949eca7f 100644 --- a/ffi/moq/ffi.toml +++ b/ffi/moq/ffi.toml @@ -46,7 +46,6 @@ exclude = [ "group::Consumer::read_frames", "group::Producer::write_frames", "origin::Requesting", - "origin::Routing", "server::Handshake", "stats::Failure::ALL", "stats::RefusalKind::ALL", @@ -142,12 +141,12 @@ exclude = [ "Server::websocket_local_addr", "accept::Failure::ALL", "accept::Failure::classify", - "accept::Health::failed", - "accept::Health::new", + "accept::Health", "bind", "cli::Answer::exit", "cli::Deprecated::changed", "cli::Deprecated::flag", + "cli::Deprecated::removed", "cli::Deprecated::toml", "cli::FileSource", "cli::Merge", @@ -176,72 +175,72 @@ exclude = [ "quic::Config::keylog", "quic::Config::qlog", "quic::Error", - "quic::Limits", - "quic::LimitsError", "quic::Resolved::keylog", "quic::Resolved::qlog", - "quic::driver::AckFrequencyConfig", "quic::driver::ApplicationClose", - "quic::driver::AsyncUdpSocket", "quic::driver::Chunk", - "quic::driver::ClientConfig", "quic::driver::ClosedStream", "quic::driver::ConfigError", - "quic::driver::ConnectError", - "quic::driver::Connecting", - "quic::driver::Connection::accept_bi", - "quic::driver::Connection::accept_uni", - "quic::driver::Connection::close", - "quic::driver::Connection::close_reason", - "quic::driver::Connection::closed", - "quic::driver::Connection::congestion_state", - "quic::driver::Connection::handshake_data", - "quic::driver::Connection::open_bi", - "quic::driver::Connection::open_uni", - "quic::driver::Connection::peer_identity", - "quic::driver::Connection::read_datagram", - "quic::driver::Connection::remote_address", - "quic::driver::Connection::send_datagram", - "quic::driver::Connection::set_limits", - "quic::driver::Connection::stats", "quic::driver::ConnectionClose", - "quic::driver::ConnectionError", "quic::driver::ConnectionId", "quic::driver::ConnectionIdGenerator", - "quic::driver::ConnectionStats", + "quic::driver::CreditStats", "quic::driver::Dir", "quic::driver::EcnCodepoint", - "quic::driver::Endpoint", - "quic::driver::EndpointConfig", "quic::driver::FrameStats", "quic::driver::FrameType", - "quic::driver::IdleTimeout", - "quic::driver::Incoming", "quic::driver::InvalidCid", "quic::driver::Lease", - "quic::driver::MtuDiscoveryConfig", + "quic::driver::Limits", + "quic::driver::LimitsError", "quic::driver::PathStats", "quic::driver::ReadError", "quic::driver::ReadExactError", "quic::driver::ReadToEndError", "quic::driver::RecvStream", "quic::driver::ResetError", - "quic::driver::SendDatagramError", "quic::driver::SendStream", - "quic::driver::ServerConfig", "quic::driver::StoppedError", "quic::driver::StreamId", "quic::driver::Transmit", - "quic::driver::TransportConfig", "quic::driver::TransportErrorCode", - "quic::driver::UdpSender", "quic::driver::UdpStats", - "quic::driver::ValidationTokenConfig", "quic::driver::VarInt", "quic::driver::VarIntBoundsExceeded", + "quic::driver::Version", "quic::driver::WriteError", "quic::driver::Written", + "quic::driver::client", + "quic::driver::connection::Connecting", + "quic::driver::connection::Connection::accept_bi", + "quic::driver::connection::Connection::accept_uni", + "quic::driver::connection::Connection::close", + "quic::driver::connection::Connection::close_reason", + "quic::driver::connection::Connection::closed", + "quic::driver::connection::Connection::congestion_state", + "quic::driver::connection::Connection::handshake_data", + "quic::driver::connection::Connection::open_bi", + "quic::driver::connection::Connection::open_uni", + "quic::driver::connection::Connection::peer_identity", + "quic::driver::connection::Connection::read_datagram", + "quic::driver::connection::Connection::remote_address", + "quic::driver::connection::Connection::send_datagram", + "quic::driver::connection::Connection::set_limits", + "quic::driver::connection::Connection::stats", + "quic::driver::connection::Error", + "quic::driver::connection::SendDatagramError", + "quic::driver::connection::Stats", "quic::driver::crypto", + "quic::driver::endpoint::AsyncUdpSocket", + "quic::driver::endpoint::CidGenerator", + "quic::driver::endpoint::Config", + "quic::driver::endpoint::ConnectError", + "quic::driver::endpoint::Endpoint", + "quic::driver::endpoint::Error", + "quic::driver::endpoint::Incoming", + "quic::driver::endpoint::Socket", + "quic::driver::server", + "quic::driver::transport", "rustls", "secret::Secret::as_bytes", "server::Config::websocket", @@ -281,9 +280,7 @@ exclude = [ "unix::Allow::pid", "unix::Allow::uid", "unix::Config::bind", - "unix::Listener::accept", - "unix::Listener::path", - "unix::Listener::with_protocols", + "unix::Error", "watch::Files", "websocket::Error", "websocket::Listener", @@ -316,8 +313,6 @@ exclude = [ exclude = [ "Catalog::from_reader", "Catalog::subscribe", - "catalog::Archive::store", - "catalog::Archive::timelines", "catalog::Audio::enabled", "catalog::Audio::ranked", "catalog::Audio::renditions", @@ -353,8 +348,6 @@ exclude = [ "health::publisher", "health::viewer", "stats::Snapshot", - "timeline::Record", - "timeline::RecordExt", ] [crates.hang.rename] @@ -378,10 +371,6 @@ exclude = [ "Source::resolve_reference", "Source::stats", "Source::subscribe_track", - "binary::Consumer::latest", - "binary::Consumer::next", - "binary::Consumer::poll_latest", - "binary::Consumer::poll_next", "catalog::Consumer", "catalog::Entry", "catalog::Guard", @@ -466,8 +455,6 @@ exclude = [ "json::Consumer", "json::Snapshot", "json::Stream", - "timeline::Entry", - "timeline::Producer::push", ] [crates.moq-mux.rename] @@ -489,6 +476,7 @@ exclude = [ # The waiter a driver's poll registers, which C makes from its waker and holds across polls. [crates.kio] exclude = [ + "Bridge", "Closed", "Consumer", "ConsumerWeak", diff --git a/ffi/moq/moq.c b/ffi/moq/moq.c index 6fa284343..d7760e68f 100644 --- a/ffi/moq/moq.c +++ b/ffi/moq/moq.c @@ -37,15 +37,12 @@ static int is(moq_buf buf, const char *s) { /* The catalog `mutate` lends for its call, which lists the binary track: counts it in * data. */ -static void lists_state(void *data, moq_hang_catalog_extra *catalog) { +static void reads_catalog(void *data, moq_hang_catalog_extra *catalog) { moq_buf json; moq_hang_error *hang_err = NULL; CHECK(moq_hang_catalog_extra_to_json(catalog, &json, &hang_err)); - for (size_t i = 0; i + 5 <= json.len; i++) { - if (memcmp(json.ptr + i, "state", 5) == 0) { - (*(int *)data)++; - break; - } + if (json.len > 0 && json.ptr[0] == '{') { + (*(int *)data)++; } moq_buf_free(json); } @@ -195,20 +192,21 @@ int main(void) { /* Paths own their segments, so C builds them, and relative ones, from a string. */ moq_path *cam = NULL; - moq_path_too_long *too_long = NULL; - CHECK(moq_path_new(str("/cam/"), &cam, &too_long)); + moq_path_invalid path_invalid; + CHECK(!moq_path_new(str("/cam/"), &cam, &path_invalid) && path_invalid == MOQ_PATH_INVALID_EMPTY_SEGMENT); + CHECK(moq_path_new(str("cam"), &cam, &path_invalid)); CHECK(is(moq_path_as_str(cam), "cam")); moq_path *joined = NULL; - CHECK(moq_path_join(path, cam, &joined, &too_long)); + CHECK(moq_path_join(path, cam, &joined, &path_invalid)); CHECK(is(moq_path_as_str(joined), "room/alice/cam")); moq_path *stripped = moq_path_strip_prefix(joined, path); CHECK(stripped != NULL && moq_path_eq(stripped, cam)); moq_path_free(stripped); CHECK(moq_path_strip_prefix(path, joined) == NULL); moq_relative *up = NULL; - CHECK(moq_relative_new(str("../bob"), &up, &too_long)); + CHECK(moq_relative_new(str("../bob"), &up, &path_invalid)); moq_path *resolved = NULL; - CHECK(moq_path_resolve(joined, up, &resolved, &too_long)); + CHECK(moq_path_resolve(joined, up, &resolved, &path_invalid)); CHECK(is(moq_path_as_str(resolved), "room/bob")); moq_path_free(resolved); moq_relative_free(up); @@ -273,9 +271,9 @@ int main(void) { moq_mux_error_free(mux_err); mux_err = NULL; - /* A binary track the catalog lists, published through moq-mux's generic - * `binary_snapshot` at the config C builds, by a catalog at moq-mux's untyped - * extension, each instance named by the last segment of each argument. */ + /* A catalog at moq-mux's untyped extension, from the config C builds, whose generic + * `is_claimed` is named by the last segment of its argument, and whose `mutate` lends + * the catalog to C. */ moq_broadcast_info *listed = moq_broadcast_info_new(); moq_broadcast_producer *publisher = moq_broadcast_info_produce(listed); moq_broadcast_info_free(listed); @@ -287,22 +285,25 @@ int main(void) { moq_catalog_producer_extra *catalog = NULL; CHECK(moq_catalog_producer_extra_new(publisher, extra, &catalog, &mux_err)); moq_catalog_config_extra_free(extra); - moq_track_producer *state = NULL; - CHECK(moq_broadcast_producer_create_track(publisher, str("state"), NULL, &state, &err)); - moq_binary_config *binary = moq_binary_config_default(); - moq_binary_snapshot *snapshot = NULL; - CHECK(moq_catalog_producer_extra_binary_snapshot_config(catalog, state, binary, &snapshot, &mux_err)); - moq_binary_config_free(binary); - moq_track_producer_free(state); - CHECK(is(moq_binary_snapshot_name(snapshot), "state")); - CHECK(moq_binary_snapshot_update(snapshot, str("latest"), &mux_err)); - int listed_state = 0; - CHECK(moq_catalog_producer_extra_mutate(catalog, lists_state, &listed_state, &mux_err)); - CHECK(listed_state == 1); - moq_binary_snapshot_free(snapshot); + CHECK(!moq_catalog_producer_extra_is_claimed_binary_config(catalog, str("state"))); + int read_catalog = 0; + CHECK(moq_catalog_producer_extra_mutate(catalog, reads_catalog, &read_catalog, &mux_err)); + CHECK(read_catalog == 1); moq_catalog_producer_extra_free(catalog); moq_broadcast_producer_free(publisher); + /* Outside any tokio runtime, as C is, moq-tokio runs on the fallback it starts. */ + moq_origin_producer *spawned = moq_origin_spawn(); + moq_origin_producer_free(spawned); + moq_connect_config *connect = moq_connect_config_default(); + moq_quic_config *quic = moq_quic_config_default(); + moq_tokio_client *tokio_client = NULL; + moq_tokio_error *tokio_err = NULL; + CHECK(moq_connect_config_init(connect, quic, &tokio_client, &tokio_err)); + moq_connect_config_free(connect); + moq_quic_config_free(quic); + moq_tokio_client_free(tokio_client); + /* moq-tokio's terminal connect errors, which moq-net's `Error` shares no names with. */ moq_connect_error unauthorized = MOQ_CONNECT_ERROR_UNAUTHORIZED; CHECK(moq_connect_error_is_auth(&unauthorized)); diff --git a/ffi/moq/moq.cpp b/ffi/moq/moq.cpp index 782c214e8..a2a52d82c 100644 --- a/ffi/moq/moq.cpp +++ b/ffi/moq/moq.cpp @@ -125,7 +125,9 @@ int main() { CHECK(is(path.as_str(), "room/alice")); // Paths own their segments, so C++ builds them, and relative ones, from a string. - auto cam = moq::path::new_("/cam/"); + auto empty = moq::path::new_("/cam/"); + CHECK(!empty && empty.error() == moq::path_invalid::empty_segment); + auto cam = moq::path::new_("cam"); CHECK(cam && is(cam->as_str(), "cam")); auto joined = path.join(*cam); CHECK(joined && is(joined->as_str(), "room/alice/cam")); @@ -172,29 +174,25 @@ int main() { auto truncated = moq::codec_opus_audio_config(moq::view(head, 8)); CHECK(!truncated && !truncated.error().to_string().empty()); - // A binary track the catalog lists, published through moq-mux's generic - // `binary_snapshot` at the config C++ builds, by a catalog at moq-mux's untyped - // extension, each instance named by the last segment of each argument. + // A catalog at moq-mux's untyped extension, from the config C++ builds, whose generic + // `is_claimed` is named by the last segment of its argument, and whose `mutate` lends + // the catalog to C++. { moq::broadcast_producer publisher = moq::broadcast_info::new_().produce(); moq::catalog_config_extra extra = moq::catalog_config::default_().with_catalog_extra(moq::hang_catalog_extra::default_()); auto catalog = moq::catalog_producer_extra::new_(publisher, std::move(extra)); CHECK(catalog); - auto state = publisher.create_track("state", std::nullopt); - CHECK(state); - auto snapshot = catalog->binary_snapshot_config(std::move(*state), moq::binary_config::default_()); - CHECK(snapshot && is(snapshot->name(), "state")); - CHECK(snapshot->update("latest")); - int listed_state = 0; + CHECK(!catalog->is_claimed_binary_config("state")); + int read_catalog = 0; CHECK(catalog->mutate([&](moq::hang_catalog_extra &lent) { auto json = lent.to_json(); CHECK(json); - if (json && json.value().str().find("state") != std::string_view::npos) { - listed_state++; + if (json && json.value().str().substr(0, 1) == "{") { + read_catalog++; } })); - CHECK(listed_state == 1); + CHECK(read_catalog == 1); } // moq-tokio's terminal connect errors, which moq-net's `Error` shares no names with. diff --git a/ffi/moq/moq.kt b/ffi/moq/moq.kt index 824de3eda..3b60f1d09 100644 --- a/ffi/moq/moq.kt +++ b/ffi/moq/moq.kt @@ -131,8 +131,14 @@ fun main() { expect(path.asStr() == "room/alice", "a broadcast has its path") // Paths own their segments, so Kotlin builds them, and relative ones, from a string. - val cam = Path.new("/cam/") - expect(cam.asStr() == "cam", "a path trims its slashes") + try { + Path.new("/cam/") + expect(false, "a path with an empty segment is an error") + } catch (e: PathInvalidException) { + expect(e.error == PathInvalid.EMPTY_SEGMENT, "an empty segment is its own error") + } + val cam = Path.new("cam") + expect(cam.asStr() == "cam", "a path builds from its segments") val joined = path.join(cam) expect(joined.asStr() == "room/alice/cam", "paths join") expect(joined.stripPrefix(path) == cam, "a path strips its prefix") @@ -176,20 +182,18 @@ fun main() { expect(e.message.isNotEmpty(), "a truncated head's error has a message") } - // A binary track the catalog lists, published through moq-mux's generic - // `binary_snapshot` at the config Kotlin builds, by a catalog at moq-mux's untyped - // extension, each instance named by the last segment of each argument. + // A catalog at moq-mux's untyped extension, from the config Kotlin builds, whose generic + // `is_claimed` is named by the last segment of its argument, and whose `mutate` lends + // the catalog to Kotlin. val publisher = BroadcastInfo.new().produce() val extra = CatalogConfig.default().withCatalogExtra(HangCatalogExtra.default()) val catalog = CatalogProducerExtra.new(publisher, extra) - val snapshot = catalog.binarySnapshotConfig(publisher.createTrack("state", null), BinaryConfig.default()) - expect(snapshot.name() == "state", "a snapshot has its track's name") - snapshot.update("latest") - var listed = 0 + expect(!catalog.isClaimedBinaryConfig("state"), "an unclaimed name is not claimed") + var read = 0 catalog.mutate { lent -> - if (lent.toJson().contains("state")) listed++ + if (lent.toJson().startsWith("{")) read++ } - expect(listed == 1, "the catalog lists the snapshot's track") + expect(read == 1, "mutate lends the catalog once") // moq-tokio's terminal connect errors, which moq-net's `Error` shares no names with. expect(ConnectError.UNAUTHORIZED.isAuth(), "unauthorized is an auth error") diff --git a/quest/m1/README.md b/quest/m1/README.md index 46d63dd19..f442f6c3a 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -16,7 +16,6 @@ are folded into the [exporter's](/quest/m1/ffi-export/README.md). The ## Required -- [Bump the moq pin past the fallback runtime](/quest/m1/moq-pin.md) - `ts` and `ffi` build against moq with moq-tokio's fallback runtime - [Waiting: publish the UniFFI fork](/quest/m1/uniffi-release.md) - the fork publishes to crates.io under `rust2-*` names, once the maintainer decides it should - [Exporter](/quest/m1/ffi-export/README.md) - moq's bindings exported from its crates' `pub` API, replacing the fork - [Land main through quest land](/quest/m1/land.md) - every queued PR lands as one tested batch through the shared gate diff --git a/quest/m1/ffi-export/README.md b/quest/m1/ffi-export/README.md index d7903b789..b46a84a2c 100644 --- a/quest/m1/ffi-export/README.md +++ b/quest/m1/ffi-export/README.md @@ -53,5 +53,6 @@ Every generator on the C ABI: - [Session config's foreign types](/quest/m1/ffi-export/foreign-types.md) - `Url`, `SocketAddr`, `PathBuf`, and `Vec` cross 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` - [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 diff --git a/quest/m1/ffi-export/session-tokio.md b/quest/m1/ffi-export/session-tokio.md index d21b44a6d..9e1afe1ee 100644 --- a/quest/m1/ffi-export/session-tokio.md +++ b/quest/m1/ffi-export/session-tokio.md @@ -29,13 +29,12 @@ use unless the caller supplies one. Each entry point and future that needs tokio the caller's `Handle::try_current()`, else in that process-wide runtime. C gets no new names, a Rust caller inside tokio sees no change, and one outside gets a runtime instead of `NoRuntime`. It landed in [moq-dev/moq#7123](https://github.com/moq-dev/moq/pull/7123); -the pin bump brings it here. +rust2's moq pin includes it. Public API: the C names moq's bindings get. ## Required -- [Bump the moq pin past the fallback runtime](/quest/m1/moq-pin.md) - C reaches moq-tokio's fallback runtime - [Setters for an object's pub fields](/quest/m1/ffi-export/field-setters.md) - C fills in the session config - [Session config's foreign types](/quest/m1/ffi-export/foreign-types.md) - `Url`, `SocketAddr`, `PathBuf`, and `Vec` cross the C ABI diff --git a/quest/m1/ffi-export/warnings.md b/quest/m1/ffi-export/warnings.md new file mode 100644 index 000000000..1009e7cda --- /dev/null +++ b/quest/m1/ffi-export/warnings.md @@ -0,0 +1,14 @@ +# [S] Glue that builds without warnings + +## Goal + +The Rust glue the exporter writes builds without warnings, and `just ffi test` builds the +api fixture's glue with `-D warnings` so a new one fails. + +## Plan + +Found on 2026-10-28 bumping the moq pin: a callback that returns `()`, as +`moq_mux::catalog::Producer::mutate` takes, emits `let result = ...; ()`, which warns +`unused variable: result` three times in moq's glue. `lift` of `Type::Unit` in +`ffi/src/glue.rs` drops its expression; passing it through as `e` fixes the closure and the +callback vtable alike. The api fixture has no unit-returning closure yet; add one. diff --git a/quest/m1/moq-pin.md b/quest/m1/moq-pin.md deleted file mode 100644 index 60c089cc6..000000000 --- a/quest/m1/moq-pin.md +++ /dev/null @@ -1,20 +0,0 @@ -# [M] Bump the moq pin past the fallback runtime - -## Goal - -`moq_rev`, the moq revision `ts` and `ffi` both build against, moves to moq's `main` at -[moq-dev/moq#7123](https://github.com/moq-dev/moq/pull/7123)'s merge, so moq-tokio's fallback -runtime reaches the C ABI. `just ffi moq`, `just ts moq`, `just ts census`, `just check`, -and `just test` pass at the new pin. - -## Plan - -Found on 2026-10-28 against moq's `main`, about 85 commits past the pin: `ffi/moq/ffi.toml` -fails with 17 errors, excludes that name nothing anymore and new items the exporter refuses, -and `just ts census` ICEs on a trait object of an associated type over a type parameter. - -- The excludes are config the translators take, so keep them to what the export refuses; - a refusal that needs a translator change rather than an exclude is a decision to report. -- Report the census before and after for `ts` and `ffi`. -- From C, `moq_origin_spawn` and `moq_connect_config_init` succeed at the new pin; at the - old one the first aborts. Add that to `moq/moq.c`. diff --git a/ts/fixtures/reject/census.md b/ts/fixtures/reject/census.md index 20e1a77f3..bfdc7dd05 100644 --- a/ts/fixtures/reject/census.md +++ b/ts/fixtures/reject/census.md @@ -1,8 +1,8 @@ # Census of `reject-fixture` - Refusals: 78 -- Function instances: 89 -- Generic functions no instance reached, lowered over their type parameters: 6 +- Function instances: 90 +- Generic functions no instance reached, lowered over their type parameters: 7 ## By construct diff --git a/ts/fixtures/reject/src/lib.rs b/ts/fixtures/reject/src/lib.rs index e2908ab6a..39c432d6b 100644 --- a/ts/fixtures/reject/src/lib.rs +++ b/ts/fixtures/reject/src/lib.rs @@ -537,3 +537,15 @@ pub fn mutex_number(m: &mut std::sync::Mutex) -> u8 { *n += 1; *n } + +pub trait Source { + type Item: Reading; + fn item(&self) -> &Self::Item; +} + +/// A trait object of a type only an instance decides, which a census lowering this over +/// its type parameter can't make. +pub fn source_reading(s: &S) -> u8 { + let r: &dyn Reading = s.item(); + r.read() +} diff --git a/ts/justfile b/ts/justfile index b0a714a30..76b087b14 100644 --- a/ts/justfile +++ b/ts/justfile @@ -9,7 +9,7 @@ set shell := ["bash", "-euo", "pipefail", "-c"] export PATH := if env("RUST2_TS_TOOLCHAIN", "") == "" { env("PATH") } else { env("RUST2_TS_TOOLCHAIN") / "bin:" + env("PATH") } # The moq revision `moq` translates by default. -moq_rev := "c764acebb90b5c102a8ea90207dd125ae4fd326b" +moq_rev := "30f25c04e6d0288d87893dc609ba582518be2cf6" default: @just --list diff --git a/ts/src/lower/dynamic.rs b/ts/src/lower/dynamic.rs index ce2af5d1f..270126afd 100644 --- a/ts/src/lower/dynamic.rs +++ b/ts/src/lower/dynamic.rs @@ -7,7 +7,7 @@ //! `Arc` is an `rt.ArcDyn` around the one a box would be. use rustc_hir::def_id::DefId; -use rustc_middle::ty::{self, GenericArgsRef, Instance, Interner as _, Ty, TyCtxt}; +use rustc_middle::ty::{self, GenericArgsRef, Instance, Interner as _, Ty, TyCtxt, TypeVisitableExt}; use rustc_span::Span; use super::Translator; @@ -332,6 +332,11 @@ impl<'tcx> Body<'_, '_, 'tcx> { if pointee.is_trait() { return value; } + // A census over type parameters can't make the class: only an instance decides + // what the pointee is. + if self.t.polymorphic() && pointee.has_param() { + return Expr::undefined(); + } let held = match from.kind() { ty::Ref(_, _, ty::Mutability::Mut) if self.t.needs_place(pointee) => Held::Place, ty::Ref(..) => Held::Value, From 4747602b327f0e12495514c3ea2b37108256bbfc Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Wed, 28 Oct 2026 16:37:49 -0700 Subject: [PATCH 3/4] fix(ffi): name the fallback probe's config apart from the setters' Co-Authored-By: Claude Opus 5.5 --- ffi/moq/moq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ffi/moq/moq.c b/ffi/moq/moq.c index 7ae994a75..58abaab6e 100644 --- a/ffi/moq/moq.c +++ b/ffi/moq/moq.c @@ -304,12 +304,12 @@ int main(void) { /* Outside any tokio runtime, as C is, moq-tokio runs on the fallback it starts. */ moq_origin_producer *spawned = moq_origin_spawn(); moq_origin_producer_free(spawned); - moq_connect_config *connect = moq_connect_config_default(); + moq_connect_config *client_config = moq_connect_config_default(); moq_quic_config *quic = moq_quic_config_default(); moq_tokio_client *tokio_client = NULL; moq_tokio_error *tokio_err = NULL; - CHECK(moq_connect_config_init(connect, quic, &tokio_client, &tokio_err)); - moq_connect_config_free(connect); + CHECK(moq_connect_config_init(client_config, quic, &tokio_client, &tokio_err)); + moq_connect_config_free(client_config); moq_quic_config_free(quic); moq_tokio_client_free(tokio_client); From e1d1d80fbb5e2f4b1a63db2e4c1d17e53942a678 Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Wed, 28 Oct 2026 16:57:58 -0700 Subject: [PATCH 4/4] chore(quest): drop session-tokio's empty Required Co-Authored-By: Claude Opus 5.5 --- quest/m1/ffi-export/session-tokio.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/quest/m1/ffi-export/session-tokio.md b/quest/m1/ffi-export/session-tokio.md index 70ea4e87c..753cb4b22 100644 --- a/quest/m1/ffi-export/session-tokio.md +++ b/quest/m1/ffi-export/session-tokio.md @@ -33,7 +33,3 @@ of `NoRuntime`. It landed in [moq-dev/moq#7123](https://github.com/moq-dev/moq/p rust2's moq pin includes it. Public API: the C names moq's bindings get. - -## Required - -