Repository navigation
build,win: fail fast in vcbuild without cargo - #66858
Open
vedchaudhari wants to merge 1 commit into
Open
vedchaudhari wants to merge 1 commit into
vedchaudhari wants to merge 1 commit into
Conversation
On Windows, configure.py returns from check_compiler() before it gets to the cargo and rustc check, so Temporal stays enabled even when no Rust toolchain is installed. The build then runs for a long time and fails in node_crates.vcxproj with MSB8066. Check for cargo in vcbuild.bat before configuring and building, in the same places deps/crates/cargo_build.py looks, and stop with a message pointing to BUILDING.md. The check is skipped for nobuild, clean, and when Temporal is disabled or provided as a shared library. Assisted-by: a closed-source coding agent Signed-off-by: vedchaudhari <vedc2853@gmail.com>
MikeMcC399
approved these changes
Oct 20, 2026
MikeMcC399
left a comment
Contributor
There was a problem hiding this comment.
Thanks @vedchaudhari !
I cross-checked against my original issue #66848
Rust Toolchain installed
I checked with the following installed on Windows 11 26H2, running .\vcbuild.bat in PowerShell:
- rustc 1.99.1
- cargo 1.99.1
build and smoke-test were successful.
Release\node -e "console.log('Hello from Node.js', process.version)"
Hello from Node.js v27.0.0-preRust Toolchain uninstalled
Executing rustup self uninstall (uninstalls rustc & cargo), confirms fast failure:
.\vcbuild.bat
Looking for Python
Python found in C:\Users\mikem\AppData\Local\Microsoft\WindowsApps\\python.exe
Python 3.15.0
Looking for NASM
Looking for cargo
Could not find cargo, install the Rust toolchain. See BUILDING.md.
StefanStojanovic
approved these changes
Oct 20, 2026
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If Rust isn't installed,
vcbuild.batdoesn't catch it. The build runs for a long time and then fails with:There's already a
cargo/rustccheck inconfigure.py, but on Windowscheck_compiler()returns before it gets there (L1630-L1646, L1670-L1690), so Temporal stays on andcargo_build.pyfails when it tries to runcargo.This adds a small
tools/msvs/find_cargo.cmd(similar tofind_nasm.cmd) and calls it fromvcbuild.bat. It looks forcargothe same waycargo_build.pydoes:CARGO, thenPATH, then%USERPROFILE%\.cargo\bin. Without Rust, the build now stops right away:The check is skipped for
nobuild,clean, and when--v8-disable-temporal-supportor--shared-temporal_capiis passed, same asconfigure.py.Tested on Windows 11 with and without Rust on
PATH, withCARGOset to a full path, and with rustup in%USERPROFILE%\.cargo\bin.Note : it only checks that
cargoexists, notrustcor the versions (configure.pyonly warns about old versions on other platforms). Also,BUILDING.mdsays a missingcargodisables Temporal, which isn't the case on Windows. I can fix that in a follow-up.Fixes: #66848
Refs: #63451
Assisted-by: Claude Code. I reproduced the issue, reviewed the change, and tested it with and without Rust on
PATHmyself.