launcher: name a missing Rust or C++ build tools before the first build (LAUNCHER-RUST-PREREQ) #3187

Open
MoonEyes wants to merge 1 commit from upstream-pr/3187 into main
MoonEyes commented 2026-12-02 17:24:55 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T17:24:55Z.


Claimed in the coordination issue as: LAUNCHER-RUST-PREREQ (released by @tiguan26 on 30 Nov)

Fixes: #3025
Fixes: #3131
Fixes: #3117

What and why

A first start through Launcher.bat builds leonida.exe with d3d12\scripts\build-nvidia.ps1. Without Rust the window showed only PowerShell's localized CommandNotFoundException for cargo; without the Visual Studio C++ build tools cargo stopped at its first link.

build-nvidia.ps1 now, before building:

  • looks for cargo, also in CARGO_HOME\bin (a Rust installed after the window opened), else says Rust is missing (rustup.rs, winget install Rustlang.Rustup) and exits 1;
  • on Windows, asks vswhere (-latest -prerelease -products *, the same lookup as scripts/build_llvm_mc.ps1) for the x64 C++ tools, VCINSTALLDIR from a Developer prompt counting too, else names the Build Tools winget command and exits 1.

scripts/play-d3d12.ps1's message after a failed build now points at the lines above it.

Tested

  • tests/test_build_nvidia_cargo.py: missing Rust, cargo only in CARGO_HOME\bin, missing C++ tools (Windows), C++ tools found by a stand-in vswhere (Windows). All four fail on main (checked on Windows: the fourth fails too, because main has no CARGO_HOMEin lookup) and pass with this change.
  • python -I scripts/check_no_game_data.py on the changed files, tests/test_text_write_line_endings.py, test_docs_*.py: OK.

GPUs tested: n/a (build script only)

AI-assisted: yes. Author: Claude Opus (Claude Code). Reviewer: a separate read-only Claude Opus reviewer agent (twice, findings applied).

finding: d3d12/scripts/play-nvidia.ps1:138 has its own $noCargo check without the CARGO_HOME\bin lookup; one shared helper would remove the duplicate. No game files or specific hardware needed.

Checklist

  • Based on current main and merges cleanly.
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption, including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md (n/a)

Generated by Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5611523444 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3187). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T17:24:55Z. --- Claimed in the coordination issue as: LAUNCHER-RUST-PREREQ (released by @tiguan26 on 30 Nov) Fixes: #3025 Fixes: #3131 Fixes: #3117 ### What and why A first start through `Launcher.bat` builds `leonida.exe` with `d3d12\scripts\build-nvidia.ps1`. Without Rust the window showed only PowerShell's localized `CommandNotFoundException` for `cargo`; without the Visual Studio C++ build tools cargo stopped at its first link. `build-nvidia.ps1` now, before building: - looks for cargo, also in `CARGO_HOME\bin` (a Rust installed after the window opened), else says Rust is missing (rustup.rs, `winget install Rustlang.Rustup`) and exits 1; - on Windows, asks vswhere (`-latest -prerelease -products *`, the same lookup as `scripts/build_llvm_mc.ps1`) for the x64 C++ tools, `VCINSTALLDIR` from a Developer prompt counting too, else names the Build Tools winget command and exits 1. `scripts/play-d3d12.ps1`'s message after a failed build now points at the lines above it. ### Tested - `tests/test_build_nvidia_cargo.py`: missing Rust, cargo only in `CARGO_HOME\bin`, missing C++ tools (Windows), C++ tools found by a stand-in vswhere (Windows). All four fail on `main` (checked on Windows: the fourth fails too, because `main` has no `CARGO_HOMEin` lookup) and pass with this change. - `python -I scripts/check_no_game_data.py` on the changed files, `tests/test_text_write_line_endings.py`, `test_docs_*.py`: OK. GPUs tested: n/a (build script only) AI-assisted: yes. Author: Claude Opus (Claude Code). Reviewer: a separate read-only Claude Opus reviewer agent (twice, findings applied). finding: `d3d12/scripts/play-nvidia.ps1:138` has its own `$noCargo` check without the `CARGO_HOME\bin` lookup; one shared helper would remove the duplicate. No game files or specific hardware needed. ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption, including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md` (n/a) --- _Generated by [Claude Code](https://claude.ai/code)_
fiestorra commented 2026-12-02 17:48:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-02T17:48:54Z.


Verified here: it applies and its own tests pass.

merge base 4910c5c2e, head 8af4eb442
git apply on main   (3 files)

python -I tests/test_build_nvidia_cargo.py    Ran 4 tests in 1.609s   OK
python -I tests/test_win_launchers.py         Ran 5 tests in 1.898s   OK

What it fixes is the kind of report that reads as a bug and is a missing tool: #3025 and #3131 both arrive as "it does not work", and the launcher's first build fails on a missing Rust or C++ toolchain in the window, before anything explains it. A line that names what is missing, before the build starts, is the whole of the value here - and it is tested against the message, which is the part that would otherwise rot silently.

What I could not test: the path where the tool really is missing. This machine has both toolchains, so the test's synthetic case is as far as I can go - and that is the honest limit: I verified that the launcher says the right thing, not that it says it on a machine that needs it.

And the checker would read this as red not constructible - tests/test_build_nvidia_cargo.py is a new file, so the red side has nothing to build from. That is not a fault in the pull request; it is the case the docs describe, and I am noting it so the next reader of the verdict does not chase it.

For the merge: BLOCKED, and it is two launcher scripts plus a test - the review is short, which after a night of 2,277-line pull requests is worth saying.

AI-assisted: yes - DeepSeek v4.1 (flash).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7353670147 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3187#issuecomment-7353670147). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-02T17:48:54Z. --- **Verified here: it applies and its own tests pass.** ``` merge base 4910c5c2e, head 8af4eb442 git apply on main (3 files) python -I tests/test_build_nvidia_cargo.py Ran 4 tests in 1.609s OK python -I tests/test_win_launchers.py Ran 5 tests in 1.898s OK ``` **What it fixes is the kind of report that reads as a bug and is a missing tool**: #3025 and #3131 both arrive as "it does not work", and the launcher's first build fails on a missing Rust or C++ toolchain **in the window, before anything explains it**. **A line that names what is missing, before the build starts, is the whole of the value here** - **and it is tested against the message, which is the part that would otherwise rot silently.** **What I could not test**: **the path where the tool really is missing.** This machine has both toolchains, **so the test's synthetic case is as far as I can go** - **and that is the honest limit: I verified that the launcher says the right thing, not that it says it on a machine that needs it.** **And the checker would read this as `red not constructible`** - **`tests/test_build_nvidia_cargo.py` is a new file**, so the red side has nothing to build from. **That is not a fault in the pull request; it is the case the docs describe**, and I am noting it so the next reader of the verdict does not chase it. **For the merge**: `BLOCKED`, **and it is two launcher scripts plus a test** - **the review is short, which after a night of 2,277-line pull requests is worth saying.** **AI-assisted:** yes - DeepSeek v4.1 (flash).
fiestorra commented 2026-12-02 19:40:13 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-02T19:40:13Z.


VERIFY-3187 — Windows nativo, con Build Tools instaladas (el caso que el PR describe)

Head 8af4eb442
Merge base 4910c5c2e
Merged onto main b41763227 — git merge-tree --write-tree clean, git merge --no-ff clean (auto-merged play-d3d12.ps1, which #3172 changed since the base)

Ran (native Windows, Python 3.13)

python -I tests/test_build_nvidia_cargo.py     Ran 4 tests in 1.87s — OK

Negative control (d3d12/scripts/build-nvidia.ps1 reverted to main, the PR's test kept):

FAIL: test_build_tools_found_by_vswhere
FAIL: test_missing_build_tools_says_so
FAIL: test_cargo_home_bin_is_used_when_path_lacks_it      (3 of 4 fail)

The real check, on a machine that has only the Build Tools (vswhere.exe present, VCINSTALLDIR unset — this one):

& "$env:ProgramFiles(x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -products * \
  -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
  -> C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools

That is the flag combination this repository has already been bitten by: without -products * the same vswhere prints nothing on a Build-Tools-only machine, and the script would then tell a user with the tools installed to install them. The PR's line gets it right.

What I could not test

  • A machine with no Rust or no C++ tools at all: this one has both, so the two "missing, say so and exit 1" paths are exercised only through the PR's own tests (which fake the environment), not against a real bare box.
  • Launcher.bat end to end: not run; the change is inside build-nvidia.ps1.

Verdict: red then green, and the vswhere invocation the PR adds returns the right path on a Build-Tools-only install.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7356538056 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3187#issuecomment-7356538056). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-02T19:40:13Z. --- ## VERIFY-3187 — Windows nativo, con Build Tools instaladas (el caso que el PR describe) | | | |---|---| | Head | `8af4eb442` | | Merge base | `4910c5c2e` | | Merged onto | `main` `b41763227` — `git merge-tree --write-tree` clean, `git merge --no-ff` clean (auto-merged `play-d3d12.ps1`, which #3172 changed since the base) | **Ran (native Windows, Python 3.13)** ``` python -I tests/test_build_nvidia_cargo.py Ran 4 tests in 1.87s — OK ``` **Negative control** (`d3d12/scripts/build-nvidia.ps1` reverted to `main`, the PR's test kept): ``` FAIL: test_build_tools_found_by_vswhere FAIL: test_missing_build_tools_says_so FAIL: test_cargo_home_bin_is_used_when_path_lacks_it (3 of 4 fail) ``` **The real check, on a machine that has only the Build Tools** (`vswhere.exe` present, `VCINSTALLDIR` unset — this one): ``` & "$env:ProgramFiles(x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -products * \ -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath -> C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools ``` **That is the flag combination this repository has already been bitten by**: without `-products *` the same `vswhere` prints nothing on a Build-Tools-only machine, and the script would then tell a user with the tools installed to install them. The PR's line gets it right. ## What I could not test - **A machine with no Rust or no C++ tools at all**: this one has both, so the two "missing, say so and exit 1" paths are exercised only through the PR's own tests (which fake the environment), not against a real bare box. - **`Launcher.bat` end to end**: not run; the change is inside `build-nvidia.ps1`. Verdict: **red then green**, and the `vswhere` invocation the PR adds returns the right path on a Build-Tools-only install. Written with an AI assistant.
MoonEyes commented 2026-12-02 22:40:39 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T22:40:39Z.


RUN (independent check on Windows, #3187 head 8af4eb442b8f73c17b5224a72808d61895e5cf99 and #3220 head 0beb7d26d85be96f280c4baa6a66a351fea47a6a, both merged with git merge --no-ff into main 16243cd6eb16d70eefa31fd42213daf5a3583ea4)

Windows 11, Windows PowerShell 5.1, Python 3.14, run with python -I. No cargo build, no game data. Nothing was run against the real repo working tree (detached worktree only).

Green

  • #3187 merged alone into main: python -I tests/test_build_nvidia_cargo.py runs 4 tests, 4 OK (missing Rust, cargo only in CARGO_HOME\bin, missing C++ tools, C++ tools found by the stand-in vswhere).

Red

  • Same test file with main's d3d12/scripts/build-nvidia.ps1 put back: 4 of 4 fail (restored afterwards).
  • This differs from the body: it says the fourth test (vswhere found) is "a positive control that also passes on main". It does not. On Windows it fails on main too, because the fake cargo sits in CARGO_HOME\bin, which main never looks in. The tests are fine; the sentence is wrong (3 red + 1 control should read 4 red).

Together with #3220

  • Merging #3220 on top: no conflict (they touch different files; play-nvidia.ps1 and tests/test_win_launchers.py are not in #3187).
  • After both merges: test_build_nvidia_cargo.py 4/4 OK; tests/test_win_launchers.py 10/10 OK (run twice, once as a script, once through unittest discover).
  • Exit paths, run by hand on the merged tree:
    • play-nvidia.ps1 -Build diag with no cargo anywhere and no build: "No build and no cargo: install Rust (README.md)", exit 1. build-nvidia.ps1 is never reached, so #3187's check is not hidden, but its better message (rustup.rs, winget) is not shown on this path either.
    • cargo on PATH, C++ tools missing: build-nvidia.ps1 prints the Build Tools message and exits 1; play-nvidia.ps1 does not look at that exit code, goes on, prints "No ...leonida.exe. Build it first", exit 1. The player sees both lines, exit code is 1, and the real reason stays on screen. OK.
    • Through scripts/play-d3d12.ps1 (the launcher): it calls build-nvidia.ps1 itself when leonida.exe is missing and throws with the new "the lines above say why" text on exit 1. OK.
    • play-nvidia.ps1 failures now exit 1 instead of return (#3220), so Launcher.bat shows a failure code for those. OK.

Gaps

  1. Confirmed, real but narrow: play-nvidia.ps1:137 $noCargo = -not (Get-Command cargo ...) has no CARGO_HOME\bin lookup. I ran the merged play-nvidia.ps1 directly with cargo only in a fake CARGO_HOME\bin and no build: it prints "No build and no cargo" and exits 1, although build-nvidia.ps1 would have found that cargo. A player with Rust only under CARGO_HOME (installed after the window opened, or a custom CARGO_HOME) who runs play-nvidia.ps1 by hand (docs/windows-memory.md does) is refused.
    • Through play-d3d12.ps1 the gap mostly does not show: build-nvidia.ps1 runs first when the exe is missing and prepends CARGO_HOME\bin to the process PATH, which play-nvidia.ps1 then inherits.
    • It does show on the stale-DLSS branch (lines 138-140) when an exe exists, the DLSS SDK was added later and build-nvidia.ps1 has not run in that process: it says "no cargo" and silently keeps the non-DLSS build.
    • The PR body already lists this as a finding:. A shared helper or the same 4 lines in play-nvidia.ps1 fixes it; I would not block #3187 on it, but #3187 should not be read as "cargo only under CARGO_HOME works everywhere".
  2. play-nvidia.ps1:148 ignores the exit code of build-nvidia.ps1. With an existing stale exe, a failed rebuild (new exit 1) is followed by running the old build. Pre-existing, not worse after the PRs.
  3. #3187 claims Fixes: #3025 and Fixes: #3131. Both outputs are the same CommandNotFoundException for cargo from play-d3d12.ps1 (the Russian-locale text is in #3131). Covered when cargo is absent or only under the default or custom CARGO_HOME. #3117 (English text, same exception, same launcher, same "Building with DLSS" line) is covered the same way and is not claimed: add Fixes: #3117. Caveat for all three: if the reporter has Rust installed somewhere else not on PATH, they now get "Rust is not installed" with a misleading hint; nothing in the logs shows that case.
  4. Body accuracy otherwise matches the diff (cargo lookup, vswhere with -latest -prerelease -products *, VCINSTALLDIR, message change in play-d3d12.ps1). Only the "fourth test passes on main" sentence is wrong. I did not check the claimed release of the item by @tiguan26.
  5. #3220's new test covers no_cargo with PATH = '', so it passes with or without #3187; no test covers play-nvidia with cargo only in CARGO_HOME\bin.

Verdict

#3187: OK to merge on green CI; the code does what it says and the tests fail on main and pass on the branch. Fix the body (4 red, not 3 + a control; add Fixes: #3117). #3220: OK. Merged together: no conflict, no check hides another, the player gets exit 1 with a readable message in every case I tried. Open follow-up: the play-nvidia.ps1 CARGO_HOME\bin gap (finding 1).

AI-assisted (Claude Code), models: Claude Opus 5.5 (checker), separate Claude Opus 5.5 judge. Note: #3187 is by MoonEyes, so this is not a third-party check.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7361013452 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3187#issuecomment-7361013452). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T22:40:39Z. --- RUN (independent check on Windows, #3187 head `8af4eb442b8f73c17b5224a72808d61895e5cf99` and #3220 head `0beb7d26d85be96f280c4baa6a66a351fea47a6a`, both merged with `git merge --no-ff` into `main` `16243cd6eb16d70eefa31fd42213daf5a3583ea4`) Windows 11, Windows PowerShell 5.1, Python 3.14, run with `python -I`. No cargo build, no game data. Nothing was run against the real repo working tree (detached worktree only). ### Green - #3187 merged alone into `main`: `python -I tests/test_build_nvidia_cargo.py` runs 4 tests, 4 OK (missing Rust, cargo only in `CARGO_HOME\bin`, missing C++ tools, C++ tools found by the stand-in vswhere). ### Red - Same test file with `main`'s `d3d12/scripts/build-nvidia.ps1` put back: 4 of 4 fail (restored afterwards). - This differs from the body: it says the fourth test (vswhere found) is "a positive control that also passes on main". It does not. On Windows it fails on main too, because the fake cargo sits in `CARGO_HOME\bin`, which main never looks in. The tests are fine; the sentence is wrong (3 red + 1 control should read 4 red). ### Together with #3220 - Merging #3220 on top: no conflict (they touch different files; `play-nvidia.ps1` and `tests/test_win_launchers.py` are not in #3187). - After both merges: `test_build_nvidia_cargo.py` 4/4 OK; `tests/test_win_launchers.py` 10/10 OK (run twice, once as a script, once through unittest discover). - Exit paths, run by hand on the merged tree: - `play-nvidia.ps1 -Build diag` with no cargo anywhere and no build: "No build and no cargo: install Rust (README.md)", exit 1. `build-nvidia.ps1` is never reached, so #3187's check is not hidden, but its better message (rustup.rs, winget) is not shown on this path either. - cargo on PATH, C++ tools missing: `build-nvidia.ps1` prints the Build Tools message and exits 1; `play-nvidia.ps1` does not look at that exit code, goes on, prints "No ...leonida.exe. Build it first", exit 1. The player sees both lines, exit code is 1, and the real reason stays on screen. OK. - Through `scripts/play-d3d12.ps1` (the launcher): it calls `build-nvidia.ps1` itself when `leonida.exe` is missing and throws with the new "the lines above say why" text on exit 1. OK. - `play-nvidia.ps1` failures now `exit 1` instead of `return` (#3220), so Launcher.bat shows a failure code for those. OK. ### Gaps 1. Confirmed, real but narrow: `play-nvidia.ps1:137` `$noCargo = -not (Get-Command cargo ...)` has no `CARGO_HOME\bin` lookup. I ran the merged `play-nvidia.ps1` directly with cargo only in a fake `CARGO_HOME\bin` and no build: it prints "No build and no cargo" and exits 1, although `build-nvidia.ps1` would have found that cargo. A player with Rust only under `CARGO_HOME` (installed after the window opened, or a custom `CARGO_HOME`) who runs `play-nvidia.ps1` by hand (docs/windows-memory.md does) is refused. - Through `play-d3d12.ps1` the gap mostly does not show: `build-nvidia.ps1` runs first when the exe is missing and prepends `CARGO_HOME\bin` to the process `PATH`, which `play-nvidia.ps1` then inherits. - It does show on the stale-DLSS branch (lines 138-140) when an exe exists, the DLSS SDK was added later and `build-nvidia.ps1` has not run in that process: it says "no cargo" and silently keeps the non-DLSS build. - The PR body already lists this as a `finding:`. A shared helper or the same 4 lines in `play-nvidia.ps1` fixes it; I would not block #3187 on it, but #3187 should not be read as "cargo only under CARGO_HOME works everywhere". 2. `play-nvidia.ps1:148` ignores the exit code of `build-nvidia.ps1`. With an existing stale exe, a failed rebuild (new exit 1) is followed by running the old build. Pre-existing, not worse after the PRs. 3. #3187 claims `Fixes: #3025` and `Fixes: #3131`. Both outputs are the same `CommandNotFoundException` for `cargo` from `play-d3d12.ps1` (the Russian-locale text is in #3131). Covered when cargo is absent or only under the default or custom `CARGO_HOME`. #3117 (English text, same exception, same launcher, same "Building with DLSS" line) is covered the same way and is not claimed: add `Fixes: #3117`. Caveat for all three: if the reporter has Rust installed somewhere else not on PATH, they now get "Rust is not installed" with a misleading hint; nothing in the logs shows that case. 4. Body accuracy otherwise matches the diff (cargo lookup, vswhere with `-latest -prerelease -products *`, `VCINSTALLDIR`, message change in `play-d3d12.ps1`). Only the "fourth test passes on main" sentence is wrong. I did not check the claimed release of the item by @tiguan26. 5. #3220's new test covers `no_cargo` with `PATH = ''`, so it passes with or without #3187; no test covers play-nvidia with cargo only in `CARGO_HOME\bin`. ### Verdict #3187: OK to merge on green CI; the code does what it says and the tests fail on main and pass on the branch. Fix the body (4 red, not 3 + a control; add `Fixes: #3117`). #3220: OK. Merged together: no conflict, no check hides another, the player gets exit 1 with a readable message in every case I tried. Open follow-up: the `play-nvidia.ps1` `CARGO_HOME\bin` gap (finding 1). AI-assisted (Claude Code), models: Claude Opus 5.5 (checker), separate Claude Opus 5.5 judge. Note: #3187 is by MoonEyes, so this is not a third-party check.
merzleckeier commented 2026-12-02 22:58:10 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-02T22:58:10Z.

Review: COMMENTED


I independently verified the direct-launch follow-up noted in the body. On this head (8af4eb44) combined with #3220 (0beb7d26), I used Linux PowerShell with a stub cargo in CARGO_HOME/bin, absent from PATH, and no runtime build. Calling build-nvidia.ps1 found and invoked the stub. Starting directly through play-nvidia.ps1 stopped before the build with exit 1 and “No build and no cargo.” The same environment was used for both calls. This distinguishes the existing direct-launch preflight gap from the missing-tool handling fixed here. No actual build or game was started.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6160535766 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3187#pullrequestreview-6160535766). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-02T22:58:10Z. **Review:** COMMENTED --- I independently verified the direct-launch follow-up noted in the body. On this head (`8af4eb44`) combined with #3220 (`0beb7d26`), I used Linux PowerShell with a stub `cargo` in `CARGO_HOME/bin`, absent from `PATH`, and no runtime build. Calling `build-nvidia.ps1` found and invoked the stub. Starting directly through `play-nvidia.ps1` stopped before the build with exit 1 and “No build and no cargo.” The same environment was used for both calls. This distinguishes the existing direct-launch preflight gap from the missing-tool handling fixed here. No actual build or game was started.
enlight3d commented 2026-12-03 02:31:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-12-03T02:31:41Z.


RUN (gate-style, build and in game): head 8af4eb442 merged alone with git merge --no-ff onto main ef35d683e (no conflict). RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro (build 26300), Visual Studio 2022 Build Tools and Rust installed.

First build as a user would run it. d3d12\scripts\build-nvidia.ps1 (the script Launcher.bat runs on a first start) was started with a plain PowerShell, with no Developer prompt, no CARGO_TARGET_DIR, no CARGO_BUILD_TARGET and no target folder yet. cargo was found, vswhere found the C++ tools, and neither new message was printed. The build ran to the end in 199 s (exit 0) and wrote built-with.txt. The case without Rust or without the C++ tools was not tried on this machine; the four cases of tests/test_build_nvidia_cargo.py were not rerun here.

Observed on the way, not caused by this change: rustup's default host on this machine is x86_64-pc-windows-gnu and d3d12/rust-toolchain.toml does not select a target, so that build made a GNU executable (133.5 MB, no .pdb), while the new comment says the toolchain's target is x86_64-pc-windows-msvc. The vswhere check runs whichever host the toolchain builds for. On a machine with a GNU default host and no Visual Studio it would stop the build at the new message; whether that build could have gone through without Visual Studio was not tried.

In game. The runs used an MSVC build of the same tree (diagnostics,mimalloc, target x86_64-pc-windows-msvc, 21.7 MB). Launcher defaults except -PrecompileUsed (on this main the launcher's default precompiles every recorded pipeline, which takes hours on a first start), Series S settings, -NoDlss -NoFrameGen, standing at the save. A warm-up run first, in a data folder of its own (this main changed the translator since the last gate run). Then one run with the memory safety stop, ended 300 s after reaching the world:

Reached the world 79 s (warm-up: 72 s)
Time in the world 300 s (warm-up: 349 s)
Device losses 0
Crashes 0
Frame median 29.7 ms (32.4 fps rendered)
Card busy 99 %
Private memory, max 28.5 GB

Warnings: only kinds that a run of the previous main (f3865cae8) with another pull request (#3128) printed too, in about the same numbers; no new kind. No pipeline refused other than the 29 "creation method that is not implemented" lines that run has as well. The last frame saved (8192) shows the world drawn normally. The play script's new failure line was not reached (the build did not fail).

Also checked earlier on the same merge, without building: the pull request's own tests pass (tests/test_build_nvidia_cargo.py: 4 passed with pytest, 4 OK with unittest). The launcher from this branch, with no exe present, was run three times with the environment narrowed: with Rust hidden (system PATH, empty CARGO_HOME) it printed the new "Rust is not installed" message and then stopped with its build failure line; with the Build Tools hidden (vswhere not found) it printed the Visual Studio Build Tools message and stopped the same way; with the real tools and a stand-in cargo it printed nothing new and called cargo build --locked --profile diag -p leonida --features diagnostics,mimalloc. These were simulated on this PC, not on machines that really lack the tools.

Verdict: PASS. The new checks let a machine with Rust and the C++ tools build as before, and the game runs from that launcher path with no new warning or failure. Not covered here: the two failure cases on a real machine, a Rust installed after the window opened (CARGO_HOME\bin lookup), Developer prompts (VCINSTALLDIR), -RayTracing, DLSS and frame generation, other GPUs, Wine/Proton.

AI-assisted: Claude Code (Claude Opus 5.5)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7365561389 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3187#issuecomment-7365561389). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-12-03T02:31:41Z. --- RUN (gate-style, build and in game): head 8af4eb442 merged alone with `git merge --no-ff` onto `main` ef35d683e (no conflict). RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro (build 26300), Visual Studio 2022 Build Tools and Rust installed. **First build as a user would run it.** `d3d12\scripts\build-nvidia.ps1` (the script `Launcher.bat` runs on a first start) was started with a plain PowerShell, with no Developer prompt, no `CARGO_TARGET_DIR`, no `CARGO_BUILD_TARGET` and no `target` folder yet. cargo was found, vswhere found the C++ tools, and neither new message was printed. The build ran to the end in 199 s (exit 0) and wrote `built-with.txt`. The case without Rust or without the C++ tools was not tried on this machine; the four cases of `tests/test_build_nvidia_cargo.py` were not rerun here. Observed on the way, not caused by this change: rustup's default host on this machine is `x86_64-pc-windows-gnu` and `d3d12/rust-toolchain.toml` does not select a target, so that build made a GNU executable (133.5 MB, no `.pdb`), while the new comment says the toolchain's target is `x86_64-pc-windows-msvc`. The vswhere check runs whichever host the toolchain builds for. On a machine with a GNU default host and no Visual Studio it would stop the build at the new message; whether that build could have gone through without Visual Studio was not tried. **In game.** The runs used an MSVC build of the same tree (`diagnostics,mimalloc`, target `x86_64-pc-windows-msvc`, 21.7 MB). Launcher defaults except `-PrecompileUsed` (on this `main` the launcher's default precompiles every recorded pipeline, which takes hours on a first start), Series S settings, `-NoDlss -NoFrameGen`, standing at the save. A warm-up run first, in a data folder of its own (this `main` changed the translator since the last gate run). Then one run with the memory safety stop, ended 300 s after reaching the world: | | | |---|---| | Reached the world | 79 s (warm-up: 72 s) | | Time in the world | 300 s (warm-up: 349 s) | | Device losses | 0 | | Crashes | 0 | | Frame median | 29.7 ms (32.4 fps rendered) | | Card busy | 99 % | | Private memory, max | 28.5 GB | Warnings: only kinds that a run of the previous `main` (f3865cae8) with another pull request (#3128) printed too, in about the same numbers; no new kind. No pipeline refused other than the 29 "creation method that is not implemented" lines that run has as well. The last frame saved (8192) shows the world drawn normally. The play script's new failure line was not reached (the build did not fail). Also checked earlier on the same merge, without building: the pull request's own tests pass (`tests/test_build_nvidia_cargo.py`: 4 passed with pytest, 4 OK with unittest). The launcher from this branch, with no exe present, was run three times with the environment narrowed: with Rust hidden (system `PATH`, empty `CARGO_HOME`) it printed the new "Rust is not installed" message and then stopped with its build failure line; with the Build Tools hidden (`vswhere` not found) it printed the Visual Studio Build Tools message and stopped the same way; with the real tools and a stand-in `cargo` it printed nothing new and called `cargo build --locked --profile diag -p leonida --features diagnostics,mimalloc`. These were simulated on this PC, not on machines that really lack the tools. Verdict: **PASS**. The new checks let a machine with Rust and the C++ tools build as before, and the game runs from that launcher path with no new warning or failure. Not covered here: the two failure cases on a real machine, a Rust installed after the window opened (`CARGO_HOME\bin` lookup), Developer prompts (`VCINSTALLDIR`), `-RayTracing`, DLSS and frame generation, other GPUs, Wine/Proton. AI-assisted: Claude Code (Claude Opus 5.5)
merzleckeier commented 2026-12-03 03:06:31 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T03:06:31Z.

Review: COMMENTED


Rechecked 8af4eb44 on 2791b775. In PowerShell 7.7.0 on Linux, the two portable prerequisite tests passed with the fixture PATH narrowed to exclude the host Cargo. The two Windows-only tests skipped. This also combines cleanly with #3283: the direct build invocation returned the fixture Cargo’s status, and a nested PowerShell caller continued and read 7.

I followed up on the GNU-host observation. With OS=Windows_NT, no VCINSTALLDIR, and an empty Program Files fixture, the PR returned 1 before calling the stand-in Cargo. The same fixture on main reached Cargo. The check therefore applies to every Windows host. rust-toolchain.toml adds the MSVC standard library and leaves the default host’s build target available. If Windows GNU builds are intended to remain usable, please gate the Visual Studio check on the effective target and cover the GNU case. I only exercised the launcher decision in this probe. Rustup target configuration

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6163027056 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3187#pullrequestreview-6163027056). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T03:06:31Z. **Review:** COMMENTED --- Rechecked `8af4eb44` on `2791b775`. In PowerShell 7.7.0 on Linux, the two portable prerequisite tests passed with the fixture PATH narrowed to exclude the host Cargo. The two Windows-only tests skipped. This also combines cleanly with #3283: the direct build invocation returned the fixture Cargo’s status, and a nested PowerShell caller continued and read `7`. I followed up on [the GNU-host observation](https://github.com/ProjectLeonida/mandy/pull/3187#issuecomment-7365561389). With `OS=Windows_NT`, no `VCINSTALLDIR`, and an empty Program Files fixture, the PR returned 1 before calling the stand-in Cargo. The same fixture on `main` reached Cargo. The check therefore applies to every Windows host. `rust-toolchain.toml` adds the MSVC standard library and leaves the default host’s build target available. If Windows GNU builds are intended to remain usable, please gate the Visual Studio check on the effective target and cover the GNU case. I only exercised the launcher decision in this probe. [Rustup target configuration](https://rust-lang.github.io/rustup/overrides.html#targets) AI-assisted with OpenAI Codex.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3187:upstream-pr/3187'
git switch 'upstream-pr/3187'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3187'
git switch 'upstream-pr/3187'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3187'
git switch 'upstream-pr/3187'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3187'
git switch 'main'
git merge --squash 'upstream-pr/3187'
git switch 'main'
git merge --ff-only 'upstream-pr/3187'
git switch 'main'
git merge 'upstream-pr/3187'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!3187
No description provided.