Component: scripts/feature-matrix. No product code changes.
`crates/reims-vgpu-efi` is live — `vm/boot-x86.sh` rebuilds it before every x86
boot, and OVMF loads the result as the PCI expansion ROM — but it is a separate
workspace targeting `x86_64-unknown-uefi`, so no command in AGENTS.md and no
cell of the feature matrix ever compiled it. That is the same gap that let the
Metal arm accumulate 11 errors while every run read green: a shipping crate
nothing checks.
The matrix gains a fourth cell. It is not a backend arm and the script says so;
it is the artifact half of the x86 pathway.
Two mechanical facts made this more than one line:
- `--all-targets` cannot be used on this package. Its bin is `#![no_main]` with
the `uefi` crate's panic handler, so building a libtest harness for it
collides with `std`'s `#[panic_handler]` (E0152) — on the UEFI target and on
the host alike. The cell checks lib + bin without it, and the count cell
enumerates `--lib` only and prints "(bin is UEFI-only)" rather than a number
that would look like a drop.
- `run_cell` and `count_cell` assumed one workspace and `-p reims-vgpu`. Both
now take the directory, the package selector and the target scope as trailing
optionals, defaulted to what the three backend arms already passed. The
defaults use `${n-…}` rather than `${n:-…}` so a cell can pass an explicitly
empty selector — with the colon form, "no `-p`" silently became
"`-p reims-vgpu`" and the cell failed with "did not match any packages".
The cell was proved able to fail: a type error appended to
`crates/reims-vgpu-efi/src/lib.rs` produces `FAIL option-rom /
x86_64-unknown-uefi` with the rustc line and a non-zero exit, and the run goes
back to PASS when reverted. A host without the target installed gets SKIP with
the `rustup target add` line, matching how the Metal arm reports the same
condition.
It also reports 7 host-runnable lib tests (`paint`, the real Blt paths), which
were previously enumerated by nothing.
Verified: `bash -n`; a full `scripts/feature-matrix/feature-matrix.sh` run —
PASS on all four cells, warnings=0, lib=1381 unchanged for the Vulkan arm.
shellcheck is not installed on this host and was not run.
Not verified: no boot. The cell checks; it does not link a real ROM, and
`crates/reims-vgpu-efi/scripts/reims-vgpu-efi-rom/reims-vgpu-efi-rom.sh`
remains the only thing that produces the artifact.
Found while adding it, not fixed here: the package is not clippy-clean —
8 lints on the UEFI target, four of them `too_many_arguments` (11, 10, 10 and 8
parameters), plus three `enum_clike_unportable_variant` and one
`manual_is_multiple_of`. Adding a clippy arm now would land a standing red, so
that is its own change.
Co-Authored-By: Claude <noreply@anthropic.com>
feature-matrix.sh
Compile every supported reims-vgpu arm and fail if any of them does not build.
Why
The project supports three arms, one per host GPU API actually available:
| Arm | feature set | host |
|---|---|---|
| Metal | --features backend-metal |
macOS only |
| Vulkan / MoltenVK | --no-default-features --features backend-vulkan,host-window |
macOS |
| Vulkan / native | same | Linux |
vendor/qemu/hw/display/meson.build picks the feature set from REIMS_VGPU_BACKEND, and
day-to-day work compiles exactly one arm. The crate spells
all(feature = "backend-metal", target_os = "macos") well over a hundred
times, so a rename or a cfg change can break an arm nobody builds and stay
broken indefinitely — which is what happened to the default build. Running this
script is part of "done" for any change that touches cfg-gated code.
There is deliberately no fourth arm. backend-metal off macOS has no Metal
to call, so it is a compile_error! in src/lib.rs rather than a host stub that
links and cannot draw.
Run
scripts/feature-matrix/feature-matrix.sh # check + per-arm test counts
scripts/feature-matrix/feature-matrix.sh --no-counts # compile gate only (faster)
scripts/feature-matrix/feature-matrix.sh --build # cargo build (link-level)
Output is one line per arm, then the test census:
[feature-matrix] PASS metal / aarch64-apple-darwin warnings=108
[feature-matrix] PASS vulkan,host-window / aarch64-apple-darwin warnings=0
[feature-matrix] PASS vulkan,host-window / x86_64-unknown-linux-gnu warnings=0
[feature-matrix] tests enumerated per arm:
[feature-matrix] metal / aarch64-apple-darwin lib=672 all_targets=685
[feature-matrix] vulkan,host-window / aarch64… lib=920 all_targets=992
[feature-matrix] vulkan,host-window / x86_64… (cross-compiled — cannot run here)
Which arms a host can build depends on the host. An Apple host builds all three
(the Linux one by cross check). A Linux host builds only the native Vulkan arm:
Metal is Apple-only and cannot be cross-checked to a host that has no Metal, so
it is reported n/a rather than skipped silently.
Notes
- Warnings do not fail an arm. The count is printed on every run so a jump
stays visible. cargo replays nothing for an up-to-date unit, so an arm that was
already built reports
warnings=cachedrather than a false0. - The cross target defaults to
x86_64-unknown-linux-gnu. Override withCROSS_TARGET=.... The script fails with therustup target addcommand when the target is missing rather than silently skipping the arm. - This is a compile gate only. It says nothing about runtime behavior on any arm; a Vulkan change still needs a live boot on the host that owns the pathway.
- It checks
--all-targets, so the test modules are covered too. A barecargo checkcan leave arm-specific test code uncompiled while product code still compiles green. - Compiling is not testing, which is why the counts are printed. A test that
compiles on an arm but is
cfg'd out still tests nothing, so acfgchange can empty an arm while every arm stays green. Watch for a dropped count. The gap between the arms (248 lib tests) is the genuinely Vulkan-only surface, not drift. - Counting links the test binaries, which is slower than checking; use
--no-countswhen you only need the compile gate. The cross-compiled arm cannot be counted because its binaries do not run on this host.