Expand description
Runtime trace hook for cross-runtime parity comparison.
When two emulator backends claim to execute the same fixture, the
runtime emits a structured event stream so an external comparator can
detect the first divergence. This module defines only the hook: the
event/snapshot data types and the TraceSink trait the dispatcher
emits to. The concrete sink — which persists events, snapshots, and
framebuffer dumps — lives outside this crate and is installed via
Runner::set_trace_sink.
Recording is opt-in (no sink installed = no cost) and the runtime is agnostic to how a sink stores what it receives.
Structs§
- Snapshot
Entry - Metadata for one captured framebuffer snapshot; the raw pixels are
stored separately by the sink and referenced by
pixels_file. - Trace
Event - One structured runtime event, tagged with the counters needed to align it against the other backend’s stream.
Enums§
- Trace
Source - Which backend produced a trace artifact, so a comparator can tell the two event streams apart at merge time.
Traits§
- Trace
Sink - Destination for runtime trace output. The dispatcher emits events and
screen snapshots to whichever sink the host installs; the sink decides
how (and whether) to persist them. Errors are surfaced as
Stringand wrapped by the runtime ascrate::error::Error::Trace.