Prerequisites

Rspack is built using Rust and NAPI-RS, then released as Node.js packages.

Setup Rust

  • Install Rust using rustup.
  • If you are using VS Code, we recommend installing the rust-analyzer extension.

Setup Node.js

Install Node.js

We recommend using the LTS version of Node.js 20.

Check the current Node.js version with the following command:

node -v

If you do not have Node.js installed in your current environment, you can use nvm or fnm to install it.

Here is an example of how to install via nvm:

# Install Node.js LTS
nvm install 20 --lts

# Switch to Node.js LTS
nvm use 20