Dependencies¶
This guide covers the dependencies required to build Radix Relay from source.
Quick Setup Options¶
Docker (Recommended)¶
The easiest way to get started is using Docker, which includes all dependencies pre-configured:
See Docker instructions for details.
Automated Installation (setup-cpp)¶
For automated dependency installation, use setup-cpp:
Linux/macOS:
curl -sL https://github.com/aminya/setup-cpp/releases/latest/download/setup_cpp_linux -o setup_cpp
chmod +x setup_cpp
./setup_cpp --compiler llvm-19 --cmake true --ninja true --ccache true --clangtidy 19.1.1 --cppcheck true
Windows (PowerShell as admin):
curl -LJO "https://github.com/aminya/setup-cpp/releases/latest/download/setup_cpp_windows.exe"
./setup_cpp_windows --compiler llvm-19 --cmake true --ninja true --ccache true --clangtidy 19.1.1 --cppcheck true
RefreshEnv.cmd
Manual Installation¶
Required Dependencies¶
1. C++20 Compiler¶
One of the following:
- Clang 19.1.1 (recommended) or GCC 14+
- MSVC 2022 (Windows only - required for libsignal compatibility)
Linux (Ubuntu/Debian):
# Clang 19
bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
# Or GCC 14
sudo apt install build-essential gcc-14 g++-14
macOS:
# Clang (via Xcode Command Line Tools)
xcode-select --install
# Or via Homebrew
brew install llvm@19
Windows:
Install Visual Studio 2022 with C++ Desktop Development workload:
choco install visualstudio2022community --package-parameters "--add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended"
Note: Windows builds require MSVC due to libsignal compatibility. GCC/Clang are not supported on Windows.
2. CMake 3.21+¶
Linux (Ubuntu/Debian):
macOS:
Windows:
3. Ninja Build System¶
Linux (Ubuntu/Debian):
macOS:
Windows:
4. Rust (stable)¶
Required for Signal Protocol implementation.
All platforms:
Or visit rustup.rs
After installation:
5. Protocol Buffers¶
Required by Signal Protocol dependencies.
Linux (Ubuntu/Debian):
macOS:
Windows:
Protocol Buffers is installed automatically via vcpkg during the build process.
Optional Dependencies¶
Documentation Tools¶
Required only if building documentation locally:
Linux (Ubuntu/Debian):
macOS:
Windows:
Development Tools (Optional but Recommended)¶
ccache - Speeds up recompilation:
cppcheck - Static analysis:
clang-tidy 19.1.1 - Linting and static analysis (matches CI):
# Linux
sudo apt install clang-tidy-19
# macOS
brew install llvm@19
# Windows
# Included with Visual Studio 2022 LLVM toolset
Version Requirements Summary¶
| Dependency | Minimum Version | Recommended |
|---|---|---|
| CMake | 3.21 | Latest |
| C++ Compiler | C++20 support | Clang 19.1.1, GCC 14, or MSVC 2022 |
| Rust | stable | Latest stable |
| Protocol Buffers | 3.x | Latest |
| Python (for docs) | 3.8 | 3.12+ |
Verification¶
After installation, verify all dependencies:
cmake --version # Should be 3.21+
ninja --version # Any version
rustc --version # Should show stable
cargo --version # Should match rustc
protoc --version # Should be 3.x+
# Compiler check
clang++ --version # 19.1.1+ (Linux/macOS)
# or
g++ --version # 14+ (Linux)
# or
cl # MSVC 2022 (Windows)
Next Steps¶
Once dependencies are installed, proceed to Building.
Package Manager Notes¶
- Linux: Commands shown for Debian/Ubuntu (apt). For other distributions:
- Fedora/RHEL: Replace
aptwithdnf - Arch: Replace
aptwithpacman - macOS: Requires Homebrew
- Windows: Requires Chocolatey
Troubleshooting¶
CMake can't find dependencies¶
Ensure dependency binaries are on your PATH:
Rust components missing¶
Install required Rust components:
Protocol Buffers not found¶
Verify protoc is installed and on PATH:
If issues persist, see the GitHub Issues or join discussions.