Files
reims-vgpu/scripts
Anees Iqbal 1bf7f90ce5 contract: the protocol vocabulary cannot name a backend, and now the compiler says so
Component: crates/reims-vgpu (contract, runtime/compute_exec) plus the new
crates/reims-vgpu-contract. Pathway: all three. Structural; no guest-visible
behavior and no rail-specific term.

Contract: the catalogue's F0 item asks for a backend-neutral semantic vocabulary
— decoded enums, descriptors, geometry, pixel formats, pass actions, page
arithmetic, exact refusal values — with Vulkan handles, SPIR-V, memory
placement, descriptors, queue families, image layouts and host capability policy
kept out of it. `contract/`'s own doc already said "pure data and pure functions
only — no guest state, no GPU, no QEMU", and every module in one crate could
reach every other, so the rule held only while someone was reading.

Owner: the crate graph. Behaviour changed: none at runtime. `src/contract/`
becomes `reims-vgpu-contract`, depending on the wire views, the paging walk, and
the decline vocabulary — nothing else is in scope, so a contract check cannot
name an `ash` type, a Metal object, a QEMU type or this device's state by
accident. It is re-exported as `crate::contract`, so no call site moves.

The move produced one thing the doc could not. `Extent3` is shared between this
decoder and the backend it dispatches through, and `compute_exec` carried an
inherent `impl Extent3` whose two constructors refuse with `ComputeStatus` and
read a decoded `Size3` — device vocabulary the contract crate cannot name. The
orphan rule rejected it. They are now `extent_from_wire` and
`extent_from_indirect` free functions in the decoder that owns those types, with
the same arithmetic and the same refusals; the extent type stays shared and only
the narrowing that produces it from this device's wire moved.

`iosurface_pages`' fixtures took the arm64e page size from `model`, which
re-exports the shift from `contract::gva` and widens it locally for its own
address arithmetic. The test now derives the same `u64` from the same shift on
this side of the boundary, so the two still cannot disagree in value.

Test: no new behaviour, so no new regression test; the counts are the claim.
2274 tests in `reims-vgpu` before, 2165 plus 109 in `reims-vgpu-contract` after
— the same 2274, none dropped or silently cfg'd out. The feature matrix's
support-crates cell counts the new crate too.

Verified: `cargo test -p reims-vgpu --no-default-features
--features backend-vulkan,host-window -- --test-threads=1` (2165 + 97, 0
failed); `cargo test -p reims-vgpu-contract -p reims-vgpu-env -p
reims-vgpu-observe -p reims-vgpu-paging -- --test-threads=1` (109 + 13 + 45 +
36, 0 failed); all three main clippy arms plus `-p reims-vgpu-contract`, all
with `-D warnings`; `scripts/feature-matrix/feature-matrix.sh` all cells PASS;
`cargo fmt --all` and `--check`; the rustdoc link pass, whose unresolved-link
multiset is byte-identical to the parent's; a release staticlib build carrying
no test log path.

Not verified: no VM boot and no conformance battery were run.
`reims-vgpu-wire`'s twelve oracle-fixture failures remain inherited debt,
unchanged and untouched.
2026-08-31 14:42:41 +03:00
..
2026-08-30 23:38:42 +03:00
2026-08-30 23:38:42 +03:00
2026-08-30 23:38:42 +03:00