diff --git a/crates/server/src/save.rs b/crates/server/src/save.rs new file mode 100644 index 0000000..92ce02d --- /dev/null +++ b/crates/server/src/save.rs @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: AGPL-3.0-only + +//! Server-side persistence: the durability layer over the `shared` save format. +//! +//! `shared::save` owns the pure, in-memory framing (the `SYNR` index and `SYNC` records). This +//! module owns the filesystem side: reading a `.region` file into memory, mutating its chunks, and +//! flushing it back to disk crash-safely. The write strategy is a whole-file atomic rewrite +//! (`.tmp` + fsync + rename); the on-disk format is unchanged, so a later slice can switch to an +//! append-in-place strategy without a format change. + +mod region_file; + +pub use region_file::{REGION_SIZE, RegionFile, region_coords, region_path};