Skip to main content

Getting Started with HDDS

Welcome to HDDS, a high-performance DDS (Data Distribution Service) middleware written in pure Rust. This guide will help you get started quickly.

Quick Start

# Clone HDDS and install hddsgen
git clone https://git.hdds.io/hdds/hdds.git
git clone https://git.hdds.io/hdds/hdds_gen.git
cd hdds_gen && cargo install --path .
cd ..

# Generate a full project from IDL
echo 'struct Temperature { @key unsigned long sensor_id; float value; };' > temp.idl
hddsgen gen rust temp.idl --example --out-dir ./my-sensor --hdds-path "$(pwd)/hdds/crates/hdds"

# Build and run (two terminals needed: subscriber + publisher)
cd my-sensor
cargo run --bin subscriber & # Terminal 1
cargo run --bin publisher # Terminal 2

Or write it manually:

use hdds::{Participant, QoS, TransportMode};

fn main() -> hdds::Result<()> {
let participant = Participant::builder("my_app")
.domain_id(0)
.with_transport(TransportMode::UdpMulticast)
.build()?;

// Types are generated from IDL by hddsgen
let writer = participant
.topic::<Temperature>("TemperatureTopic")?
.writer()
.qos(QoS::reliable())
.build()?;

writer.write(&Temperature { sensor_id: 1, value: 23.5 })?;
Ok(())
}

What's Next?

Learn the Basics

Understand DDS concepts and RTPS protocol fundamentals.

Install HDDS

Get HDDS installed on Linux, macOS, or Windows.

Build Something

Follow our step-by-step Hello World tutorial.

Why HDDS?

FeatureHDDSFastDDSCycloneDDSRTI Connext
LanguagePure RustC++CC/C++
Memory SafetyGuaranteedManualManualManual
LatencySub-microsecond~1-5 µs~2-10 µs~1-5 µs
Zero-copyYesPartialPartialYes
Multi-languageRust, C, C++, PythonC++, PythonC, PythonC, C++, Java, C#, Python
LicenseApache 2.0Apache 2.0Eclipse 2.0Commercial

Architecture Overview