rustorb-dds
A DDS (Data Distribution Service) implementation in Rust, from the rustorb project (日本語).
Status: early. Participants discover each other (SPDP/SEDP) and
exchange samples with reliable or best-effort writers and readers over
UDPv4, with keyed instances, large samples (DATA_FRAG), TRANSIENT_LOCAL,
TRANSIENT and PERSISTENT durability (docs/durability.md), partitions, LIVELINESS and DEADLINE, and WaitSets, conditions
and listeners for the communication statuses, content filtered topics, and requests and replies (DDS-RPC). Hello world works both ways with Cyclone DDS
and Fast DDS, reliable transient-local and liveliness too, with OpenDDS (reliable, keyed,
large samples, TypeLookup), and std_msgs/msg/String both ways
with ROS 2's demo talker and listener, and the add_two_ints service both ways (interop). Which parts of the OMG specifications are done is in
docs/compliance.md. The plan is
rustorb/rustorb#111.
Try the hello world in two terminals:
or from Python (pip install ./python, see python/):
Crates
| Crate | Role | License |
|---|---|---|
rustorb-dds |
The DCPS API (DDS 1.4) | MIT OR Apache-2.0 |
rustorb-rtps |
The wire protocol (DDSI-RTPS 2.5): messages, discovery, writers and readers | MIT OR Apache-2.0 |
rustorb-xtypes |
The type system (DDS-XTypes 1.3): TypeObject, assignability, DynamicData | MIT OR Apache-2.0 |
rustorb-dds-security |
The builtin plugins of DDS Security 1.2 (PKI-DH, Permissions, AES-GCM-GMAC), on RustCrypto; rustorb-dds uses it with the feature security (docs/security.md) |
MIT OR Apache-2.0 |
rustorb-dds-python |
The native module of the Python package rustorb_dds (python/), with PyO3; not published to crates.io |
MIT OR Apache-2.0 |
rustorb-dds-ffi |
The C ABI (include/rustorb/dds.h) the C++, Java, .NET and Ruby bindings are built on (docs/c-abi.md) |
MIT OR Apache-2.0 |
rustorb-dds-corba |
CORBA TypeCodes and anys (rustorb-core) as DDS-XTypes types and DynamicData, and back (docs/corba.md); the only crate here that depends on the ORB |
MIT OR Apache-2.0 |
The C++ binding (cpp/, docs/cpp.md) is header only: the ISO/IEC C++ PSM for DDS (<dds/dds.hpp>) on that C ABI, with types from rustorb-idl -bc++11 -Wbdds_only (MIT OR Apache-2.0).
The Java binding (java/, docs/java.md) is the DDS Java 5 PSM (org.omg.dds) on that C ABI through the FFM API (Java 22 or newer), with types from rustorb-idl -bjava -Wbdds_only (MIT OR Apache-2.0).
The .NET binding (dotnet/, docs/dotnet.md) is the package Rustorb.Dds (.NET 8): the structure of the Java 5 PSM in C# (Omg.Dds.*) on that C ABI through P/Invoke, with types from rustorb-idl -bcsharp -Wbdds_only (MIT OR Apache-2.0).
The Ruby binding (ruby/, docs/ruby.md) is the gem rustorb-dds: the structure of the C++ PSM in Ruby (DDS::*) as a C extension on that C ABI, with types from rustorb-idl -bruby -Wbdds_only (MIT OR Apache-2.0).
OpenRTM-aist 2.0's data ports, connected with its Fast DDS transport, talk with rustorb-dds writers and readers of the same type and QoS (docs/openrtm.md).
The XCDR1/XCDR2 encodings are in rustorb-cdr and the DDS type support
traits in rustorb-typesupport, both in the rustorb repository and shared
with the ORB. The IDL generator is
rustorb-idl. The DDS crates
depend on rustorb-cdr and rustorb-typesupport only (rustorb-dds-corba
alone adds rustorb-core, the ORB); the generator is
GPL-3.0-or-later, and the code it generates is not covered by that license.
Stages
- D0 (in rustorb): XCDR1/XCDR2 in
rustorb-cdr, DDS type support fromrustorb-idl - D1: RTPS messages, SPDP/SEDP, best-effort writers and readers; hello world both ways with Cyclone DDS and Fast DDS
- D2: reliable delivery, DATA_FRAG, keyed instances, History/Durability/Liveliness/Deadline, WaitSet; ROS 2 talker/listener
- D3: TypeObject, assignability, TypeLookup, DynamicData, Python binding
- D4: C++/Java, OpenRTM-aist 2.0, TypeCode ⇄ TypeObject
- D5 (in progress, #55): content-filtered topics, DDS-RPC, shared memory, DDS Security
Clean room
This implementation is written from the OMG specifications (DDS 1.4, DDSI-RTPS 2.5, DDS-XTypes 1.3, DDS Security, IDL4) and black-box interoperability tests with other implementations only. Do not read or copy the source code of other DDS implementations; see CONTRIBUTING.md.
License
MIT OR Apache-2.0, at your option (LICENSE-MIT, LICENSE-APACHE).