icedwright-trace 0.0.1

The icedwright trace format: a deterministic .iwtrace archive of every step a test took, with its writer, reader and comparison
Documentation
//! The icedwright trace format.
//!
//! A trace is a `.iwtrace` zip holding every step a test took:
//!
//! ```text
//! meta.json          format, test, crate, versions, windows, theme, scale, failure, frames dropped
//! steps.jsonl        one Step per line
//! blobs/<hash>.yaml  semantic trees, each stored once
//! blobs/<hash>.png   frames, each stored once
//! source/<file>      the test source files steps point at
//! real.json          real-clock timings, which comparisons skip
//! ```
//!
//! [`TraceWriter`] takes plain values and writes the same bytes for the same steps on every
//! run: instants are offsets from boot, ids are renumbered in order of first appearance, and
//! the archive has fixed timestamps, member order and compression settings. When a trace would
//! pass its size cap, frames are dropped in a fixed order; trees and steps never are.
//! [`TraceReader`] reads it back, and [`compare`] finds where two traces first differ.

#![forbid(unsafe_code)]
#![deny(missing_docs)]

mod archive;
mod blob;
mod budget;
mod compare;
mod config;
mod error;
mod ids;
mod meta;
mod normalise;
mod reader;
mod step;
mod writer;

pub use blob::{BadBlobHash, BlobHash, BlobRef, Media, Png, Yaml};
pub use compare::{Difference, StepChange, StepDifference, compare};
pub use config::{ByteSize, FramePolicy, TraceConfig, TraceMode};
pub use error::TraceError;
pub use ids::{
    RawId, RawSubscriptionId, RawTaskId, RawWidgetId, RawWindowId, StepIndex, SubscriptionOrdinal,
    TaskOrdinal, WidgetOrdinal, WindowOrdinal,
};
pub use meta::{FORMAT, TraceMeta, WindowMeta};
pub use normalise::BootInstant;
pub use reader::TraceReader;
pub use step::{
    Attempt, CanonicalSelector, Captured, RealSpan, RealTiming, RealTimings, SelectorText,
    SourceLocation, Step, StepKind, StepOutcome, TraceEvent, TraceMessage, TraceOrigin, TraceTask,
    TraceTaskChange,
};
pub use writer::{StepBuilder, TraceStart, TraceWriter, WriteSummary};

#[cfg(test)]
mod tests;