Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

RMW API

The RMW (ROS middleware) vtable is the porting boundary between nano-ros and a concrete pub/sub transport (zenoh-pico, XRCE-DDS, Cyclone DDS, uORB, …). RMW is internal — user applications use the Rust / C / C++ APIs, not the vtable directly.

Canonical reference

The C vtable nros_rmw_vtable_t is the source of truth. Every function pointer’s brief, parameter docs, ownership rules (buffer-borrowed vs caller-owned), blocking / non-blocking classification, return-code conventions, and lifetime contract for loaned slots live in the Doxygen output.

SurfaceLink
rmw-cffi Doxygen (canonical)HTML · header

To regenerate locally:

just doc-rmw-cffi   # produces target/doxygen/rmw-cffi/

This page does not duplicate the interface specification — read the Doxygen for that.

Reference implementations

Concrete backends. Each crate’s README.md walks the implementation; the source is the worked example to copy.

BackendSourceNotes
zenoh-picopackages/zpico/nros-rmw-zenohDefault. C transport via zenoh-pico. Native zero-copy publish via z_bytes_from_static_buf.
micro-XRCE-DDS-Clientpackages/xrce/nros-rmw-xrceC-only shim; agent-based.
Cyclone DDSpackages/dds/nros-rmw-cycloneddsC++ shim; standalone CMake project.
PX4 uORBpackages/px4/nros-rmw-uorbTyped-trampoline registry over PX4 uORB.

The zenoh-pico shim is the canonical reference port.

Writing a custom backend