kache-fs
Filesystem measurements, file identity, and native cloning and copying. Built for Kache, a compiler cache for Rust, C/C++ and CUDA, and usable on its own. You decide where files go and when sharing an inode is acceptable; the crate reports what the filesystem does.
What it provides
measure_fileseparates logical length, allocated bytes and private extents. Private allocation isNonewhen the platform cannot tell.probe_forpicks a platform probe for directory walks. APFS uses attribute queries, including bulk directory reads. Linux uses a bounded FIEMAP walk and discards incomplete extent maps.InodeLedgercounts hardlinks once.try_reflinkcreates an independent file that shares blocks where the filesystem supports it. It refuses an existing destination and returns the error so you can fall back.copy_writablecopies bytes with an explicit writable mode.file_identityanddirectory_identityreturn the device and inode (the volume serial and file index on Windows).
Features
| Feature | Default | Adds |
|---|---|---|
serde |
no | Serialization for the measurement types |
staging |
no | StagedFile, a writable temporary file you publish create-only or by replacement |
testing |
no | Filesystem fixtures for your own tests |
StagedFile does not flush file contents or the parent directory when it publishes. Add that yourself where durability matters.
Versioning
Released with Kache under the same version number.
License
Apache-2.0