Installing Rust and Node.js

Step-by-step guide to install Rust and Node.js, the two core runtimes required for Tauri v2 development.

After setting up the system dependencies for your operating system, the next step is to install the two core runtimes Tauri relies on: Rust and Node.js. Rust is the language that powers Tauri's backend — it handles native APIs, file system access, system tray operations, and compiles your app into a tiny, fast binary. Node.js provides the JavaScript runtime for your frontend build tooling and is used to install and manage the Tauri CLI. Both need to be fully functional on your machine before you can create a Tauri project.

Installing Rust via rustup

Rust is installed and managed through a tool called rustup (for dedicated configuration details, see Installing Rust via rustup). It downloads the Rust compiler (rustc), the package manager (cargo), and keeps everything up to date with a single command. The installation process is the same on Linux and macOS, and slightly different on Windows.

1

Step 1: Run the rustup installer

Choose your operating system and follow the instructions to install rustup. The default settings work for almost every development scenario — you do not need to customize anything unless you have a specific reason.

Open a terminal and run the following command:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

The script will prompt you to proceed. Press Enter to accept the default installation.

Windows: C++ Build Tools Required:

On Windows, Rust depends on the Microsoft Visual C++ Build Tools. If they are not already present on your system, the rustup installer will prompt you to install them. Accept the prompt and select the Desktop development with C++ workload during the Visual Studio Installer setup. These are the same tools covered in the System Dependencies Overview.

2

Step 2: Restart your terminal

Once the installation completes, close your terminal and open a new one. rustup adds its binary directory to your PATH, but the change only takes effect in new terminal sessions. On some Linux distributions, you might also need to log out and back in.

3

Step 3: Verify the installation

Run the following two commands to confirm that Rust is correctly installed:

rustc --version
cargo --version

You should see output similar to:

rustc 1.85.0 (4d91de4e4 2025-02-17)
cargo 1.85.0 (d73d2caf9 2025-02-10)

The exact version numbers will be the latest stable release at the time you install.

Rust is Ready:

If both commands print a version number without errors, Rust is installed and ready to use.

Installing Node.js

Node.js is the runtime that powers your frontend development server, runs the Tauri CLI, and manages your project’s JavaScript dependencies through package managers like npm, pnpm, or bun (explore full package manager options in Installing Node.js). While Tauri itself does not require a specific frontend framework, the tooling that scaffolds, builds, and runs a Tauri project relies on Node.js being available.

1

Step 1: Download the Node.js installer

Go to nodejs.org and download the LTS (Long Term Support) installer for your operating system. The LTS version is recommended for production-grade stability. The website automatically detects your OS and presents the correct download — you just need to click the big green button.

Why LTS?:

LTS releases receive critical bug fixes and security updates for an extended period. Tauri development tools work reliably with any LTS version of Node.js.

2

Step 2: Run the installer

Launch the downloaded file and follow the setup wizard. Accept the default settings, including the option to add Node.js to your system PATH. This setting is usually checked by default and it is what makes the node and npm commands available in any terminal window.

3

Step 3: Restart your terminal

Close your terminal after the installation finishes and open a fresh one. The updated PATH variable is only loaded when a new terminal session starts. Skipping this step is the most common reason node appears to be missing even after a successful install.

4

Step 4: Verify the installation

Run the following commands to check the installed versions:

node -v
npm -v

Expected output looks like this (the exact numbers may differ):

v22.12.0
10.9.0

Node.js is Ready:

Seeing version numbers for both node and npm confirms that Node.js is installed and accessible from your terminal.

Command Not Found After Install:

If you get an error like command not found: node after restarting your terminal, the most likely cause is that the PATH was not updated. Try manually restarting your computer. If the issue persists, check that the installation directory (usually C:\Program Files\nodejs\ on Windows or /usr/local/bin on macOS/Linux) is listed in your system’s PATH environment variable.

Installing Rust via rustup

Step-by-step guide to installing Rust on Windows, macOS, and Linux with rustup, selecting the correct toolchain for Tauri v2, verifying the installation, and handling common problems.

Installing Node.js

How to install Node.js for Tauri development on any platform, verify the setup, and enable package managers like pnpm and Yarn through Corepack.