Installing HDDS on Linux
This guide covers installing HDDS from source on Linux.
Prerequisites
- Rust 1.75+ (install via rustup)
- Git
- GCC/Clang (for C/C++ bindings, optional)
# Install Rust (if not already installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
# Verify Rust version
rustc --version # Should be 1.75.0 or higher
Clone and Build
# Clone the repository
git clone https://git.hdds.io/hdds/hdds.git
cd hdds
# Build in release mode
cargo build --release
# Run tests to verify
cargo test
Using HDDS in Your Project
Add HDDS as a path dependency in your project's Cargo.toml:
[dependencies]
hdds = { path = "/path/to/hdds/crates/hdds" }
With optional features:
[dependencies]
hdds = { path = "/path/to/hdds/crates/hdds", features = ["xtypes", "security"] }
Available Features
| Feature | Description |
|---|---|
xtypes | XTypes type system (default) |
security | DDS Security 1.1 support |
tcp-tls | TLS encryption for TCP transport |
cloud-discovery | AWS/Azure/Consul discovery |
k8s | Kubernetes discovery |
rpc | DDS-RPC Request/Reply |
telemetry | Metrics collection |
Code Generator (hdds_gen)
# Clone hdds_gen
git clone https://git.hdds.io/hdds/hdds_gen.git
cd hdds_gen
# Build and install
cargo build --release
# Add to PATH (optional)
export PATH="$PATH:$(pwd)/target/release"
# Verify
./target/release/hdds_gen --version
Verify Installation
# From the hdds directory, run the examples
cargo run --release --example hello_world
# Or run the test suite
cargo test --release
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
"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
- Hello World Rust - Your first HDDS application
- hdds_gen Overview - Code generator usage