Skip to main content

Crate zerodds_zenoh_bridge

Crate zerodds_zenoh_bridge 

Source
Expand description

Crate zerodds-zenoh-bridge. Safety classification: STANDARD.

ZeroDDS ↔ Eclipse Zenoh bridge — no_std + alloc (pure-Rust mapping layer without a zenoh dep) plus the feature-gated zenoh-runtime for the fully functional live bridge path.

Connects a ZeroDDS DomainParticipant with a Zenoh session, so that DDS topics are mapped onto Zenoh key expressions and pumped in both directions.

§Architecture

 DDS-Topic  ────────►  ZeroDDS DataReader
    │                       │
    │                       ▼ on_data
    │                  Bridge::forward
    │                       │
    │                       ▼ zenoh::publisher::put
    │                  Zenoh KeyExpr
    │                       │
    │  ◄────────────────────┤  Zenoh Subscriber
    │                       │
    │                  Bridge::reverse
    │                       │
    │                       ▼ DataWriter::write
    ▼
 DDS-Topic

§Feature gating

  • default — skeleton crate without a zenoh dep. The topic-mapping logic + tests run pure-Rust, so the workspace CI stays without external dependencies.
  • zenoh-runtime — brings zenoh = "1" + tokio. With it, ZenohBridge::start is fully functional.

§QoS mapping (DDS → Zenoh)

DDS QoSZenoh equivalent
Reliability::ReliableReliability::Reliable (Zenoh)
Reliability::BestEffortReliability::BestEffort
Durability::TransientLocalCongestionControl::Block + Priority::DataHigh
Durability::Volatile (default)CongestionControl::Drop
History::KeepLast(n)(Zenoh has no history cache; n>1 ignored)
PartitionKeyExpr prefix (<partition>/<topic>)

§Spec reference

There is no OMG spec for Zenoh bridges. This crate follows the de-facto pattern of ZettaScale’s zenoh-bridge-dds (see https://github.com/eclipse-zenoh/zenoh-plugin-dds), but as a standalone Rust library instead of a plugin.

Structs§

TopicMap
Topic map: bidirectional mapping DDS topic ↔ Zenoh KeyExpr.

Functions§

dds_qos_to_zenoh
Maps a DDS QoS tuple to Zenoh reliability + congestion control.
key_expr_for_topic
Maps a DDS topic name (with optional partition tags) to a Zenoh key expression. Reserved DDS special characters (*, ?, [, ]) are substituted with _ — the Zenoh KeyExpr spec forbids them.