launcher: name a missing Rust or C++ build tools before the first build (LAUNCHER-RUST-PREREQ) #3187
Open
github-bot
wants to merge 1 commit from
github-bot/gh-3187 into main
AGit
pull from: github-bot/gh-3187
merge into: github:main
github:main
github:perf/darner-title-priority-ceiling
github:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
github:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
github:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
github:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
github:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
github:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
github:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
github:fix/runtime-test-conservative-fixtures
github:ci/shard-semantic-linux
github:docs/fg-limit-fps-switch
github:fix/runtime-test-fixture-paths
github:fix/runtime-test-fixture-readers
github:fix/read-file-hard-link
github:fix/book-slot-heap-never-read
github:fix/depth-resolve-spv-path
github:fix/indirect-unused-batched
github:gh-pr/3358/base
github:fix/xmem-refusal-diagnostics
github:gh-pr/3357/base
github:ci/shorten-ci-time
github:fix/alias-later-queued-submissions
github:claude/gallant-sagan-aamatr
github:gh-pr/3342/base
github:gh-pr/3341/base
github:d3d12/agility-sdk-621
github:gh-pr/3293/base
github:gh-pr/3319/base
github:gh-pr/3318/base
github:gh-pr/3315/base
github:gh-pr/3313/base
github:gh-pr/3314/base
github:claude/fervent-curie-m19lnr
github:gh-pr/3216/base
github:gh-pr/3272/base
github:gh-pr/3276/base
github:gh-pr/3279/base
github:gh-pr/3257/base
github:gh-pr/3258/base
github:gh-pr/3271/base
github:codex/skip-no-hit-ray-passes
github:gh-pr/3230/base
github:gh-pr/3266/base
github:gh-pr/3247/base
github:gh-pr/3246/base
github:gh-pr/3244/base
github:claude/sharp-sagan-1jqnp3
github:t3/preserve-fsr-sdk-restart-path
github:t3/propagate-host-failure-hresult
github:t3/launcher-custom-parameters
github:t3/series-x-2160-startup
github:codex/d3d12-uncapped-simulation
github:ci/less-to-run
github:perf/native-compute-shader-forms
github:claude/blissful-franklin-ukp7ag
github:codex/full-precompile-default
github:gh-pr/3166/base
github:gh-pr/3148/base
github:gh-pr/3138/base
github:gh-pr/3106/base
github:gh-pr/3057/base
github:gh-pr/2756/base
github:gh-pr/2812/base
github:gh-pr/3032/base
github:gh-pr/2992/base
github:notes/card-time-and-plant-flicker
github:gh-pr/2986/base
github:gh-pr/3000/base
github:gh-pr/2966/base
github:gh-pr/2924/base
github:gh-pr/726/base
github:gh-pr/2761/base
github:gh-pr/2663/base
github:gh-pr/2861/base
github:gh-pr/2862/base
github:gh-pr/2820/base
github:gh-pr/2811/base
github:gh-pr/2803/base
github:rt-call-trace
github:gh-pr/2802/base
github:gh-pr/2766/base
github:perf/ahead-split
github:gh-pr/2589/base
github:gh-pr/2699/base
github:gh-pr/2696/base
github:docs/readme-runtime-proposal
github:gh-pr/1346/base
github:codex/coord-claim-check-20261124-7e48
No reviewers
Labels
Clear labels
accessibility
Barrier affecting people with disabilities
area: ci
.github/ workflows and settings
area: d3d12
The D3D12 runtime in d3d12/ (Rust: leonida.exe and its crates)
area: docs
Documentation
area: launcher
The launcher (launcher/)
area: runtime (legacy)
The earlier Vulkan runtime in runtime/
area: shader translator
The shader translator (leonida-shader, tools/rdna2spirv) and its tests
area: tools
tools/ and scripts/
area: viewer
The map viewer (viewer/)
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
missing claim
Needs a claim in #14
needs in-game run
Changes the code a frame runs through: needs the 300 s in-game gate (docs/game_gate.md)
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
wontfix
This will not be worked on
No labels
accessibility
area: ci
area: d3d12
area: docs
area: launcher
area: runtime (legacy)
area: shader translator
area: tools
area: viewer
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs in-game run
needs rebase
needs-triage
question
ready-for-agent
submodules
wontfix
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
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.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!3187
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3187"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@MoonEyes on GitHub · 2026-12-02 17:24 UTC · original
ProjectLeonida:claude/blissful-franklin-ukp7ag→main· +154 −1 · 3 files · 1 commits · openClaimed 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.batbuildsleonida.exewithd3d12\scripts\build-nvidia.ps1. Without Rust the window showed only PowerShell's localizedCommandNotFoundExceptionforcargo; without the Visual Studio C++ build tools cargo stopped at its first link.build-nvidia.ps1now, before building:CARGO_HOME\bin(a Rust installed after the window opened), else says Rust is missing (rustup.rs,winget install Rustlang.Rustup) and exits 1;-latest -prerelease -products *, the same lookup asscripts/build_llvm_mc.ps1) for the x64 C++ tools,VCINSTALLDIRfrom 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 inCARGO_HOME\bin, missing C++ tools (Windows), C++ tools found by a stand-in vswhere (Windows). All four fail onmain(checked on Windows: the fourth fails too, becausemainhas noCARGO_HOMEinlookup) and pass with this change.python -I scripts/check_no_game_data.pyon 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:138has its own$noCargocheck without theCARGO_HOME\binlookup; one shared helper would remove the duplicate. No game files or specific hardware needed.Checklist
mainand merges cleanly.docs/design.md(n/a)Generated by Claude Code
@fiestorra on GitHub · 2026-12-02 17:48 UTC · original
Verified here: it applies and its own tests pass.
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.pyis 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 on GitHub · 2026-12-02 19:40 UTC · original
VERIFY-3187 — Windows nativo, con Build Tools instaladas (el caso que el PR describe)
8af4eb4424910c5c2emainb41763227—git merge-tree --write-treeclean,git merge --no-ffclean (auto-mergedplay-d3d12.ps1, which #3172 changed since the base)Ran (native Windows, Python 3.13)
Negative control (
d3d12/scripts/build-nvidia.ps1reverted tomain, the PR's test kept):The real check, on a machine that has only the Build Tools (
vswhere.exepresent,VCINSTALLDIRunset — this one):That is the flag combination this repository has already been bitten by: without
-products *the samevswhereprints 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
Launcher.batend to end: not run; the change is insidebuild-nvidia.ps1.Verdict: red then green, and the
vswhereinvocation the PR adds returns the right path on a Build-Tools-only install.Written with an AI assistant.
@MoonEyes on GitHub · 2026-12-02 22:40 UTC · original
RUN (independent check on Windows, #3187 head
8af4eb442b8f73c17b5224a72808d61895e5cf99and #3220 head0beb7d26d85be96f280c4baa6a66a351fea47a6a, both merged withgit merge --no-ffintomain16243cd6eb16d70eefa31fd42213daf5a3583ea4)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
main:python -I tests/test_build_nvidia_cargo.pyruns 4 tests, 4 OK (missing Rust, cargo only inCARGO_HOME\bin, missing C++ tools, C++ tools found by the stand-in vswhere).Red
main'sd3d12/scripts/build-nvidia.ps1put back: 4 of 4 fail (restored afterwards).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
play-nvidia.ps1andtests/test_win_launchers.pyare not in #3187).test_build_nvidia_cargo.py4/4 OK;tests/test_win_launchers.py10/10 OK (run twice, once as a script, once through unittest discover).play-nvidia.ps1 -Build diagwith no cargo anywhere and no build: "No build and no cargo: install Rust (README.md)", exit 1.build-nvidia.ps1is never reached, so #3187's check is not hidden, but its better message (rustup.rs, winget) is not shown on this path either.build-nvidia.ps1prints the Build Tools message and exits 1;play-nvidia.ps1does 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.scripts/play-d3d12.ps1(the launcher): it callsbuild-nvidia.ps1itself whenleonida.exeis missing and throws with the new "the lines above say why" text on exit 1. OK.play-nvidia.ps1failures nowexit 1instead ofreturn(#3220), so Launcher.bat shows a failure code for those. OK.Gaps
play-nvidia.ps1:137$noCargo = -not (Get-Command cargo ...)has noCARGO_HOME\binlookup. I ran the mergedplay-nvidia.ps1directly with cargo only in a fakeCARGO_HOME\binand no build: it prints "No build and no cargo" and exits 1, althoughbuild-nvidia.ps1would have found that cargo. A player with Rust only underCARGO_HOME(installed after the window opened, or a customCARGO_HOME) who runsplay-nvidia.ps1by hand (docs/windows-memory.md does) is refused.play-d3d12.ps1the gap mostly does not show:build-nvidia.ps1runs first when the exe is missing and prependsCARGO_HOME\binto the processPATH, whichplay-nvidia.ps1then inherits.build-nvidia.ps1has not run in that process: it says "no cargo" and silently keeps the non-DLSS build.finding:. A shared helper or the same 4 lines inplay-nvidia.ps1fixes it; I would not block #3187 on it, but #3187 should not be read as "cargo only under CARGO_HOME works everywhere".play-nvidia.ps1:148ignores the exit code ofbuild-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.Fixes: #3025andFixes: #3131. Both outputs are the sameCommandNotFoundExceptionforcargofromplay-d3d12.ps1(the Russian-locale text is in #3131). Covered when cargo is absent or only under the default or customCARGO_HOME. #3117 (English text, same exception, same launcher, same "Building with DLSS" line) is covered the same way and is not claimed: addFixes: #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.-latest -prerelease -products *,VCINSTALLDIR, message change inplay-d3d12.ps1). Only the "fourth test passes on main" sentence is wrong. I did not check the claimed release of the item by @tiguan26.no_cargowithPATH = '', so it passes with or without #3187; no test covers play-nvidia with cargo only inCARGO_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: theplay-nvidia.ps1CARGO_HOME\bingap (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 on GitHub · 2026-12-02 22:58 UTC · original · reviewed
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 stubcargoinCARGO_HOME/bin, absent fromPATH, and no runtime build. Callingbuild-nvidia.ps1found and invoked the stub. Starting directly throughplay-nvidia.ps1stopped 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 on GitHub · 2026-12-03 02:31 UTC · original
RUN (gate-style, build and in game): head
8af4eb442merged alone withgit merge --no-ffontomainef35d683e(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 scriptLauncher.batruns on a first start) was started with a plain PowerShell, with no Developer prompt, noCARGO_TARGET_DIR, noCARGO_BUILD_TARGETand notargetfolder 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 wrotebuilt-with.txt. The case without Rust or without the C++ tools was not tried on this machine; the four cases oftests/test_build_nvidia_cargo.pywere not rerun here.Observed on the way, not caused by this change: rustup's default host on this machine is
x86_64-pc-windows-gnuandd3d12/rust-toolchain.tomldoes 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 isx86_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, targetx86_64-pc-windows-msvc, 21.7 MB). Launcher defaults except-PrecompileUsed(on thismainthe 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 (thismainchanged the translator since the last gate run). Then one run with the memory safety stop, ended 300 s after reaching the world: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 (systemPATH, emptyCARGO_HOME) it printed the new "Rust is not installed" message and then stopped with its build failure line; with the Build Tools hidden (vswherenot found) it printed the Visual Studio Build Tools message and stopped the same way; with the real tools and a stand-incargoit printed nothing new and calledcargo 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\binlookup), Developer prompts (VCINSTALLDIR),-RayTracing, DLSS and frame generation, other GPUs, Wine/Proton.AI-assisted: Claude Code (Claude Opus 5.5)
@merzleckeier on GitHub · 2026-12-03 03:06 UTC · original · reviewed
Rechecked
8af4eb44on2791b775. 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 read7.I followed up on the GNU-host observation. With
OS=Windows_NT, noVCINSTALLDIR, and an empty Program Files fixture, the PR returned 1 before calling the stand-in Cargo. The same fixture onmainreached Cargo. The check therefore applies to every Windows host.rust-toolchain.tomladds 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 configurationAI-assisted with OpenAI Codex.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.