Skip to content

v0.2.0

Choose a tag to compare

@andreacorbellini andreacorbellini released this 23 Sep 08:42
· 28 commits to master since this release

New features

  • Added the AtomicWriteFile::directory method to allow accessing the file descriptor of the parent directory, without making any system call (this method is available on all platforms, but it has a meaningful implementation only on Unix).

Unix changes

  • Updated dependency on nix to version 0.29.

  • Sync the parent directory after committing or discarding the temporary file (via fsync(2)). This ensures that changes are persisted and not rolled-back if a crash occurs.

    In the previous releases, syncing the directory was intended to be a step that had to be explicitly performed by the caller if they wanted this behavior, and it was intentionally left out as a performance improvement for those callers that did not care about changes being persisted. However we do realize that callers may not be aware of the importance of this step, hence now it's done automatically.

Breaking changes

  • The unnamed-tmpfile is now disabled by default and needs to be explicitly enabled with features = ["unnamed-tmpfile"] in Cargo.toml. This decision was made to better support processes that run early at boot, and filesystems that have poor support for anonymous temporary files.