Add rustup installer batch file for the Windows 11 VM

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
GuofangandClaude Sonnet 5.5 committed 2026-10-16 13:00:06 +08:00
1 parent 9adcf6acca
commit 2eaa0f9d32
1 file changed
+30
+30
View File
@@ -0,0 +1,30 @@
@echo off
setlocal
title Install Rust toolchain (rustup)
rem rustup installs per user (%USERPROFILE%\.cargo), so run this as the user who will use Rust.
rem The default msvc toolchain needs the MSVC Build Tools (see Install-MSVC2022-BuildTools.bat).
set "INSTALLER=%TEMP%\rustup-init.exe"
echo Downloading rustup-init...
curl.exe -L --fail -o "%INSTALLER%" https://win.rustup.rs/x86_64
if errorlevel 1 (
echo Download failed.
pause
exit /b 1
)
echo Installing the stable Rust toolchain...
"%INSTALLER%" -y --default-toolchain stable --profile default
set "RC=%ERRORLEVEL%"
del "%INSTALLER%" >nul 2>&1
if "%RC%"=="0" (
echo Done. Open a new terminal to pick up the updated PATH.
) else (
echo rustup-init exited with code %RC%.
)
pause
exit /b %RC%