Installing HDDS on Windows
This guide covers installing HDDS from source on Windows 10 and Windows 11.
Prerequisites
- Windows 10 1903+ or Windows 11
- Visual Studio 2019+ with C++ workload (for C/C++ development)
- Rust 1.75+: rustup.rs
- Git
# Install Rust via winget
winget install Rustlang.Rust.MSVC
# Or via rustup
Invoke-WebRequest -Uri https://win.rustup.rs -OutFile rustup-init.exe
.\rustup-init.exe
# 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 = "C:/path/to/hdds/crates/hdds" }
With optional features:
[dependencies]
hdds = { path = "C:/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
cargo build --release
# Add to PATH (optional)
$env:PATH += ";$(Get-Location)\target\release"
# Verify
.\target\release\hdds_gen.exe --version
C/C++ Development
Visual Studio
After building HDDS:
# Build the C bindings
cd C:\path\to\hdds
cargo build --release -p hdds-c
# The library will be at target\release\hdds.dll
Configure project properties:
Include Directories:
C:\path\to\hdds\crates\hdds-c\include
Library Directories:
C:\path\to\hdds\target\release
Linker Input:
hdds.dll.lib
CMake
# Point to your HDDS build
set(HDDS_ROOT "C:/path/to/hdds")
add_executable(myapp main.cpp)
target_include_directories(myapp PRIVATE ${HDDS_ROOT}/crates/hdds-c/include)
target_link_directories(myapp PRIVATE ${HDDS_ROOT}/target/release)
target_link_libraries(myapp PRIVATE hdds)
Configure with:
cmake -B build
cmake --build build --config Release
Verify Installation
# Check version
hdds --version
# Run self-test
hdds self-test
# List interfaces
hdds interfaces
Expected output:
HDDS 1.0.0
Platform: Windows x86_64
RTPS Version: 2.5
Security: Enabled
Self-test: PASSED (12/12 tests)
Network Interfaces:
- Ethernet: 192.168.1.100 (multicast: enabled)
- Loopback: 127.0.0.1 (multicast: disabled)
Windows Firewall Configuration
DDS uses UDP multicast. Configure Windows Firewall:
Using PowerShell (Administrator)
# Allow HDDS through firewall
New-NetFirewallRule -DisplayName "HDDS DDS" `
-Direction Inbound `
-Protocol UDP `
-LocalPort 7400-7500 `
-Action Allow
# Or for your specific application
New-NetFirewallRule -DisplayName "My DDS App" `
-Program "C:\path\to\your\app.exe" `
-Action Allow
Using GUI
- Open Windows Security → Firewall & network protection
- Click Allow an app through firewall
- Click Change settings → Allow another app
- Add your application or allow ports 7400-7500 UDP
Multicast Configuration
Windows supports multicast by default on most networks. Verify:
# Check route table
route print | findstr 239
# If multicast isn't working, try:
route add 239.255.0.0 mask 255.255.0.0 192.168.1.1
VPN and Virtual Adapters
VPNs and virtual network adapters (VMware, VirtualBox, Docker) can interfere with multicast. Try disabling them for testing.
WSL2 Considerations
If using WSL2:
# In WSL2, multicast may require additional configuration
# Use host networking or configure port forwarding
For best performance, use native Windows builds rather than WSL.
Troubleshooting
"DLL not found" Error
# Add HDDS to PATH
$env:PATH += ";C:\Program Files\HDDS\bin"
# Or copy DLLs to application directory
copy "C:\Program Files\HDDS\bin\hdds.dll" .\
"Access Denied" on Ports
Run as Administrator or use ports above 1024.
Multicast Not Working
# Check if multicast is enabled on your adapter
Get-NetAdapter | Get-NetIPInterface | Select-Object InterfaceAlias, InterfaceMetric
# Disable firewall temporarily for testing
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False
Visual Studio Linker Errors
Ensure you're using the correct architecture:
- x64 project →
hdds.libfromlib/x64 - x86 project →
hdds.libfromlib/x86
Next Steps
- Building from Source - Compile HDDS yourself
- Hello World Rust - Your first HDDS application