diff --git a/ffi/README.md b/ffi/README.md index 07563cb96..e972078a3 100644 --- a/ffi/README.md +++ b/ffi/README.md @@ -921,8 +921,10 @@ runtime package and each crate's include [`runtime/rt.go`](runtime/rt.go) and `--census dir` exports nothing. It writes `.md` for the facade, which counts what exports and ranks every refusal by construct and by the type it names, lists each refused item at its span, then the `exclude` list that exports the rest, and what else it left out, such as what C can never hold and the traits C cannot implement, and why. -It ignores the config's `exclude`. It still fails on an `instance not inferred` -refusal, which is a bug in the exporter's inference rather than in the crate. +It ignores the config's `exclude`, but lists each exclude that leaves out an item that +would export, and fails on it, so the list holds only what the export refuses. It also +fails on an `instance not inferred` refusal, which is a bug in the exporter's inference +rather than in the crate. ## Tests diff --git a/ffi/fixtures/api/ffi.toml b/ffi/fixtures/api/ffi.toml index 6a277fe3d..c446752df 100644 --- a/ffi/fixtures/api/ffi.toml +++ b/ffi/fixtures/api/ffi.toml @@ -3,9 +3,12 @@ # `Rooted`, `Copied`, `Stored`, and `Layer` only convert, so their parameters take what # converts into them, and # `field@` leaves out a field alone where a method takes its path, as `Retry`'s and -# `Slot`'s do. `Slot` has no such method, so its path alone names its field. A -# function instance is left out by its path, as `depth_past` at `polar::Point` is. +# `Slot`'s do, and `Retry::jitter` and `field@Retry::jitter` leave out a refused method +# and its field. `Slot` has no such method, so its path alone names its field. A +# function instance is left out by its path, as `depth_past` at `polar::Point` is. Swift +# refuses `among`, so the census takes its exclude. exclude = [ + "among", "Copied", "Layer", "Node::next", @@ -15,7 +18,9 @@ exclude = [ "Sample", "Scoped", "Slot::value", + "Retry::jitter", "field@Retry::delay", + "field@Retry::jitter", "field@Slot::value", "Stack::depth_past", "Stored", diff --git a/ffi/fixtures/api/src/lib.rs b/ffi/fixtures/api/src/lib.rs index 5faf446d3..99e4d5a2b 100644 --- a/ffi/fixtures/api/src/lib.rs +++ b/ffi/fixtures/api/src/lib.rs @@ -1296,11 +1296,18 @@ pub fn next_packet(packet: Packet) -> Packet { pub struct Retry { pub limit: Option, pub delay: Option, + /// Its field exports, but the method of its name is refused, so the config excludes + /// both, and the census lists only `field@Retry::jitter` as excluding what exports. + pub jitter: u32, } impl Retry { pub fn new(limit: Option) -> Self { - Self { limit, delay: None } + Self { + limit, + delay: None, + jitter: 0, + } } pub fn limit(&self) -> u32 { @@ -1314,6 +1321,11 @@ impl Retry { pub fn set_limit(&mut self, limit: u32) { self.limit = Some(limit); } + + /// The jitter capped by `cap`, if any: a nested `Option`, which the export refuses. + pub fn jitter(&self, cap: Option>>) -> u32 { + cap.and_then(|cap| *cap).map_or(self.jitter, |cap| self.jitter.min(cap)) + } } /// A digest, as moq's FLAC config holds its MD5: an object, whose array field C reads and @@ -2740,3 +2752,8 @@ pub fn next_hop(hop: Option>) -> Option> { pub fn farther_hop(hops: Pair>) -> Box> { Box::new(hops.left.max(hops.right)) } + +/// Three optional borrowed counters, past what Swift takes, so the config leaves it out. +pub fn among(first: Option<&Counter>, second: Option<&Counter>, third: Option<&Counter>) -> u64 { + [first, second, third].into_iter().flatten().map(|c| c.value).sum() +} diff --git a/ffi/justfile b/ffi/justfile index fc4c72ddd..561d54adf 100644 --- a/ffi/justfile +++ b/ffi/justfile @@ -46,7 +46,7 @@ fix: run *args: cargo run --locked --quiet -- {{ args }} -# Census the stand-in facade moq/ffi.toml exports into target/census/moq-ffi.md, from the pinned moq revision or a checkout. +# Census the stand-in facade moq/ffi.toml exports into target/census/moq-ffi.md, from the pinned moq revision or a checkout, failing when moq/ffi.toml excludes an item that exports. census checkout="": (standin checkout) cargo run --locked --quiet -- --config moq/ffi.toml --manifest-path target/moq-ffi/Cargo.toml --census target/census diff --git a/ffi/moq/ffi.toml b/ffi/moq/ffi.toml index 495076140..235177e03 100644 --- a/ffi/moq/ffi.toml +++ b/ffi/moq/ffi.toml @@ -3,74 +3,52 @@ # still has to cover. `kio` is moq-net's re-export of all of kio, of which moq-ffi ships # only what the facade re-exports. exclude = [ - "bytes", "Client::connect", + "bytes", "clock::Deadlines::enter", "clock::Entered", - "clock::rng", "clock::Rng", + "clock::rng", "frame::Buffer::drain", - "frame::Producer::group", - "group::Consumer::poll_read_frames", - "hang::container::Frame::encode", "hang::moq_net", "kio", "mux::catalog::Guard", "mux::catalog::Producer::modify", "mux::catalog::Producer::modify", "mux::catalog::Producer::modify", - "mux::codec::aac::Config::parse", - "mux::codec::annexb::from_length_prefixed", - "mux::codec::annexb::length_prefixed_to_annexb", - "mux::codec::opus::Config::parse", - "mux::container::fmp4::mp4_atom", - "mux::container::fmp4::Wire::new", - "mux::container::fmp4::Wire::trak", - "mux::container::Producer::modify", "mux::container::Producer::modify", "mux::container::Producer::modify", "mux::container::Producer::modify", "mux::container::Producer::modify", "mux::container::Producer::modify", - "mux::container::Producer::set", - "mux::container::Producer::modify", + "mux::container::Producer::modify", "mux::container::Producer::modify", "mux::container::Producer::modify", "mux::container::Producer::modify", "mux::container::Producer::modify", "mux::container::Producer::modify", - "mux::container::Producer::set", - "mux::container::Producer::modify", + "mux::container::Producer::modify", "mux::container::Producer::modify", "mux::container::Producer::modify", "mux::container::Producer::modify", "mux::container::Producer::modify", "mux::container::Producer::modify", - "mux::container::Producer::set", - "mux::container::Producer::modify", + "mux::container::Producer::modify", "mux::container::Producer::modify", "mux::container::Producer::modify", "mux::container::Producer::modify", "mux::container::Producer::modify", "mux::container::Producer::modify", - "mux::container::Producer::set", - "mux::container::ts::Follower::export", - "mux::container::ts::Follower::export", - "mux::container::ts::Follower::export", - "mux::Source::bind", - "mux::Source::resolve", - "mux::Source::resolve_reference", - "mux::Source::subscribe_track", - "Path::from_static", - "Timestamp::as_micros", - "Timestamp::as_millis", - "Timestamp::as_nanos", - "Timestamp::as_scale", + "mux::container::Producer::modify", + "mux::container::fmp4::Wire::new", + "mux::container::fmp4::Wire::trak", + "mux::container::fmp4::mp4_atom", + "tokio::Server::accept_health", + "tokio::Server::tls_acceptor", "tokio::connect::Config::deprecated", "tokio::connect::Config::goaway", "tokio::connect::Config::resolve", "tokio::connect::Config::websocket", - "tokio::connection::Monitor::poll_presence", "tokio::connection::Monitor::snapshot", "tokio::connection::Monitor::state", "tokio::connection::Monitor::state_changed", @@ -84,23 +62,17 @@ exclude = [ "tokio::quic::Config::controller", "tokio::quic::Config::deprecated", "tokio::quic::Config::resolve", - "tokio::Server::accept_health", "tokio::server::Config::demux", "tokio::server::Config::websocket", "tokio::server::Listener::accept_health", "tokio::server::Request::quic", - "tokio::server::Request::within", "tokio::server::Request::with_quic_limits", - "tokio::Server::tls_acceptor", + "tokio::server::Request::within", "tokio::tls::Connect::build", "tokio::tls::Connect::deprecated", "tokio::tls::Listen::deprecated", "tokio::tls::Listen::load_roots", - "tokio::tls::Listen::server_config", "tokio::tls::PeerIdentity::chain", "tokio::tls::PeerIdentity::from_chain", - "tokio::tls::Serve::config", "tokio::tls::Serve::resolver", - "transport::poll::Ungrouped", - "varint::encode_quic", ] diff --git a/ffi/moq/moq.swift b/ffi/moq/moq.swift index 532010f9b..07d632d5e 100644 --- a/ffi/moq/moq.swift +++ b/ffi/moq/moq.swift @@ -110,7 +110,7 @@ final class Queue: TaskExecutor, @unchecked Sendable { } func launch(_ body: @escaping @Sendable () async throws -> Void) { - Task(executorPreference: self, operation: body) + _ = Task(executorPreference: self, operation: body) } } diff --git a/ffi/src/census.rs b/ffi/src/census.rs index 23705edb5..498c8216d 100644 --- a/ffi/src/census.rs +++ b/ffi/src/census.rs @@ -10,8 +10,15 @@ use crate::abi::Clash; use crate::collect::{Refusal, Report}; use crate::ir::{Access, Api, Function}; -/// The census of the facade as Markdown; `at` locates a span. -pub fn render(api: &Api, collected: &Report, clashes: &[Clash], at: &dyn Fn(Span) -> String) -> String { +/// The census of the facade as Markdown, listing `exporting`, each exclude whose item +/// would export and its paths; `at` locates a span. +pub fn render( + api: &Api, + collected: &Report, + exporting: &[(String, Vec)], + clashes: &[Clash], + at: &dyn Fn(Span) -> String, +) -> String { let records = &api.records; let enums = &api.enums; let objects: Vec<_> = api.objects.iter().filter(|o| !o.foreign).collect(); @@ -184,6 +191,12 @@ pub fn render(api: &Api, collected: &Report, clashes: &[Clash], at: &dyn Fn(Span let _ = writeln!(out, "- `{path}`: {count} items"); } } + if !exporting.is_empty() { + let _ = writeln!(out, "\n## Excluded by the config, though it exports\n"); + for (exclude, exported) in exporting { + let _ = writeln!(out, "- `{exclude}`: `{}`", exported.join("`, `")); + } + } if !collected.hidden.is_empty() { let _ = writeln!(out, "\n## `#[doc(hidden)]`, left out\n"); for path in &collected.hidden { diff --git a/ffi/src/collect.rs b/ffi/src/collect.rs index 92373fe26..be9179be9 100644 --- a/ffi/src/collect.rs +++ b/ffi/src/collect.rs @@ -145,6 +145,9 @@ pub struct Facade<'a> { pub package: &'a str, /// Paths from its root the config leaves out. pub exclude: &'a [String], + /// Paths from its root a census checks, without leaving out what they name: each + /// path one names is recorded in [`Report::audited`], as the exclude would have checked it. + pub audit: &'a [String], } /// What collection found in the facade, by paths from its root. @@ -165,6 +168,8 @@ pub struct Report { pub unheld: Vec<(String, Why)>, /// Excluded paths, and how many items each left out. pub excluded: Vec<(String, usize)>, + /// A census's audited paths, and each path one names, whether or not that item exports. + pub audited: Vec<(String, Vec)>, /// Type aliases, which export nothing of their own. pub aliases: Vec, } @@ -352,6 +357,7 @@ pub fn collect<'tcx>(tcx: TyCtxt<'tcx>, facade: &Facade<'_>) -> Collected { hidden: Vec::new(), unheld: Vec::new(), excluded: facade.exclude.iter().map(|path| (path.clone(), 0)).collect(), + audited: facade.audit.iter().map(|path| (path.clone(), Vec::new())).collect(), aliases: Vec::new(), }, instances: Vec::new(), @@ -578,8 +584,9 @@ impl<'tcx> Collector<'tcx> { self.crates.contains(&krate) } - /// Whether the config excludes `path`, counting the exclusion. A member of an instance - /// is left out by its instance's path or its type's, which leaves it out of each. + /// Whether the config excludes `path`, counting the exclusion, or else recording it under + /// each audited path that names it. A member of an instance is left out by its instance's + /// path or its type's, which leaves it out of each. fn exclude(&mut self, path: &[String]) -> bool { let report = &mut self.report; for (_, key) in config::keys(&path[1..]) { @@ -588,6 +595,12 @@ impl<'tcx> Collector<'tcx> { return true; } } + // Under every key that names it, so one census lists a broad exclude beside a narrow one. + for (_, key) in config::keys(&path[1..]) { + if let Some((_, named)) = report.audited.iter_mut().find(|(audited, _)| *audited == key) { + named.push(path[1..].join("::")); + } + } false } diff --git a/ffi/src/driver.rs b/ffi/src/driver.rs index 0dd5a665b..17891233b 100644 --- a/ffi/src/driver.rs +++ b/ffi/src/driver.rs @@ -19,6 +19,7 @@ use rustc_span::{FileName, Span, sym}; use crate::abi::Abi; use crate::config::{self, Config}; +use crate::ir::{self, Api}; use crate::{census, collect, glue, merge}; /// Run as rustc, with `args` as cargo passed them: the wrapped rustc's path first. @@ -144,12 +145,23 @@ impl Callbacks for Export { Output::Census(_) => &[], Output::Dir(_) | Output::Api(_) => &self.config.exclude, }, + // It lists instead each item one names that exports. + audit: match self.output { + Output::Census(_) => &self.config.exclude, + Output::Dir(_) | Output::Api(_) => &[], + }, }; let collected = collect::collect(tcx, &facade); let report = &collected.report; if let Output::Census(dir) = &self.output { let abi = Abi::new(&collected.api, &self.facade.lib); - let text = census::render(&collected.api, report, &abi.clashes, &|span| at(tcx, span)); + // What Swift refuses needs its exclude, as the export says, so it is not exporting. + let swift: FxHashSet<_> = crate::swift::refusals(&abi) + .into_iter() + .map(|(f, _)| f.shown.clone()) + .collect(); + let exporting = exporting(&collected.api, &report.audited, &swift); + let text = census::render(&collected.api, report, &exporting, &abi.clashes, &|span| at(tcx, span)); // A census reports what a crate uses, but a missed instance is the exporter's bug. for refusal in &report.refusals { if refusal.why.iter().any(|why| why.construct == collect::NOT_INFERRED) { @@ -159,6 +171,13 @@ impl Callbacks for Export { if let Err(err) = write(&dir.join(format!("{}.md", report.package)), &text) { tcx.dcx().err(format!("rust2-ffi: {err}")); } + // An exclude that leaves out what would export hides that much of the API. + for (exclude, exported) in &exporting { + tcx.dcx().err(format!( + "rust2-ffi: exclude `{exclude}` in the config leaves out `{}`, which exports", + exported.join("`, `") + )); + } return stop_on_errors(tcx); } for refusal in &report.refusals { @@ -194,6 +213,67 @@ impl Callbacks for Export { } } +/// Each exclude whose item would export without it, and that item's paths: what an +/// exclude checked, from [`collect::Report::audited`], that the census's API holds by the +/// same path, except a function `refused` names by its shown path, since a generic's +/// instances share a span but Swift may refuse only some. +fn exporting( + api: &Api, + audited: &[(String, Vec)], + refused: &FxHashSet, +) -> Vec<(String, Vec)> { + // Every path an exported item is checked by, from the facade's root, as the walk checks it. + let mut paths = FxHashSet::default(); + let mut add = |path: &[String]| { + paths.insert(path[1..].join("::")); + }; + let methods = |methods: &[ir::Function], add: &mut dyn FnMut(&[String])| { + for f in methods.iter().filter(|f| !refused.contains(&f.shown)) { + match f.access { + // A field is checked by `field@` and, unless a method or constant takes its + // name, by its path, which then names that method or constant instead. + ir::Access::Field { shared, .. } => { + let mut key = f.shown.clone(); + key[1].insert_str(0, "field@"); + add(&key); + if !shared { + add(&f.shown); + } + } + _ => add(&f.shown), + } + } + }; + for r in &api.records { + add(&r.shown); + methods(&r.methods, &mut add); + } + for e in &api.enums { + add(&e.shown); + methods(&e.methods, &mut add); + } + for o in &api.objects { + add(&o.shown); + methods(&o.methods, &mut add); + } + for c in &api.callbacks { + add(&c.path); + methods(&c.methods, &mut add); + } + methods(&api.functions, &mut add); + for c in &api.constants { + add(&c.path); + } + (audited.iter()) + .filter_map(|(exclude, named)| { + let mut exported: Vec = named.iter().filter(|path| paths.contains(*path)).cloned().collect(); + exported.sort(); + exported.dedup(); + (!exported.is_empty()).then(|| (exclude.clone(), exported)) + }) + .collect() +} + impl Export { /// This target's API merged with the other targets', or none once a difference /// between two of them is an error. @@ -321,9 +401,9 @@ impl Export { .with_span_note(*first_span, format!("{first} is here")) .emit(); } - for (span, why) in crate::swift::refusals(&abi) { + for (function, why) in crate::swift::refusals(&abi) { tcx.dcx().span_err( - span, + function.span, format!("rust2-ffi: {why}; exclude it in the config to leave it out"), ); } diff --git a/ffi/src/swift.rs b/ffi/src/swift.rs index 2e0b9fe3a..0ae2907a5 100644 --- a/ffi/src/swift.rs +++ b/ffi/src/swift.rs @@ -23,8 +23,6 @@ use std::collections::{BTreeMap, BTreeSet, HashMap}; use std::fmt::Write; -use rustc_span::Span; - use crate::abi::{self, Abi, Ty, pascal}; use crate::ir::{Access, Closure, Function, Int, Literal, Mutability, On, Param, Receiver, Type}; @@ -1782,11 +1780,11 @@ fn thrown_value(thrown: &Thrown, lifted: &str) -> String { /// overloads. const MAX_OPTIONAL: usize = 2; -/// Each function or method Swift cannot export, with its span and why, which the driver +/// Each function or method Swift cannot export, and why, which the driver /// refuses before any language is generated: one taking more optional borrowed structs /// than [`MAX_OPTIONAL`], or returning an error that holds one, which `Swift.Error` /// requires be copyable. -pub fn refusals(abi: &Abi<'_>) -> Vec<(Span, String)> { +pub fn refusals<'a>(abi: &Abi<'a>) -> Vec<(&'a Function, String)> { let structs = structs(abi); let api = abi.api; let methods = (api.records.iter().flat_map(|r| &r.methods)) @@ -1800,7 +1798,7 @@ pub fn refusals(abi: &Abi<'_>) -> Vec<(Span, String)> { .count(); if optional > MAX_OPTIONAL { refusals.push(( - function.span, + function, format!( "{what}: {optional} optional borrowed objects, past the {MAX_OPTIONAL} Swift takes, which overloads each with and without it since its optional holds an object only by consuming it" ), @@ -1808,7 +1806,7 @@ pub fn refusals(abi: &Abi<'_>) -> Vec<(Span, String)> { } if function.err.as_ref().is_some_and(|err| unique(&structs, err)) { refusals.push(( - function.span, + function, format!("{what}: error holding an object Swift cannot copy, as `Swift.Error` requires"), )); } diff --git a/ffi/tests/fixtures.rs b/ffi/tests/fixtures.rs index ba18356f2..9f18597df 100644 --- a/ffi/tests/fixtures.rs +++ b/ffi/tests/fixtures.rs @@ -1299,10 +1299,32 @@ fn relative_target() { .env("CARGO_TARGET_DIR", "build") .output() .expect("running rust2-ffi"); + // The fixture's config leaves out items that export, which the census fails on, after + // writing itself: only on those, and on a field whose method of its name is refused, + // not on that method. + let stderr = String::from_utf8_lossy(&output.stderr); + assert!(!output.status.success(), "the census passed:\n{stderr}"); + let errors: Vec<&str> = stderr + .lines() + .filter(|line| line.starts_with("error: rust2-ffi:")) + .collect(); assert!( - output.status.success(), - "the census failed:\n{}", - String::from_utf8_lossy(&output.stderr) + errors.iter().all(|error| error.ends_with(", which exports")), + "the census failed otherwise:\n{stderr}" + ); + assert!( + errors.contains( + &"error: rust2-ffi: exclude `field@Retry::jitter` in the config leaves out `field@Retry::jitter`, which exports" + ), + "the census does not fail on `field@Retry::jitter`:\n{stderr}" + ); + assert!( + !errors.iter().any(|error| error.contains("exclude `Retry::jitter`")), + "the census fails on `Retry::jitter`:\n{stderr}" + ); + assert!( + !errors.iter().any(|error| error.contains("exclude `among`")), + "the census fails on `among`, which Swift refuses:\n{stderr}" ); let text = std::fs::read_to_string(census.join("api-fixture.md")).unwrap(); for line in [ @@ -1310,9 +1332,35 @@ fn relative_target() { "- `Void`: object no export returns", "- `release`: type C never holds `Lease`", "- `Unnamed`: generic type no export instantiates", + // An exclude that names what exports, by its generic or instance path or as a field, + // even where a method of the field's name is refused. + "## Excluded by the config, though it exports", + "- `Timed`: `Timed`", + "- `Pair::swap`: `Pair::swap`", + "- `Slot::value`: `Slot::value`", + "- `field@Retry::jitter`: `field@Retry::jitter`", + "- `Stack::depth_past`: `Stack::depth_past`", ] { assert!(text.contains(line), "the census lists no `{line}`:\n{text}"); } + let exporting = text + .split("## Excluded by the config, though it exports") + .nth(1) + .unwrap(); + let exporting = exporting.split("\n## ").next().unwrap(); + // Not one that names only what is refused or no export returns. + for refused in [ + "- `Copied`", + "- `Sample`", + "- `Queued`", + "- `Layer`", + "- `Retry::jitter`", + ] { + assert!( + !exporting.contains(refused), + "the census lists `{refused}` as exporting:\n{exporting}" + ); + } assert!(dir.join("build").exists()); } diff --git a/quest/m1/ffi-refusals/README.md b/quest/m1/ffi-refusals/README.md index 6a74eb991..de3dc34b1 100644 --- a/quest/m1/ffi-refusals/README.md +++ b/quest/m1/ffi-refusals/README.md @@ -74,12 +74,12 @@ Decided with the maintainer on 2026-11-12, in the quest audit: [#710](https://github.com/kixel-ai/rust2/pull/710), yet the Goal is not reached: the 2026-11-11 nightly census ([run 43038758163](https://github.com/kixel-ai/rust2/actions/runs/43038758163)) still - refuses 94 items and 5 types at the pin, behind `ffi/moq/ffi.toml`'s 100 excludes, and + refuses 94 items and 5 types at the pin, behind `ffi/moq/ffi.toml`'s then 100 excludes, and moq's `main` adds the 36 errors [the pin bump](/quest/m1/ffi-refusals/moq-pin.md) measured. So each construct left has a child again: - `NonZero`, which exports, - [the rest at moq's main](/quest/m1/ffi-refusals/moq-main.md), and - [the excludes that hide what exports](/quest/m1/ffi-refusals/stale-excludes.md); the + `NonZero`, which exports, and + [the rest at moq's main](/quest/m1/ffi-refusals/moq-main.md); `just ffi census` + fails on an exclude that names what exports. The bump is then only the bump. The types refused for not being `Send` (`clock::Entered`, `clock::Rng`, `catalog::Guard`) clear with [not-send](/quest/m1/ffi-export/not-send.md). - ✅ The closing work is a child, [no config](/quest/m1/ffi-refusals/no-config.md), as diff --git a/quest/m1/ffi-refusals/no-config.md b/quest/m1/ffi-refusals/no-config.md index d8ea045b9..5134f1bbe 100644 --- a/quest/m1/ffi-refusals/no-config.md +++ b/quest/m1/ffi-refusals/no-config.md @@ -30,5 +30,4 @@ that passes them). ## Required - [The moq pin bump](/quest/m1/ffi-refusals/moq-pin.md) - the pin is at moq's `main`, where the census is taken -- [No exclude hides what exports](/quest/m1/ffi-refusals/stale-excludes.md) - the list is down to what the export refuses - [Not Send](/quest/m1/ffi-export/not-send.md) - exports the three types the census still refuses for not being `Send` diff --git a/quest/m1/ffi-refusals/stale-excludes.md b/quest/m1/ffi-refusals/stale-excludes.md deleted file mode 100644 index 32c5d7920..000000000 --- a/quest/m1/ffi-refusals/stale-excludes.md +++ /dev/null @@ -1,31 +0,0 @@ -# [S] No exclude hides what exports - -## Goal - -`ffi/moq/ffi.toml` excludes only what the export refuses: a new check fails the nightly -when an exclude names an item that now exports, so the list shrinks as the exporter grows -and `just ffi moq` builds everything that maps. - -## Plan - -Found by the 2026-11-12 audit, comparing the file against the 2026-11-11 nightly census's -"config that exports what maps" -([run 43038758163](https://github.com/kixel-ai/rust2/actions/runs/43038758163)): 28 of the -100 excludes name items that export, such as `Path::from_static`, the -`Timestamp::as_*` conversions, `mux::Source`'s methods, and `varint::encode_quic`, so -`just ffi moq` never builds what -[#675](https://github.com/kixel-ai/rust2/pull/675) and -[#678](https://github.com/kixel-ai/rust2/pull/678) made exportable. At moq's `main`, 11 -more name nothing exported ([the pin bump](/quest/m1/ffi-refusals/moq-pin.md)). Measure -both again first. - -- Drop every exclude the census does not need. -- Nothing enforces this today. The exporter rejects only an exclude that names nothing - exported (`ffi/src/driver.rs`), and `nightly.yml` runs the census, summarizes it, and - uploads it without comparing. Add the comparison: the census already prints the config - that exports what maps, and the nightly's moq job fails when `ffi/moq/ffi.toml` differs - from it. -- The file goes with [the epic](/quest/m1/ffi-refusals/README.md); until then it is - exact. - -Public API: none.