Skip to main content

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

Platform Support

Rust runs beautifully on Windows 10/11 (64-bit), macOS 10.12+, and Linux (kernel 3.2+)

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"

✅ 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.

Homebrew (Lightning Fast)

brew install node

Node Version Manager (For the Power Users)

  1. Get nvm up and running:

    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
  2. Refresh your shell:

    source ~/.bashrc
  3. Install the latest LTS:

    nvm install --lts
    nvm use --lts

Traditional Installer

Prefer clicking? Download from nodejs.org and follow the wizard!

🔧 Final Touches

  1. Supercharge npm:

    # Always use the latest npm
    npm install -g npm@latest
  2. 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
  3. 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

  1. Install the Cedra CLI ⬅️ Do this next!

    • Essential tool for all Cedra development
    • Compiles Move contracts, manages accounts, and interacts with the blockchain
  2. Get Test Tokens from Faucet

    • You'll need CEDRA tokens for deploying contracts
    • Free testnet tokens for development
  3. Build Your First Counter App

    • Hands-on tutorial to create your first smart contract
    • Learn Move basics with a practical example