Building rippled
Complete guide to building rippled on Windows with debug toolkit protection.
Prerequisites
Section titled “Prerequisites”- Visual Studio 2022 Build Tools (or full VS2022)
- .NET 9.0 SDK (for the Build Governor)
- Python 3.x with Conan 2.x (
pip install conan) - CMake 3.25+ (comes with Conan or install separately)
- Ninja (comes with Conan or install separately)
Option 1: One-command build (recommended)
Section titled “Option 1: One-command build (recommended)”The toolkit includes a PowerShell script that handles everything:
cd F:\rippled
# Copy the build script from the toolkitcopy F:\AI\rippled-windows-debug\scripts\build-rippled.ps1 .
# Run the full build with governor protectionpowershell -ExecutionPolicy Bypass -File build-rippled.ps1 -Parallel 8This automatically:
- Sets up the VS2022 environment
- Adds Python Scripts to PATH (for Conan)
- Configures Build Governor wrappers
- Runs Conan install
- Configures CMake with Ninja
- Builds with governor protection
Option 2: Manual build steps
Section titled “Option 2: Manual build steps”REM 1. Set up build protectionpowershell -ExecutionPolicy Bypass -File scripts\setup-governor.ps1
REM 2. Set up VS2022 environmentcall "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
REM 3. Install dependenciesconan install . --output-folder=build --build=missing
REM 4. Configure with debug info in releasecmake -G Ninja -B build ^ -DCMAKE_BUILD_TYPE=RelWithDebInfo ^ -DCMAKE_TOOLCHAIN_FILE=build/generators/conan_toolchain.cmake ^ -Dxrpld=ON
REM 5. Build (governor protects automatically)cmake --build build --parallel 16PDB files for release builds
Section titled “PDB files for release builds”For symbol resolution in release builds, add to CMakeLists.txt:
if(MSVC) set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi") set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")endif()