Installing HDDS on macOS
This guide covers installing HDDS on macOS (Intel and Apple Silicon).
Prerequisites
- macOS 12+ (Monterey or later)
- Xcode Command Line Tools:
xcode-select --install - Homebrew (recommended): brew.sh
Quick Install (Homebrew)
The easiest way to install HDDS on macOS:
# Add the HDDS tap
brew tap hdds/hdds
# Install HDDS
brew install hdds
# Verify installation
hdds --version
This installs:
- HDDS runtime library
- C/C++ headers
- CLI tools (hdds_gen, hdds_viewer)
- Python bindings
Cargo Installation (Rust)
For Rust development:
# Ensure Rust is installed
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Add HDDS to your project
cargo add hdds
# Install CLI tools
cargo install hdds-gen
# Verify
hdds-gen --version
Feature Flags
[dependencies]
hdds = { version = "1.0", features = ["async", "security"] }
Apple Silicon
HDDS is fully native on Apple Silicon (M1/M2/M3). No Rosetta needed.
Python Installation
# Using pip
pip3 install hdds
# Using Homebrew Python
brew install python
pip3 install hdds
# Verify
python3 -c "import hdds; print(hdds.__version__)"
C/C++ Development
After installing via Homebrew:
# Check pkg-config
pkg-config --cflags --libs hdds
# Compile a C program
clang -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
# Check version
hdds --version
# Run self-test
hdds self-test
# List interfaces
hdds interfaces
Expected output:
HDDS 1.0.0
Platform: macOS arm64
RTPS Version: 2.5
Security: Enabled
Self-test: PASSED (12/12 tests)
Network Interfaces:
- en0: 192.168.1.100 (multicast: enabled)
- lo0: 127.0.0.1 (multicast: disabled)
macOS-Specific Configuration
Firewall
macOS Firewall may block DDS traffic. Allow it:
- Open System Preferences → Security & Privacy → Firewall
- Click Firewall Options
- Add your application or allow incoming connections
Or via command line:
# Disable firewall for testing (not recommended for production)
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate off
Multicast
macOS supports multicast by default. Verify:
# Check multicast route
netstat -rn | grep 239
# If missing, add route
sudo route add -net 239.255.0.0/16 -interface en0
Sleep Prevention
For long-running DDS applications:
# Prevent sleep while app runs
caffeinate -i ./my_dds_app
Troubleshooting
"Library not loaded" Error
# Set library path
export DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH
Multicast Not Working
# Check interface multicast capability
ifconfig en0 | grep MULTICAST
# Check firewall
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --listapps
Apple Silicon Compatibility
HDDS is native ARM64. If you see Rosetta warnings:
# Verify architecture
file $(which hdds)
# Should show: Mach-O 64-bit executable arm64
Next Steps
- Windows Installation - Install on Windows
- Hello World Rust - Your first HDDS application