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
- Rust
- C
- Python
# Add HDDS to your Cargo.toml
cargo add hdds
use hdds::prelude::*;
fn main() -> Result<()> {
// Create a participant on domain 0
let participant = DomainParticipant::new(0)?;
// Create a topic
let topic = participant.create_topic::<Temperature>("sensor/temp")?;
// Create a publisher and write data
let writer = participant.create_writer(&topic)?;
writer.write(&Temperature { value: 23.5 })?;
Ok(())
}
# Install via apt (Ubuntu/Debian)
sudo apt install libhdds-dev
#include <hdds/hdds.h>
int main() {
hdds_participant_t* participant = hdds_participant_create(0, NULL);
hdds_topic_t* topic = hdds_topic_create(participant, "sensor/temp", "Temperature");
hdds_writer_t* writer = hdds_writer_create(participant, topic, NULL);
Temperature data = { .value = 23.5 };
hdds_writer_write(writer, &data);
return 0;
}
pip install hdds
import hdds
participant = hdds.DomainParticipant(domain_id=0)
topic = participant.create_topic("sensor/temp", Temperature)
writer = participant.create_writer(topic)
writer.write(Temperature(value=23.5))
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?
| Feature | HDDS | FastDDS | CycloneDDS | RTI Connext |
|---|---|---|---|---|
| Language | Pure Rust | C++ | C | C/C++ |
| Memory Safety | Guaranteed | Manual | Manual | Manual |
| Latency | Sub-microsecond | ~1-5 µs | ~2-10 µs | ~1-5 µs |
| Zero-copy | Yes | Partial | Partial | Yes |
| Multi-language | Rust, C, C++, Python | C++, Python | C, Python | C, C++, Java, C#, Python |
| License | Apache 2.0 | Apache 2.0 | Eclipse 2.0 | Commercial |