zerodds-foundation 1.0.0-rc.1

ZeroDDS foundation primitives: hot-path stack buffer, wire-integrity hashes (CRC-32C / CRC-64-XZ / MD5), structured observability events + sinks, tracing spans + histograms, lock-free RCU cell. Pure-Rust no_std.
Documentation
  • Coverage
  • 100%
    112 out of 112 items documented2 out of 59 items with examples
  • Size
  • Source code size: 69.25 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.81 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 23s Average build duration of successful builds.
  • all releases: 23s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • zero-objects/zero-dds
    2 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • SandraK82

zerodds-foundation

License: Apache-2.0 docs.rs

Foundation-Layer-Primitive für den ZeroDDS-Stack. Pure-Rust, no_std-tauglich, forbid(unsafe_code). Safety classification: SAFE.

Was ist drin

  • Stack-BufferPoolBuffer<CAP> mit fester Kapazität für Hot-Path-Allokationen ohne Heap-Touch; explizite PoolBufferError::Overflow statt Panic.
  • Wire-Integrity-Hashescrc32c (RFC 4960 App. B), crc64_xz (ECMA-182 / XZ utils), md5 (RFC 1321). Pure-Rust ohne externe Crypto-Crate-Abhängigkeit. Genutzt in DDSI-RTPS HEADER_EXTENSION-Checksum, XTypes EquivalenceHash, KeyHash und Group-Digest.
  • Observability — strukturierte Event/Component/Level plus Sink-Trait für beliebige Konsumenten. NullSink, StderrJsonSink, VecSink als Reference-Implementations.
  • TracingSpan/SpanContext/TraceId/SpanId plus Histogram für grobgranulares Tracing; OTLP-Export im zerodds-observability-otlp-Crate.
  • RCURcuCell<T> als Copy-on-Write-Container für wenig-Schreib/viel-Lese-Patterns ohne unsafe (Mutex-protected Reference-Cell, Arc<T>-Snapshots).

Schichten-Position

Layer 0 (Foundation). Hat keine Dependencies auf andere ZeroDDS-Crates. Wird von Layer 1 (Primitives: cdr, qos, types) und allen höheren Schichten verwendet.

Quickstart

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

// CRC-32C über ein RTPS-Datagramm.
let payload = b"\x52\x54\x50\x53\x02\x05\x01\x0F";
let checksum = crc32c(payload);

// Hot-Path-Buffer mit fester Kapazität.
let mut buf: PoolBuffer<256> = PoolBuffer::new();
buf.extend_from_slice(payload).unwrap();

// Overflow ist explizit, kein Panic.
let mut tiny: PoolBuffer<4> = PoolBuffer::new();
assert_eq!(
    tiny.extend_from_slice(payload),
    Err(PoolBufferError::Overflow)
);

Feature-Flags

Feature Default Zweck
std Aktiviert RcuCell, StderrJsonSink, VecSink. Implies alloc.
alloc ✅ (via std) Aktiviert observability + tracing + MD5 mit beliebiger Eingabelänge.
safety Reserviert für zukünftige Safety-Build-Constraints.

Ohne Features (default-features = false): nur PoolBuffer, crc32c, crc64_xz, md5 (no_std-MD5-Pfad ist auf 56 Byte Eingabe limitiert).

Stabilität

Alle pub-Items sind ab 1.0.0 stabil; Breaking-Changes erfordern Major-Version-Bump.

Tests

cargo test -p zerodds-foundation

Lizenz

Apache-2.0. Siehe LICENSE.

Siehe auch