Expand description
Audited unsafe syscall wrappers the pure-Rust crates cannot express.
The rest of the workspace is #![forbid(unsafe_code)]. This crate holds the
rustix calls that require unsafe and cannot be reached through a safe
wrapper: the fs-verity ioctls and a read-only memory map. It is
#![deny(unsafe_code)] at the crate root with a scoped
#![allow(unsafe_code)] on each imp/mmap module, so the audited surface
stays confined. Its only dependency is rustix.
The fs-verity entry points target the parameters ostree uses: SHA-256,
4096-byte blocks, and a zero-length salt. Mmap backs the static-delta
reader, giving it random access to a decompressed part or source object that
lives in a temp file rather than on the heap.
Structs§
- Mmap
- A read-only, private memory map of an open file.
Functions§
- enable_
verity - Enable fs-verity on
fdwith SHA-256, 4096-byte blocks, and a zero salt. - measure_
verity - Measure the fs-verity SHA-256 digest the kernel holds for
fd.