wa-wire-recording 0.1.0

The wa-wire recording container: envelopes at rest, with the provenance that makes them comparable
Documentation
  • Coverage
  • 100%
    134 out of 134 items documented1 out of 71 items with examples
  • Size
  • Source code size: 79.8 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 996.2 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • oxidezap/wa-wire
    6 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • jlucaso1

wa-wire-recording

The RFC-010 recording container: envelopes at rest.

wa-wire-contract specifies one stanza crossing the boundary. This is a sequence of them in a file, plus the claims that decide whether two such files may be compared at all: which adapter, which spec, which dictionary, which traffic.

A container without those claims does not make them absent. It makes them unverifiable, and a comparison runs and reports a verdict anyway.

Truncation is a state, not a failure

The record count lives in a trailer rather than the header, so a writer never has to know its own length before the first byte — which is what lets a ring buffer be a writer at all. An interrupted recording therefore has no trailer, and the reader reports Integrity::Truncated: every complete record is readable, and the file is not comparable.

That is deliberate. The artifact a crash recorder exists to produce is, by definition, the one that was interrupted, and a container that rejected it would fail its most important use while passing every test written against well-formed files.

What it does not do

The trailer's CRC-32 detects damage, not tampering: anything able to rewrite the records can rewrite the checksum, and nothing here is signed. Identity comes from input_digest, which the container carries as opaque bytes and never computes — so the hash function stays the responsibility of whoever produced the traffic.

Written twice

The format has a second implementation in adapters/zapo/src/recording.ts, for the same reason the envelope does: an adapter has to run inside a JavaScript engine, and two descriptions of one format that are only ever tested separately are two formats waiting to diverge. Fixtures written by one are read by the other in cross_language.rs.

Held to the same rules as the rest

Reading never allocates, and wa-wire-alloc-check measures that rather than asserting it. Malformed input is reportable and never a panic, and the mutation sweep in wa-wire-conformance holds that across every decoder here. Walking a 32-record recording carries a time budget.

Testing

cargo test -p wa-wire-recording