zerodds-foundation

Layer 0 — Foundation primitives. Pure-Rust no_std + alloc.

zerodds-foundation is the base layer of all ZeroDDS crates. It provides hot-path primitives (stack buffers), wire-integrity hashes (CRC-32C / CRC-64-XZ / MD5), a structured observability event language with sinks, OpenTelemetry-compatible tracing spans, and a lock-free-read RCU container.

Spec anchors

  • RFC 4960 Appendix B — CRC-32C (Castagnoli) for SCTP, here as the wire-integrity hash for the DDSI-RTPS HEADER_EXTENSION messageChecksum (DDSI-RTPS 2.5 §9.4.2.15.2).
  • ECMA-182 / XZ utils — CRC-64-XZ as a second variant of the same HEADER_EXTENSION checksum.
  • RFC 1321 — MD5-128 as a third variant; additionally for XTypes 1.3 EquivalenceHash (§7.3.1.2.1), NameHash (§7.3.4.5), KeyHash (§7.6.8.4 Step 5.2) and RTPS GroupDigest_t (§8.3.5.10).
  • OpenTelemetry — tracing data model (TraceId / SpanId / SpanKind / SpanStatus).

Public API

The full, always-current API reference is generated by rustdoc and published on docs.rs — every type, method and module, source-linked and searchable:

Quick start

use zerodds_foundation::{crc32c, md5, PoolBuffer};

// CRC-32C / MD5
assert_eq!(crc32c(b"123456789"), 0xE3069283);
assert_eq!(md5(b""), [
    0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04,
    0xe9, 0x80, 0x09, 0x98, 0xec, 0xf8, 0x42, 0x7e,
]);

// Stack buffer (no allocations)
let mut buf: PoolBuffer<256> = PoolBuffer::new();
buf.extend_from_slice(b"hello").unwrap();
assert_eq!(buf.as_slice(), b"hello");

Feature flags

Feature Default Purpose
std std re-exports + std Error impl, implies alloc
alloc enables MD5 padding for >56-byte inputs + VecSink
safety Reserved for safety-class hardening (Phase 2)

Strict no_std build:

cargo build -p zerodds-foundation --no-default-features

Stability

All items listed in the public API are semver-stable from 1.0.0-rc.3. Changes happen only via major bumps or with an explicit deprecation cycle.

zerodds-foundation

Layer 0 — Foundation Primitives. Pure-Rust no_std + alloc.

zerodds-foundation ist die Basisschicht aller ZeroDDS-Crates. Sie liefert Hot-Path-Primitives (Stack-Buffer), Wire-Integrity-Hashes (CRC-32C / CRC-64-XZ / MD5), eine strukturierte Observability-Event-Sprache mit Sinks, OpenTelemetry-kompatible Tracing-Spans und einen Lock-Free-Read RCU-Container.

Spec-Anker

  • RFC 4960 Appendix B — CRC-32C (Castagnoli) für SCTP, hier als Wire-Integrity-Hash für DDSI-RTPS HEADER_EXTENSION messageChecksum (DDSI-RTPS 2.5 §9.4.2.15.2).
  • ECMA-182 / XZ utils — CRC-64-XZ als zweite Variante derselben HEADER_EXTENSION-Checksum.
  • RFC 1321 — MD5-128 als dritte Variante; zusätzlich für XTypes 1.3 EquivalenceHash (§7.3.1.2.1), NameHash (§7.3.4.5), KeyHash (§7.6.8.4 Step 5.2) und RTPS GroupDigest_t (§8.3.5.10).
  • OpenTelemetry — Tracing-Datenmodell (TraceId / SpanId / SpanKind / SpanStatus).

Public API

Die vollständige, stets aktuelle API-Referenz wird von rustdoc generiert und auf docs.rs veröffentlicht — jeder Typ, jede Methode, jedes Modul, mit Quell-Links und Suche:

Quick Start

use zerodds_foundation::{crc32c, md5, PoolBuffer};

// CRC-32C / MD5
assert_eq!(crc32c(b"123456789"), 0xE3069283);
assert_eq!(md5(b""), [
    0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04,
    0xe9, 0x80, 0x09, 0x98, 0xec, 0xf8, 0x42, 0x7e,
]);

// Stack-Buffer (no allocations)
let mut buf: PoolBuffer<256> = PoolBuffer::new();
buf.extend_from_slice(b"hello").unwrap();
assert_eq!(buf.as_slice(), b"hello");

Feature-Flags

Feature Default Zweck
std std-Re-Exports + std-Error-Impl, implies alloc
alloc aktiviert MD5-Padding für >56-Byte-Eingaben + VecSink
safety Reserved für Safety-Class-Hardening (Phase-2)

Strikter no_std-Build:

cargo build -p zerodds-foundation --no-default-features

Stabilität

Alle in der Public API gelisteten Items sind ab 1.0.0-rc.3 semver-stabil. Änderungen erfolgen nur über Major-Bumps oder mit explizitem Deprecation-Cycle.