eclipse-cyclonedds-sys 0.0.3

Rust binding for Eclipse Cyclone DDS
Documentation

Raw FFI Bindings for Eclipse Cyclone DDS

Latest Version Build Status Community Website

Documentation Dependency Status

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:

[dependencies]
eclipse-cyclonedds = "0.0.3"

Use this crate directly for raw FFI integration:

[dependencies]
eclipse-cyclonedds-sys = "0.0.3"

The crate exposes the generated bindings under the Rust library name cyclonedds_sys:

use cyclonedds_sys as sys;

fn main() {
    let domain = sys::DOMAIN_DEFAULT;
    println!("default DDS domain: {domain}");
}

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 cargo build

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:

[dependencies]
eclipse-cyclonedds-sys = { version = "0.0.3", features = ["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.

References