Skip to content

Build: pin Rust toolchain to 1.96.0 and enforce Cargo.lock (FIx #2214) - #2295

Open
WASDeKeys wants to merge 27 commits into
xcl-dev:mainfrom
WASDeKeys:pin-rust-toolchain
Open

WASDeKeys wants to merge 27 commits into
xcl-dev:mainfrom
WASDeKeys:pin-rust-toolchain

Conversation

@WASDeKeys

@WASDeKeys WASDeKeys commented Nov 25, 2026 •

Copy link
Copy Markdown

Fixes #2214 — https://github.com/xcl-de
v/xcl/issues/2214

What is in it

  • Pin Rust toolchain to 1.96.0 and
    enforce Cargo.lock in CI and
    scripts/test.ps1 — Cargo.toml,
    Cargo.lock, rust-toolchain.toml

Tested

  • hardware (GPU + driver, CPU), Windows
    11 Home Single Language 10.0.26200,
    NVIDIA GeForce RTX 3050 6GB Laptop GPU,
    Rust 1.96.0, release
  • cargo test --workspace -- --test-threads=4: 1098 passed, 0
    failed, 26 ignored, 24 skipped
  • SKIPPED GPU tests on your adapter:
    24 (no wave64, etc.)
  • game checked: 21222967 — smoke tests
    ran on both branches with 60 seconds
    each

Regression run

  • main:
xcl-smoke v1
commit: 082944135cd2b96288470a595861fa608eee08dc
gpu: NVIDIA GeForce RTX 3050 6GB Laptop GPU
title: 2b8d9c34
seconds: 60
exit: 0x0
frames shown: 3500 (PresentX 3500)
presents per 2 s (last 3): 120 118 119
device removals: 0
crashes: 0
peak commit: 2573 MB
  • PR head (pin-rust-toolchain):
xcl-smoke v1
commit: 8bd87ea4f126ab3ec13635aef78351da2496df7f
gpu: NVIDIA GeForce RTX 3050 6GB Laptop GPU
title: 2b8d9c34
seconds: 60
exit: 0x0
frames shown: 3507 (PresentX 3507)
presents per 2 s (last 3): 120 120 120
device removals: 0
crashes: 0
peak commit: 2572 MB

Not tested

  • AMD GPUs, NVIDIA desktop GPUs,
    wave32-only GPUs

AI use

  • Claude Code with Claude Sonnet 5.5,
    helped write the PR description, ran
    tests and reviewed the diff.

WASDeKeys and others added 21 commits November 24, 2026 16:01
Under `--test-threads=4`, the full test suite exhausted VRAM (0x8007000E) on
a 6 GB GPU when `d32s8_targets_take_their_own_size_of_video_memory` placed
14 4K D32S8 targets (~935 MB) concurrently with other GPU tests. The
mutex poison from that failure then cascaded into title_textures tests.
All tests pass at `--test-threads=1` and `--test-threads=2`.

Check the adapter's dedicated video memory and call `skip_test("< 8 GB VRAM")`
when under 8 GiB so the suite completes cleanly on 6 GB and smaller adapters.

Fixes xcl-dev#42
Assisted by : Antigravity IDE (Claude Sonnet 4.6)
…-dev#42)

Move the `< 8 GB VRAM` skip check before acquiring `VRAM_TEST_LOCK`.
On GPUs under 8 GiB, the test now skips immediately without contending for
or risking poisoning from `VRAM_TEST_LOCK`.

Fixes xcl-dev#42
Assisted by : Antigravity IDE (Claude Sonnet 4.6)
…s/test.ps1\n\nFixes xcl-dev#2214\n\nCo-Authored-By: Claude Code <noreply@anthropic.com>\nAssisted-by: OpenAI Codex (GPT-6)
…cl-dev#2214\n\nCo-Authored-By: Claude Code <noreply@anthropic.com>
…sion

crates/xcl, tests/testtitle and tests/testgamedll each picked up a
rust-rust-version.workspace line (not a real Cargo key) and lost
version.workspace = true, so the packages drifted to 0.0.0 in Cargo.lock
and --locked builds no longer agree with the manifests. Restore
version.workspace = true and drop the bogus key; Cargo.lock is back to
0.1.0 across all three packages.

Also fold out the unrelated d32s8 VRAM test change from vram.rs: it has
nothing to do with pinning the toolchain and belongs in its own change.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@WASDeKeys WASDeKeys changed the title Build: pin Rust toolchain to 1.96.0 and enforce Cargo.lock (#2214) Build: pin Rust toolchain to 1.96.0 and enforce Cargo.lock (FIx #2214) Nov 25, 2026
@fromthemoonx

Copy link
Copy Markdown

Two points on f5d6d40, from reading the diff and checking with Cargo:

  1. rust-version has no effect yet. It is set in [workspace.package], but none of the three members inherits it: crates/xcl/Cargo.toml, tests/testtitle/Cargo.toml and tests/testgamedll/Cargo.toml have version.workspace / edition.workspace / license.workspace and no rust-version.workspace = true. cargo +stable metadata --no-deps --format-version 1 on this head gives rust_version: null for xcl, xcl-testtitle and testgame-mw, so an older compiler still fails with a compiler error instead of Cargo's "requires rustc 1.96.0". The plan in Build: pin the Rust toolchain and enforce Cargo.lock in CI and scripts/test.ps1 #2214 had the inheritance lines.
  2. The counts under Tested do not look like this tree. On this PR's base 1a0bbe3 with D3D12.X: clamp PcCalls across frame boundaries and drop orphaned PSO jobs immediately #2296 on top (which adds 2 tests), cargo test --workspace --no-fail-fast -- --test-threads=4 here gives 1252 passed, 0 failed, 46 ignored (RTX 3060, also 32-lane, 24 SKIPPED lines). The description's 1098 passed / 26 ignored is about 150 tests short of that, and its smoke block names 500578c, not the head. A rerun of scripts/test.ps1 at the head (it now passes --locked) would also show that the pinned 1.96.0 builds the whole workspace.

I did not build with 1.96.0 here (it isn't installed on this machine).

AI use: Claude Code (Claude Opus 5.5) checked the diff and ran the cargo metadata check.

@WASDeKeys

Copy link
Copy Markdown
Author

Two points on f5d6d40, from reading the diff and checking with Cargo:

  1. rust-version has no effect yet. It is set in [workspace.package], but none of the three members inherits it: crates/xcl/Cargo.toml, tests/testtitle/Cargo.toml and tests/testgamedll/Cargo.toml have version.workspace / edition.workspace / license.workspace and no rust-version.workspace = true. cargo +stable metadata --no-deps --format-version 1 on this head gives rust_version: null for xcl, xcl-testtitle and testgame-mw, so an older compiler still fails with a compiler error instead of Cargo's "requires rustc 1.96.0". The plan in Build: pin the Rust toolchain and enforce Cargo.lock in CI and scripts/test.ps1 #2214 had the inheritance lines.
  2. The counts under Tested do not look like this tree. On this PR's base 1a0bbe3 with D3D12.X: clamp PcCalls across frame boundaries and drop orphaned PSO jobs immediately #2296 on top (which adds 2 tests), cargo test --workspace --no-fail-fast -- --test-threads=4 here gives 1252 passed, 0 failed, 46 ignored (RTX 3060, also 32-lane, 24 SKIPPED lines). The description's 1098 passed / 26 ignored is about 150 tests short of that, and its smoke block names 500578c, not the head. A rerun of scripts/test.ps1 at the head (it now passes --locked) would also show that the pinned 1.96.0 builds the whole workspace.

I did not build with 1.96.0 here (it isn't installed on this machine).

AI use: Claude Code (Claude Opus 5.5) checked the diff and ran the cargo metadata check.

Looking into this @fromthemoonx

@nnonno91

nnonno91 commented Nov 25, 2026 •

Copy link
Copy Markdown

@WASDeKeys I retested the updated head 8bd87ea4f126ab3ec13635aef78351da2496df7f after the merge from main. The toolchain, manifests, and build scripts are unchanged from the revision below. I reran the checks on the same Windows/Radeon setup.

  • Without a RUSTUP_TOOLCHAIN override, cargo -V and rustc -V both reported 1.96.0. rustup show active-toolchain identified the checkout's rust-toolchain.toml, and cargo metadata --locked --no-deps --format-version 1 again reported 1.96.0 for all three members.
  • cargo build --locked --workspace succeeded.
  • cargo test --locked -p xcl --test e2e test_title_draws_with_a_root_signature_under_the_debug_layer -- --exact --nocapture --test-threads=1 with XCL_ADAPTER=AMD Radeon and XCL_NETWORK=0: 1 passed, 0 failed, 0 ignored, no logged skips. This was the bundled project test title.

The CI, retail-title and full-suite limits below also apply to this retest.


Independent Windows MSVC check of the updated head 921e05be9032cc00214a4393825b761a3b14f3b4.

Tested

  • Windows 11 25H2 build 26200.9974, Ryzen 7 9800X3D, AMD Radeon(TM) Graphics driver 32.0.21042.62, SDK DXC/DXIL 1.8.2502.11, unoptimized profile.
  • From the clean detached checkout, without a RUSTUP_TOOLCHAIN override, cargo -V selected Cargo 1.96.0 and auto-installed the pinned toolchain in the isolated Rustup directory. rustc -V reported 1.96.0. rustup show active-toolchain identified this checkout's rust-toolchain.toml as the source.
  • cargo metadata --locked --no-deps --format-version 1 reported rust_version = 1.96.0 for all three members: xcl, xcl-testtitle and testgame-mw. cargo build --locked --workspace succeeded.
  • cargo test --locked -p xcl --test e2e test_title_draws_with_a_root_signature_under_the_debug_layer -- --exact --nocapture --test-threads=1 with XCL_ADAPTER=AMD Radeon and XCL_NETWORK=0 gave 1 passed, 0 failed, 0 ignored and no skips. The bundled title completed under the debug layer.

Not tested

CI jobs, non-MSVC targets, a retail title or the full workspace suite.

AI use

OpenAI Codex (GPT-6.2 Sol) ran the checks and wrote this report.

@throny throny added the off-goal Does not bear on the current goal (world loading); waits until it is reached label Nov 25, 2026
@RavenCurseBurg

RavenCurseBurg commented Nov 25, 2026 •

Copy link
Copy Markdown

Retested after the main merge at 8bd87ea4f126ab3ec13635aef78351da2496df7f. The test runner, toolchain file, root manifest, and three member manifests were byte-identical to 921e05b in Git. The three fixture runs below passed again in both PowerShell versions. Parsing the TOML confirmed the toolchain and workspace specify 1.96.0 and all three members inherit the workspace setting. This retest used fixture Cargo and Python’s TOML reader. The separate contributor report covers real Cargo metadata.

Verified the PowerShell runner at 921e05be9032cc00214a4393825b761a3b14f3b4 with a fixture cargo.cmd recording each argument list. Running scripts/test.ps1 --skip omitted in Windows PowerShell 5.1.26100.9711 and PowerShell 7.6.9 issued build --locked --workspace and test --locked --workspace -- --test-threads=4 --skip omitted. A successful run exited 0, build exit 7 stopped before the test call, and test exit 101 propagated. All three cases matched in both shells.

There is a test-only interaction with #2304 (320d27f26045). I put the two locked Cargo command lines into a private copy of that runner and ran its scripts/test-totals.tests.ps1. The existing assertion failed in both shells because it expected --workspace immediately after test. The arguments following the -- separator were correct.

One-line fixture fix based on #2304. All six runner cases passed with both original and combined command lines in both shells (24 case executions). Removing forwarding of the test arguments in a private copy still caused the assertion to fail in both shells.

Windows 11 26100.9711, i7-13700, RTX 4060. Fixture Cargo only. Rustup, actual lockfile resolution, CI and the Rust/GPU suite were outside this check. OpenAI Codex (GPT-6) ran the argument and integration checks, prepared the test patch and wrote this report.

@WASDeKeys

Copy link
Copy Markdown
Author

@RavenCurseBurg @fromthemoonx @nnonno91
I am making some changes.

  • rust-version = "1.96.0" added to the workspace
    [workspace.package] in Cargo.toml
  • rust-version.workspace = true added to all three
    members (crates/xcl, tests/testtitle,
    tests/testgamedll)
  • rust-toolchain.toml created pinning 1.96.0 so the
    checkout's toolchain is the source (no
    RUSTUP_TOOLCHAIN override needed)
  • cargo metadata now reports rust_version = 1.96.0 for
    all three members (was null)
  • cargo test --workspace -- --test-threads=4: all green,
    0 failures

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

off-goal Does not bear on the current goal (world loading); waits until it is reached

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build: pin the Rust toolchain and enforce Cargo.lock in CI and scripts/test.ps1

5 participants