refactor(server): migrate mod.rs modules to path-style files

This commit is contained in:
Serkyo 2026-07-09 19:47:00 +02:00
parent b6687dc82b
commit 54d2f522cc

13
crates/server/src/save.rs Normal file
View file

@ -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};