technical specification

robobus stack

doc
RB-SPEC-001
rev
0.1.0 / 2026-08-22
normative
PROTOCOL.md, shipset.py, native_lib.py
companion
RB-DS-001, RB-FIPS-SIDECAR-001

1. Scope

This specification describes the robobus middleware as implemented in this tree: shared-memory ring, codec and RBX1 frames, protocol adapters, transports, ship-sets, compile fragments, language bindings, and the local operator console. It does not specify a CMVP-validated module (see the FIPS sidecar document). If this page and a README disagree, believe the live census (python3 bench/robobus_census.py) and the named source of truth.

2. Architecture

 ROS 1 / ROS 2 / LSL / MQTT / UDP / field codecs
        |  optional --security <suite>
        v
 +------------------------------------------------------+
 |  robobus shm ring  (mmap seqlock SPMC, little-endian)|
 |  payload: codec frame  or  RBX1 sealed codec frame   |
 +------------------------------------------------------+
        ^                         ^
        | librobobus              | librbcodec (FFI / MCU extract)
        | seal + FLOAT64          | 108 rb_*.c ports
        v                         v
   Python robobus.crypto     34-language identity tests

Layers are independent. Linking librobobus does not give Modbus. Linking librbcodec does not encrypt. librbxport and librbcrypto are bench-only and listed in production exclude_from_sbom.

3. Wire bytes (normative: PROTOCOL.md)

All integers little-endian. Codec serialises IEEE-754 doubles as LE on every host, including big-endian s390x.

3.1 Ring

One mmap file per channel: <dir>/<channel>.ring. Dir: /dev/shm/robobus (Linux), $TMPDIR/robobus (macOS), %TEMP%\robobus (Windows), $PREFIX/tmp (Termux), or $ROBOBUS_DIR. Header 64 bytes, magic ROBOBUS\x01. Slot: u64 seq, u32 length, payload. Single producer; any number of subscribers. start="new" skips frames already in the ring. Lapping a ring is overwrite, not a recv bug.

3.2 Codec frame

u8 type (1 float64[], 2 int32[], 3 utf8, 4 JSON, 5 bytes, 6 schema) + u64 stamp_ns + body. Type 6: schema_id u32 + packed struct.

3.3 RBX1 crypto frame

off 0  4s  "RBX1"
off 4  u8  alg     1=AES-256-GCM  2=ChaCha20-Poly1305 (not FIPS)
off 5  u8  flags
off 6  12  nonce
off 18 ..  ciphertext || 16-byte tag

18-byte header is AEAD associated data. CSfC suite seals twice under two HKDF keys.

3.4 Handshake

Out of band: responder publishes suite, KEM pub, token = Sign(kem_pub), identity pub. Session key = HKDF(ss, salt=H(kem_pub||ct), info="robobus-session"). Transport-agnostic.

4. Host shared-library ABI

macOSLinux / Android ELFWindows
rbcodeclibrbcodec.dyliblibrbcodec.sorbcodec.dll
robobuslibrobobus.dyliblibrobobus.sorobobus.dll
loaderDYLD_LIBRARY_PATHLD_LIBRARY_PATHPATH
cc shared-shared -Wl,-install_name,...-shared-shared (MinGW)
Lua module-bundle -undefined dynamic_lookup-shared -fPIC-shared -fPIC

C# P/Invoke: DllImport("rbcodec") (no suffix). Source: bench/native_lib.py (plat= override for preview).

5. Languages (three different claims)

  1. 34 LANGS - C-ABI codec identity against librbcodec. Laptop skip if toolchain missing; Docker image does not skip.
  2. 14 Schema.render - C, C++, Rust, Go, Java, C#, TypeScript, Python, Julia, MATLAB/Octave, Swift, Kotlin, Ruby, Lua.
  3. 3 packaged - crates.io / npm / Maven (seal+codec, not 108 adapters).

6. Compile fragments

Host FFI compiles every codec unless only fragment sources are passed to cc (operator Compile / robobus shipsets compile).

fragmentmust_havemust_not
spacerb_ccsds_apidModbus, ARINC 429, TLS
icsrb_modbus_crc16CCSDS, ARINC 429
telecomrb_sip_is_response, rb_rtp_version, rb_securertp_label_ckModbus, CCSDS
avionicsrb_a429_labelModbus, CCSDS
privacyrb_tls_legacy_versionModbus, CCSDS

MCU honors RB_ADAPTER_* / RB_TRANSPORT_* in rb_config.h. Lab/csfc/crypto-toe have no codec fragment.

7. Artifact hashing

policyfiles
allSHA-384, SHA-512, SHA3-384, SHA3-512, SHA-256
cnsa20SHA384SUMS + SHA512SUMS only (no SHA-256 in that pack)
fips202SHA3-384 + SHA3-512 only

8. Operator console

python3 operator/server.py binds 127.0.0.1:8765. Allowlisted POST /api/run only. Target selector overrides autodetect for preview of other OS/ISA/MCU/mobile/WASM configs; compile still uses this host ABI. This specification page is part of that site.

GET  /api/host /api/catalog /api/targets /api/target?id=&fragment=
POST /api/run  {"action":"doctor|compile|verify|checksums|census|target|...", "args":{}}