Prerequisites: Rust and Node.js Installation
Ready to build on Cedra? Let's get your development environment set up! 🚀
You'll need two powerful tools in your arsenal:
🦀 Rust - The backbone for building Cedra from source and crafting Move modules
📦 Node.js - Your gateway to DApp development and frontend magic
🎯 Version Requirements
For the smoothest Cedra experience, we recommend:
- Rust: 1.86.0 or higher
- Node.js: 18.x LTS or 20.x LTS
- npm: 8.0.0 or higher
🦀 Installing Rust
Rust runs beautifully on Windows 10/11 (64-bit), macOS 10.12+, and Linux (kernel 3.2+)
- 🍎 macOS
- 🪟 Windows
- 🐧 Linux
Via Homebrew Way. One command, and you're done!
brew install rust
The Official Installer Route Download and run the official installer
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Don't forget to activate Rust in your current shell:
source "$HOME/.cargo/env"
Official Installer (Recommended)
- Grab rustup-init.exe
- Run it and follow the friendly prompts
- Select "1) Proceed with installation (default)"
- Give your terminal a fresh restart
Chocolatey Lovers. Sweet and simple
choco install rust
Official Installer (Universal)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Activate Rust in your shell:
source "$HOME/.cargo/env"
Via Package Manager
# Update and install in two steps
sudo apt update
sudo apt install rustc cargo
✅ Verify Your Rust Installation
Check if everything's working
rustc --version
cargo --version
📚 Need more details? Check out rust-lang.org/tools/install
📦 Installing Node.js
Time to set up your JavaScript runtime! We recommend Node.js 18.x LTS or 20.x LTS for maximum stability.
- 🍎 macOS
- 🪟 Windows
- 🐧 Linux
Homebrew (Lightning Fast)
brew install node
Node Version Manager (For the Power Users)
-
Get nvm up and running:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
-
Refresh your shell:
source ~/.bashrc
-
Install the latest LTS:
nvm install --lts
nvm use --lts
Traditional Installer
Prefer clicking? Download from nodejs.org and follow the wizard!
Official Installer
- Head to nodejs.org
- Download the LTS version
- Run the installer (keep "Add to PATH" checked!)
Chocolatey Magic
choco install nodejs
Version Manager (nvm-windows)
- Download nvm-windows
- Install it, then run as Administrator:
nvm install lts
nvm use lts
NodeSource Repository (Recommended)
# Add NodeSource repo and install
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
Node Version Manager (Flexible Option)
-
Install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
-
Reload your shell config:
source ~/.bashrc
-
Install Node.js:
nvm install --lts
nvm use --lts
🔧 Final Touches
-
Supercharge npm:
# Always use the latest npm
npm install -g npm@latest -
Fix npm permissions (Linux/macOS):
# Create a safe space for global packages
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc -
Install developer essentials:
# The holy trinity of JavaScript tools
npm install -g yarn pnpm typescript
✅ Verify Node.js is Ready
# Check your versions
node --version
npm --version
Expected output:
v20.10.0
10.2.3
Give it a test run:
# Hello, Node.js!
node -e "console.log('Node.js is installed successfully! 🎉')"
📚 Want to dive deeper? Visit nodejs.org/en/download
🚀 You're All Set!
Congratulations! With Rust and Node.js installed, you have the foundation needed for Cedra development. Here's your roadmap forward:
🎯 Immediate Next Steps
-
Install the Cedra CLI ⬅️ Do this next!
- Essential tool for all Cedra development
- Compiles Move contracts, manages accounts, and interacts with the blockchain
-
- You'll need CEDRA tokens for deploying contracts
- Free testnet tokens for development
-
- Hands-on tutorial to create your first smart contract
- Learn Move basics with a practical example