From 54d2f522cceab7bf88a7e79c690e23b251137c6c Mon Sep 17 00:00:00 2001 From: Serkyo Date: Thu, 9 Jul 2026 19:47:00 +0200 Subject: [PATCH] refactor(server): migrate mod.rs modules to path-style files --- crates/server/src/save.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 crates/server/src/save.rs 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};