Expand description
Wire envelope: magic, version, header, CRC framing.
Two-archive layout, little-endian:
[ 4 bytes : MAGIC = b"VRPS" ]
[ 1 byte : FORMAT_VERSION ]
[ 4 bytes : header_archive_len u32 ]
[ N bytes : header rkyv archive ]
[ M bytes : body rkyv archive ]
[ 4 bytes : CRC32 over the preceding (9 + N + M) bytes ]The header archive carries paradigm-agnostic metadata
(WireEnvelopeHeader). The body archive belongs to each
paradigm crate — vernier-partial ships and validates body bytes
as opaque &[u8] and never touches paradigm-specific rkyv types.
This keeps the dep DAG flat: paradigm crates depend on
vernier-partial; vernier-partial does not depend on them.
Structs§
- Archived
Wire Envelope Header - An archived
WireEnvelopeHeader - Validated
View - Validated archive view passed to the body callback in
with_validated_envelope. Carries the typed rank id (decoded from the header) plus the unaligned body bytes the callback will rkyv-access itself. - Wire
Envelope Header - Paradigm-agnostic envelope header. Carries everything
vernier-partialneeds to validate cross-rank compatibility: paradigm + sub-kind, parity mode, dataset / params hashes, the shape fingerprint, and the rank id. - Wire
Envelope Header Resolver - The resolver for an archived
WireEnvelopeHeader
Constants§
- FORMAT_
VERSION - Wire-format version. Bumped on any breaking change to the framing
or the archived header layout. Old versions are refused at decode
with
PartialFormatErrorKind::WrongVersion. - MAGIC
- Wire-format magic: ASCII
"VRPS"(vernier partial state). Every valid partial starts with these four bytes.
Functions§
- encode
- Serialize a header + already-archived body into a framed partial blob.
- rank_
id_ from_ archive - Read the typed
rank_idfield off an archived header. Centralized becauseOption<u32>’s archived form isArchivedOption<u32>which needs the.as_ref().map(...)pattern at every read site. - with_
validated_ envelope - Validate a partial blob’s framing + header fields and run a callback on the validated view.