Expand description
Crash-atomic persistence (Frame0File + StateFile) with zero mmap and zero unsafe.
Structs§
- AppBuild
Id - Application build identifier stamped into
frame0.nv02footers for cache invalidation. - Frame0
File - Frame-0
NV02keyframe file (frame0.nv02) + 40-byte little-endian footer. - Frame0
Footer - Frame0
Meta - State
Byte Len - Encoded state-file byte length returned by
StateFile::save. - State
File - Plain atomic-rename state file: 24-byte header
[magic:8, schema:u32, len:u32, xxh64:u64]+ payload, wherexxh64covers both the 16-byte header prefix and the payload bytes. - State
Recovery Stats - State
Save Outcome
Enums§
Constants§
- DEFAULT_
FRAM E0_ FILE_ NAME - DEFAULT_
STATE_ FILE_ NAME - FRAM
E0_ FOOTER_ SIZE - MAX_
FRAM E0_ FILE_ BYTES - Maximum accepted
frame0.nv02size (64 MiB) to bound memory against hostile/corrupt files. - MAX_
STATE_ FILE_ BYTES - Maximum accepted
state.nvpayload size (64 MiB) to bound memory against hostile/corrupt files. - STATE_
FILE_ HEADER_ SIZE - STATE_
FILE_ MAGIC
Functions§
- write_
file_ atomic - Atomically writes
bytestopathvia exclusivecreate_newsibling temp file -> optionalsync_all->rename-> optional parent-directorysync_all.