Core Dev Bootcamp
Docs

05Core Dev Bootcamp

Environment & Build Toolchain


Introduction

Before diving into Rippled’s architecture or contributing to the codebase, it’s essential to prepare a clean and consistent development environment. Rippled is a high-performance C++ application with multiple system dependencies from compiler toolchains to build systems and scripting utilities that must be properly configured to ensure smooth compilation and runtime behavior.

This section provides a step-by-step setup guide for macOS, focusing on the tools and configurations required to compile Rippled from source. You’ll install Node.js for build tooling, configure your compiler (Clang) and Xcode environment, and prepare Python dependencies used in the build process.

By the end of this section, your environment will be fully ready to build and run Rippled locally, following the same structure used by production and continuous integration setups.


macOS

Install Node.js via nvm for easy version management:

Shell
# Install nvm (if not already installed)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

# Install and use the latest LTS version of Node.js
nvm install --lts
nvm use --lts

Prerequisites for Compiling Rippled

  • macOS with administrator rights
  • Apple account (to download certain versions of Xcode)
  • Stable internet connection for dependencies

Checking Clang Version

Shell
clang --version

Installing Xcode (if needed)

  1. Download Xcode from Apple Developer Downloads
  2. Extract the .xip file and rename it (e.g., Xcode_16.2.app)
  3. Move it to /Applications and set it as the default toolchain:
Shell
sudo mv Xcode_16.2.app /Applications/
sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
export DEVELOPER_DIR=/Applications/Xcode_16.2.app/Contents/Developer
  1. Verify the installation:
Shell
clang --version
git --version

You should see something like this for clang: Apple clang version 16.0.0 (clang-1600.0.26.3)

Installing Build Tools

Shell
# Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Essential dependencies
brew update
brew install xz pyenv

Python Configuration

Shell
# Install Python 3.13 via pyenv
pyenv install 3.11.13
pyenv global 3.11.13
eval "$(pyenv init -)"

# Install Conan and CMake
pip install 'conan>2.16'
pip install 'cmake>3.21'

Ubuntu

Prerequisites

  • Ubuntu with administrator rights
  • Stable internet connection

Installing Build Tools

Shell
apt update
apt install --yes curl git libssl-dev pipx python3.11 python3-pip make g++-11 libprotobuf-dev protobuf-compiler

# Install CMake
curl -LO "https://github.com/Kitware/CMake/releases/download/v3.25.1/cmake-3.25.1.tar.gz"
tar -xzf cmake-3.25.1.tar.gz
cd cmake-3.25.1
./bootstrap --parallel=$(nproc)
make --jobs $(nproc)
make install
cd ..

# Install Conan
pipx install 'conan>2.16'
pipx ensurepath