squib-snapshot 0.2.0

Squib snapshot subsystem: bitcode state file, sparse memory file, dirty-page tracking
Documentation

squib-snapshot — bitcode state file, sparse memory file, dirty-page tracking.

Implements Phase 5 of the squib roadmap. The crate is split into:

  • [error] — wire-stable [SnapshotError] (I-RC-8 in 11 § 7).
  • [state] — MicrovmState and child structs (vCPU, GIC, MMDS, devices).
  • [envelope] — Snapshot<T> outer container with bitcode + CRC64 trailer.
  • [atomic] — D25 temp-file + fsync + rename writer with cross-FS pre-flight check.
  • [memory] — Full / sparse-of-dirty memory-file writer.
  • [dirty] — Box<[AtomicU64]> dirty bitmap + adaptive heuristic (D11 + D21).
  • [mod@save] / [mod@load] — high-level orchestrators that tie the pieces together.

Cross-references: 16-snapshots.md, 10-data-model.md § 5–6, 11-runtime-core. md § 6, 99-key-decisions.md § D5, D11, D21, D25.

Quality bar

#![forbid(unsafe_code)] — every public surface is safe Rust. The Mach-exception pager that backs --mem-backend=Uffd lives in the sibling squib-host crate where the unsafe is bounded and reviewed.