Raw FFI Bindings for Eclipse Cyclone DDS
Raw Rust FFI bindings for Eclipse Cyclone DDS.
This crate is the low-level bindgen layer used by
eclipse-cyclonedds. Most applications should depend on
eclipse-cyclonedds, which provides the safe Rust API, topic support, QoS
builders, readers, writers, waitsets, and sample handling.
Depend on eclipse-cyclonedds-sys directly only when you need access to the C
API surface itself.
Quick Start
For normal DDS applications, add the main binding:
[]
= "0.0.3"
Use this crate directly for raw FFI integration:
[]
= "0.0.3"
The crate exposes the generated bindings under the Rust library name
cyclonedds_sys:
use cyclonedds_sys as sys;
Direct use of these bindings follows the safety contract of the Cyclone DDS C
API. Prefer the safe eclipse-cyclonedds crate unless you specifically need raw
FFI.
Linking Cyclone DDS
By default, this crate expects the Cyclone DDS C library and headers to be
available on the system. The build script links against ddsc and generates
bindings from wrapper.h.
If Cyclone DDS is installed outside the system search paths, set
CYCLONEDDS_HOME to the installation prefix:
CYCLONEDDS_HOME=/opt/cyclonedds
The build script will then look for headers under $CYCLONEDDS_HOME/include and
libraries under $CYCLONEDDS_HOME/lib or $CYCLONEDDS_HOME/lib64.
To build Cyclone DDS from the sources bundled with this crate, enable the
vendored feature:
[]
= { = "0.0.3", = ["vendored"] }
It requires cmake and libclang to be available.
Generated Bindings
Bindings are generated at build time with bindgen and included from Cargo's
OUT_DIR. It contains raw pointers, C layout types, platform-specific
definitions, and functions that are unsafe to call without satisfying the C API
preconditions.
See the main crate documentation for the safe ergonomic Rust API.
Minimum Supported Rust Version
For now, the MSRV is the latest stable Rust version at the time of release.