cyclonedds
Unofficial project. This crate is a community binding and is not affiliated with or endorsed by the Eclipse Foundation or the Eclipse CycloneDDS project. Eclipse CycloneDDS is an open-source implementation of the OMG DDS specification maintained by the Eclipse Foundation.
Safe, idiomatic Rust API for Eclipse CycloneDDS. This is the crate most users of the cyclonedds-rust workspace should depend on directly.
It wraps the unsafe FFI surface of cyclonedds-rust-sys with safe entity types (DomainParticipant, Publisher, Subscriber, Topic, DataWriter, DataReader), a type-safe QosBuilder, ListenerBuilder, WaitSet/conditions, async iterator support, zero-copy loans, DDS Security, and more. See the workspace README for the full feature list, feature-flag matrix, and build requirements (CMake 3.16+, a C/C++ compiler).
Install
[]
= "2.0"
Minimal example
Topic types are usually defined with #[derive(DdsTypeDerive)]:
use *;
Runnable versions of this pattern live in examples/ (pub.rs, sub.rs, metrics.rs, pub_keyed.rs, sub_async.rs, and more) — run with cargo run -p cyclonedds --example <name>.
Feature flags
default = ["std", "async"].
| Feature | Adds |
|---|---|
std |
The full entity API (requires cyclonedds-rust-sys) |
async |
read_aiter/take_aiter async streams on DataReader, with timeout/cancellation and batched variants |
security |
SecurityConfig and the cyclonedds::security module (needs an OpenSSL-enabled CycloneDDS build) |
tracing |
tracing-instrumented spans on DDS operations |
serde |
SerdeSample<T>, a postcard-encoded DdsType wrapper for any Serialize + DeserializeOwned type |
opentelemetry |
cyclonedds::observability::init_json_logging() (JSON structured logging via tracing-subscriber) |
tokio-console |
tokio-console instrumentation |
no_std |
Pure-Rust DdsType/opcode definitions only, no networking — use with default-features = false |
Full descriptions and rationale: workspace README § Feature Flags.
Documentation
- docs.rs/cyclonedds — generated API reference
- Getting Started
- Type System —
DdsTypederive and attributes - QoS Reference
- Repository
License
MIT — see LICENSE-MIT.