You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
t27b: the first self-built module -- a plan spec compiled by t27b, linked into t27b instead of gen-rust #8949
Step 3c of the matryoshka (see #8920). Choose one pure plan module (for example cmp_op or literal_plan). Instead of mounting gen/rust/tri/t27b/<plan>.rs from t27c gen-rust, compile specs/tri/t27b/<plan>.t27 with t27b into an ELF object on the lab and link it into the t27b binary through the bridge (step 3b).
Acceptance:
t27b built that way passes cargo test.
The lab's signed receipt compare against the previous master is EQUIVALENT.
No Rust stands between that spec and the AArch64 that t27b runs.
User Scenarios
Given a t27b build that currently uses a Rust-generated plan module (e.g., cmp_op) from gen/rust/tri/t27b/cmp_op.rs, When the build is changed to compile specs/tri/t27b/cmp_op.t27 with t27b into an ELF object and link it via the bridge, Then t27b builds and passes cargo test with no Rust code between the spec and the AArch64 execution.
Requirements
FR-001: The plan spec specs/tri/t27b/cmp_op.t27 MUST be compiled by t27b into an ELF object file on the lab.
FR-002: The ELF object MUST be linked into the t27b binary through the bridge (step 3b) replacing the Rust-generated module.
FR-003: The t27b binary built this way MUST pass cargo test (exit 0).
FR-004: The lab's signed receipt for the new build MUST compare as EQUIVALENT to the previous master receipt.
Success Criteria
cargo test -p t27b exits with exit 0.
The lab receipt comparison command outputs EQUIVALENT.
The file specs/tri/t27b/cmp_op.t27 exists and is a valid t27 spec.
The file gen/rust/tri/t27b/cmp_op.rs is no longer used in the t27b build (removed or excluded).
The bridge linking step in scripts/tri_loop/t27b.py includes the new ELF object.
Design decision (owner delegated the choice on 2026-10-11, "do what is best for us"): link self-built modules through bootstrap stages, with no build.rs and no own-language exception.
stage1 = t27b as built today: plans mounted from gen-rust (the seed).
stage2 = t27b built again. For the switched module, an extern "C" block with #[link(name = ..., kind = "static")] replaces the #[path] mount. The link search path comes from the stage driver as RUSTFLAGS=-L native=<dir>, so there is no .cargo/config.toml and no build.rs.
The stage driver itself is decided in .t27 (stage order, inputs, artifact names) and wired as a t27c/tri subcommand that is net <= 0 hand lines.
The seed stays as the fallback wherever the stage archive is absent, for example a plain cargo build, so contributors' builds keep working.
Proof for 3c:
stage2 passes cargo test;
the corpus receipt for stage2 against stage1 is EQUIVALENT;
for the switched module, the gen-rust path and the t27b-built path give identical results on the plan's own tests.
This stage structure is the same one #8950 needs for the fixed point (stage2 == stage3). Prerequisites from the #8983 report:
export only pub fns, or make spliced plan fns local symbols;
CALL26 or a stub for calls leaving the module;
the str module-var gap.
Scheduled after the weekly budget reset (2026-10-17).
Activity
PHI LOOP: open the active cell on epic #8951, t27b builds itself (Closes
gHashTag commentedon Oct 11, 2026
Design decision (owner delegated the choice on 2026-10-11, "do what is best for us"): link self-built modules through bootstrap stages, with no build.rs and no own-language exception.
specs/tri/t27b/*_plan.t27, starting with one pure plan such as cmp_op) into ELF objects viat27b build --elf(t27b: ELF64 relocatable objects for aarch64 Linux, written in t27 -- specs/tri/t27b/elf.t27 (Closes #8947) #8955), with the C ABI from t27b: a C-ABI bridge -- Rust calls t27b-built fns through extern "C" under AAPCS64 (Closes #8948) #8983, and archives them (ar).extern "C"block with#[link(name = ..., kind = "static")]replaces the#[path]mount. The link search path comes from the stage driver asRUSTFLAGS=-L native=<dir>, so there is no .cargo/config.toml and no build.rs.cargo build, so contributors' builds keep working.Proof for 3c:
This stage structure is the same one #8950 needs for the fixed point (stage2 == stage3). Prerequisites from the #8983 report:
pubfns, or make spliced plan fns local symbols;Scheduled after the weekly budget reset (2026-10-17).