Expand description
Crate zerodds-transport-uds. Safety classification: STANDARD.
ZeroDDS Unix domain socket transport — container IPC for ZeroDDS.
§Spec
- DDSI-RTPS 2.5 §9.4 — locator kind
LOCATOR_KIND_UDS(vendor-reserved value0x81000001, incrates/rtps/src/wire_types.rs). - ZeroDDS-UDS-Transport 1.0 — vendor-specific transport spec
(filesystem path resolution, abstract namespace, SOCK_DGRAM
wire format),
docs/spec-coverage/zerodds-uds-transport-1.0.md.
§Note on OMG normativity
OMG does not standardize a UDS transport for DDS. Cyclone DDS and Fast DDS have no official UDS transport (they use iceoryx or shared memory). ZeroDDS defines its own variant explicitly as the ZeroDDS-UDS-Transport-1.0 spec.
§Use case
Container IPC when multicast is blocked and POSIX SHM is impractical
cross-container (UID mapping, /dev/shm visibility, SELinux). A
mounted volume with UDS sockets is the realistic Docker/Kubernetes
pattern.
§Implemented (RC1)
SOCK_DGRAMover filesystem sockets (default mode).- Linux abstract-namespace support via the
abstract_dgrammodule (datagrams without a filesystem inode). - Lazy base-directory creation with mode
0700. - TOCTOU-safe socket creation (path.exists + fail-fast).
- Differentiated
io::Errorclassification for diagnostics.
§Cross-vendor interop
Not intended — UDS is intra-container/intra-host IPC. Cross-vendor interop with Cyclone/Fast DDS stays in the UDP/TCP/SHM domain.
§Wire format
Every datagram is a SOCK_DGRAM message; the kernel preserves the
message boundaries. Default path resolution: 16-byte Locator
address → <base_dir>/<lowercase-hex>.sock. Default base_dir =
/tmp/zerodds/uds.
§Safety / unsafe scope
The default DGRAM module (lib.rs) is safe-only (std::os::unix::net::UnixDatagram).
The Linux-only abstract_dgram module uses libc::sendto/libc::recvfrom
plus raw sockaddr_un construction for the abstract namespace — it
contains limited unsafe blocks documented with SAFETY comments.
Modules§
- abstract_
dgram SOCK_DGRAMwith abstract namespace (Linux-only, T5). UDSSOCK_DGRAMwith abstract namespace — Linux-only, containerized-IPC-optimized (WP 2.0b T5).
Structs§
- UdsConfig
- Configuration for opening a
UdsTransport. - UdsTransport
- UDS-based transport bound to a specific 16-byte locator ID.
Constants§
- DEFAULT_
BASE_ DIR - Default base directory for UDS sockets.
- DEFAULT_
MAX_ DATAGRAM - Maximum UDS datagram size we accept on receive. Linux default
wmem_maxis 212992 bytes; we cap a bit below to stay under the typical kernel limit and match the UDP-transport recv-buffer size.
Functions§
- socket_
path - Renders a locator ID (16 bytes) to a filesystem path under
base_dir.