refactor(save): delegate atomic writes to craft-atomic

The engine's atomic module keeps its functions and signatures and delegates to craft-libs/craft-atomic (pinned to e9546e19), so every save and export caller is unchanged. write_atomic_with also turns a panicking writer into an error, so its temporary file is removed. Recovery checkpoints and package output keep their own writers, which replace links instead of following them.

On Unix, new files follow the umask and replaced files keep their permissions.
This commit is contained in:
aiongg
2026-10-13 11:56:42 +00:00
parent 91263c912f
commit e81a21e645
6 changed files with 74 additions and 176 deletions
+1
View File
@@ -11,6 +11,7 @@ rust-version = "1.95"
repository = "https://github.com/storytold/designcraft"
[workspace.dependencies]
craft-atomic = { git = "https://github.com/storytold/craft-libs", version = "0.1.0", rev = "e9546e191dd62f2bc1d61eca45dbdc2f1b3c1d8e" }
craft-print = { git = "https://github.com/storytold/craft-libs", version = "0.1.0", rev = "d991bf6792f8ade99c51358bf3c1d902c8cd96b5" }
# internal
designcraft-geom = { path = "crates/geom" }