Skip to content

doc: add Rust toolchain manual installation instructions Windows#63367

Open
MikeMcC399 wants to merge 1 commit into
nodejs:mainfrom
MikeMcC399:rust-on-windows-manual
Open

doc: add Rust toolchain manual installation instructions Windows#63367
MikeMcC399 wants to merge 1 commit into
nodejs:mainfrom
MikeMcC399:rust-on-windows-manual

Conversation

@MikeMcC399
Copy link
Copy Markdown
Contributor

Refs: #63225

Situation

Temporal support is enabled by default starting in Node.js 26. Building it requires a Rust toolchain.

Windows prerequisites describe both manual install and WinGet install. These instructions do not cover Rust toolchain installation.

Change

Add rustup-init.exe to the manual installation instructions with advice to select the standard (default) installation.

Add this to Windows prerequisites - Manual install

Reference: https://rust-lang.github.io/rustup/index.html

Verification

On Windows 11 25H2 (amd64)

Install Visual Studio Build Tools 2022 (17.14.32) and follow other instructions in Windows prerequisites.

Download and run rustup-init.exe from https://rust-lang.org/tools/install/ and select default.

Re-open terminal windows and check installation:

rustc --version
cargo --version
rustup show

rustup logs

rust-lang/rustup#4744 is a known rustup issue regarding spurious reporting of an existing config, even on a clean install.

rustup-init.exe
warn: It looks like you have an existing rustup settings file at:
warn: C:\Users\mikem\.rustup\settings.toml
warn: Rustup will install the default toolchain as specified in the settings file,
warn: instead of the one inferred from the default host triple.

Welcome to Rust!

This will download and install the official compiler for the Rust
programming language, and its package manager, Cargo.

Rustup metadata and toolchains will be installed into the Rustup
home directory, located at:

  C:\Users\mikem\.rustup

This can be modified with the RUSTUP_HOME environment variable.

The Cargo home directory is located at:

  C:\Users\mikem\.cargo

This can be modified with the CARGO_HOME environment variable.

The cargo, rustc, rustup and other commands will be added to
Cargo's bin directory, located at:

  C:\Users\mikem\.cargo\bin

This path will then be added to your PATH environment variable by
modifying the PATH registry key at HKEY_CURRENT_USER\Environment.

You can uninstall at any time with rustup self uninstall and
these changes will be reverted.

Current installation options:


   default host triple: x86_64-pc-windows-msvc
     default toolchain: stable (default)
               profile: default
  modify PATH variable: yes

1) Proceed with standard installation (default - just press enter)
2) Customize installation
3) Cancel installation
>

info: profile set to default
info: default host triple is x86_64-pc-windows-msvc
info: syncing channel updates for stable-x86_64-pc-windows-msvc
info: latest update on 2026-04-16 for version 1.95.0 (59807616e 2026-04-14)
info: downloading 6 components
        cargo installed                        9.54 MiB
       clippy installed                        3.80 MiB
    rust-docs installed                       21.19 MiB
     rust-std installed                       21.05 MiB
        rustc installed                       68.26 MiB
      rustfmt installed                        2.47 MiB                                                                                                                                    info: default toolchain set to stable-x86_64-pc-windows-msvc

  stable-x86_64-pc-windows-msvc installed - rustc 1.95.0 (59807616e 2026-04-14)


Rust is installed now. Great!

To get started you may need to restart your current shell.
This would reload its PATH environment variable to include
Cargo's bin directory (%USERPROFILE%\.cargo\bin).

Press the Enter key to continue.

Signed-off-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/build
  • @nodejs/tsc

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. doc Issues and PRs related to the documentations. labels May 16, 2026
@MikeMcC399
Copy link
Copy Markdown
Contributor Author

End-to-end test

In a PowerShell 7.6.1 admin terminal window:

git clone https://github.com/nodejs/node
cd node
.\vcbuild.bat release msi

Ensure Smart App Control is off
Install from node-v27.0.0-x64.msi in root of repo, taking defaults.

In a new terminal window instance, execute:

node -e "console.log(Temporal)"

Confirm the output:

Object [Temporal] {}

Copy link
Copy Markdown
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

I stumbled on this too.

@MikeMcC399
Copy link
Copy Markdown
Contributor Author

To preview in the context of the full manual instructions for Windows

https://github.com/MikeMcC399/node/blob/rust-on-windows-manual/BUILDING.md#option-1-manual-install

@lpinca lpinca added the commit-queue Add this label to land a pull request using GitHub Actions. label May 16, 2026
@MikeMcC399
Copy link
Copy Markdown
Contributor Author

MikeMcC399 commented May 16, 2026

This is only applicable to Node.js >=26. It's not necessary for earlier release lines.

Due to the significant size of the Rust toolchain installation, this PR should probably be blocked from backporting to 22.x & 24.x from the point of view of additional network bandwidth and storage requirements, although it only concerns installation instructions.

@targos targos added dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x. labels May 18, 2026
@StefanStojanovic
Copy link
Copy Markdown
Contributor

It's great to fill the gap in docs with this. We should also try to add this to the configurations, so that automated install is not broken as well.

@MikeMcC399
Copy link
Copy Markdown
Contributor Author

@StefanStojanovic

It's great to fill the gap in docs with this. We should also try to add this to the configurations, so that automated install is not broken as well.

I did this separately in #63381. I only cross-linked it to #63225 though, so sorry if that wasn't clear!

Are you planning any update to vcbuild.bat to check for the presence of a Rust toolchain? I was thinking about submitting a separate issue for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Issues and PRs related to build files or the CI. commit-queue Add this label to land a pull request using GitHub Actions. doc Issues and PRs related to the documentations. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants