diff --git a/quest/README.md b/quest/README.md index 01d837c1c..98b764ae1 100644 --- a/quest/README.md +++ b/quest/README.md @@ -33,4 +33,4 @@ Decided with the maintainer on 2026-10-23, when rust2 was planned from moq - [m1: consumers waiting](/quest/m1/README.md) - the exporter that replaces the UniFFI fork for moq - [m2: research](/quest/m2/README.md) - the TypeScript translator's spikes and features toward moq-net's model, and the fork's gated work - [m3: deferred](/quest/m3/README.md) - the pure-Rust profile and upstream's build-speed levers, measured by the benchmark -- [m4: long-term research](/quest/m4/README.md) - ideas no consumer needs yet, such as a subset compiler +- [m4: long-term research](/quest/m4/README.md) - ideas no consumer needs yet, such as a rustc and cargo fork diff --git a/quest/m4/README.md b/quest/m4/README.md index 6ee8d66f3..a36d84b77 100644 --- a/quest/m4/README.md +++ b/quest/m4/README.md @@ -18,8 +18,15 @@ only 7% of moq-net edits [moq-dev/rust2#70](https://github.com/moq-dev/rust2/pull/70)). [The fork](/quest/m4/fork.md) collects the reasons to change rustc and cargo instead. +Closed on 2026-11-06: a compiler for a stricter Rust subset +([moq-dev/rust2#615](https://github.com/moq-dev/rust2/pull/615)). 61% of the +LLVM IR moq's own crates emit is std's and dependencies' generics instantiated +at moq's types, closures included, so it would have to compile std too. Levers +that need no new frontend reach its best case: ra-jit already applies the +moq-net body edits it serves in under half a second, and Cranelift cuts a clean +build's retired instructions by 16%. + ## Required -- [A subset compiler](/quest/m4/subset-compiler.md) - whether a compiler for a stricter Rust subset can beat rustc on moq's builds, given the verdict that closed it before - [Waiting: a rustc and cargo fork](/quest/m4/fork.md) - the evidence ledger for carrying a fork; condition: enough measured reasons to pay for one - [moq in pure Go](/quest/m4/go/README.md) - rust2-go translating moq-net, with no cgo, fast enough to replace the cgo bindings for Go users diff --git a/quest/m4/subset-compiler.md b/quest/m4/subset-compiler.md deleted file mode 100644 index c62a23300..000000000 --- a/quest/m4/subset-compiler.md +++ /dev/null @@ -1,40 +0,0 @@ -# [XL] A subset compiler - -## Goal - -A report deciding whether a compiler for a stricter subset of Rust could build moq -faster than rustc can after moq adopts its own build rules. The subset is -poll-first code with no `async fn` in libraries, thin generics, and few proc -macros. The report names the subset, the speedup it predicts on moq's -clean build and moq-net edit, and how its output links with crates rustc builds. - -## Plan - -Decided with the maintainer on 2026-10-25: allow a custom compiler as long-term -research, after moq's -[poll-first](https://github.com/moq-dev/moq/blob/main/quest/m1/poll-first/README.md) -and thin-generics work. - -The [edit attribution](https://github.com/moq-dev/rust2/pull/22) closed the -earlier version. What a revival has to answer: - -- **Most of the edit is rebuilding dependents:** 65% of the moq-net edit's - critical path is crates rebuilt only because it changed. A public API hash - could skip them ([relink](/quest/m3/relink.md)), but the - [semantic API hash replay](https://github.com/moq-dev/rust2/pull/62) found - that a sound one holds on 18 of 250 non-test moq-net edits. -- **What is left scales with the crate:** expansion, resolution, crate-wide - analysis, and incremental I/O. A subset compiler would have to make these - incremental per item, as Zig's compiler does, to win. -- **Linking:** it can't read or write rustc's unstable metadata, so it must own - whole crates, with a C ABI or rustc-built shims at the boundary. -- **Few proc macros buys little on edits:** the - [macro cost report](https://github.com/moq-dev/rust2/pull/64) found that - running proc macros is about 5% of the moq-net edit, which - `-Z cache-proc-macros` already removes, and compiling them is a clean-build - cost. The largest share of macro output is tracing's `macro_rules!`, - re-expanded in full on every rebuild. -- **Evidence to collect first:** - - the [monomorphization budget](https://github.com/moq-dev/rust2/pull/65) numbers. - -Public API: none.