Skip to main content

Installing HDDS on Linux

This guide covers installing HDDS on common Linux distributions.

Prerequisites

  • Rust 1.75+ (for Rust development)
  • GCC/Clang (for C/C++ bindings)
  • Python 3.10+ (for Python bindings)

Quick Install (Rust)

The fastest way to get started with HDDS in Rust:

# Install the HDDS crate
cargo add hdds

# Or for async support
cargo add hdds hdds-async

Package Manager Installation

Ubuntu / Debian

# Add the HDDS repository
curl -fsSL https://hdds.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hdds.gpg
echo "deb [signed-by=/usr/share/keyrings/hdds.gpg] https://apt.hdds.io stable main" | \
sudo tee /etc/apt/sources.list.d/hdds.list

# Update and install
sudo apt update
sudo apt install hdds libhdds-dev hdds-tools

# Verify installation
hdds --version

Package contents:

PackageDescription
hddsRuntime library
libhdds-devC/C++ headers and pkg-config
hdds-toolsCLI tools (hdds_gen, hdds_viewer)
hdds-pythonPython bindings

Fedora / RHEL

# Add the HDDS repository
sudo dnf config-manager --add-repo https://rpm.hdds.io/hdds.repo

# Install HDDS
sudo dnf install hdds hdds-devel hdds-tools

# Verify
hdds --version

Arch Linux (AUR)

# Using yay
yay -S hdds

# Or using paru
paru -S hdds

# Development headers
yay -S hdds-dev

Cargo Installation (Rust Toolchain)

For Rust development, use Cargo directly:

# Core library
cargo add hdds

# With async support
cargo add hdds hdds-async

# Code generator
cargo install hdds-gen

# Verify
hdds-gen --version

Feature Flags

Enable optional features in your Cargo.toml:

[dependencies]
hdds = { version = "1.0", features = ["async", "security", "shared-memory"] }
FeatureDescription
asyncTokio-based async API
securityDDS Security 1.1 support
shared-memoryZero-copy shared memory transport
iceoryxEclipse iceoryx integration
tracingDistributed tracing support

Python Installation

# Using pip
pip install hdds

# Using pipx (isolated environment)
pipx install hdds

# Verify
python -c "import hdds; print(hdds.__version__)"

With virtual environment

python -m venv .venv
source .venv/bin/activate
pip install hdds

C/C++ Development

After installing libhdds-dev:

# Check pkg-config
pkg-config --cflags --libs hdds

# Example output:
# -I/usr/include/hdds -L/usr/lib -lhdds

# Compile a C program
gcc -o myapp myapp.c $(pkg-config --cflags --libs hdds)

CMake Integration

find_package(hdds REQUIRED)

add_executable(myapp main.cpp)
target_link_libraries(myapp PRIVATE hdds::hdds)

Verify Installation

Run these commands to verify HDDS is working:

# Check HDDS version
hdds --version

# Run built-in self-test
hdds self-test

# List network interfaces
hdds interfaces

Expected output:

HDDS 1.0.0
Platform: Linux x86_64
RTPS Version: 2.5
Security: Enabled

Self-test: PASSED (12/12 tests)

Network Interfaces:
- eth0: 192.168.1.100 (multicast: enabled)
- lo: 127.0.0.1 (multicast: disabled)

Firewall Configuration

DDS uses UDP multicast. Configure your firewall:

# UFW (Ubuntu)
sudo ufw allow 7400:7500/udp

# firewalld (Fedora/RHEL)
sudo firewall-cmd --permanent --add-port=7400-7500/udp
sudo firewall-cmd --reload

# iptables
sudo iptables -A INPUT -p udp --dport 7400:7500 -j ACCEPT

Multicast Configuration

Ensure multicast routing is enabled:

# Check multicast support
ip maddr show

# Add multicast route if needed
sudo ip route add 239.255.0.0/16 dev eth0

Troubleshooting

Common Issues

"Cannot find libhdds"

# Add library path
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

# Or update ldconfig
sudo ldconfig

"Multicast not working"

# Check if multicast is enabled on your interface
ip link show eth0 | grep MULTICAST

# Enable if needed
sudo ip link set eth0 multicast on

"Permission denied on /dev/shm"

# For shared memory transport
sudo chmod 1777 /dev/shm

Next Steps