Skip to main content

Prerequisites

Before you use rust-wasmpack-loader, set up your environment with the tools below.

System requirements​

Operating systems​

  • Windows 10/11 (x64)
  • macOS 10.15+ (Intel or Apple Silicon)
  • Linux (Ubuntu 18.04+, CentOS 7+, or equivalent)

Hardware​

  • RAM: 4GB minimum, 8GB recommended
  • Storage: 2GB free for tools and dependencies
  • CPU: any modern x64 or ARM64 processor

Version compatibility​

ToolMinimum VersionRecommended
Node.js22.22.222.x.x (LTS)
Rust1.88.0latest stable
npm10.0.0Latest

Required software​

1. Node.js​

rust-wasmpack-loader requires Node.js 22.22.2 or higher.

Best Practice

Use Volta to manage Node.js versions. It keeps the Node.js version consistent across development and CI.

Installation​

# Using Volta (recommended)
curl https://get.volta.sh | bash
volta install node@22

# Using winget
winget install OpenJS.NodeJS

# Using chocolatey
choco install nodejs

# Or download from https://nodejs.org/

Verify installation​

node --version # Should show v22.22.2 or higher
npm --version # Should show 10.0.0 or higher

# If using Volta
volta list # Should show the installed Node.js version

2. Rust​

Rust compiles your .rs files to WebAssembly. The build uses wasm-pack 0.15, which requires Rust 1.88.0 or higher.

Installation​

# Option 1: Using winget
winget install Rustlang.Rustup

# Option 2: Download from https://rustup.rs/

Verify installation​

rustc --version # Should show 1.88.0 or higher
cargo --version # Should show 1.88.0 or higher

tip

Your environment is ready for Rust-WebAssembly development with rust-wasmpack-loader.