diff --git a/seediso/windows11/Install-Rustup.bat b/seediso/windows11/Install-Rustup.bat new file mode 100644 index 0000000..84ce8fd --- /dev/null +++ b/seediso/windows11/Install-Rustup.bat @@ -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%