Expand description
Cross-platform storage backend abstraction.
Selects the appropriate driver at runtime: Linux + real ZNS NVMe (non-WSL2) → ZnsDriver (zone-append, 8 writers) Windows + Administrator → WinNvmeDriver (DeviceIoControl passthrough) macOS / iOS → MmapApfsDriver (UMA + APFS clonefile) WSL2 / Linux no-hardware / other → MmapDriver (io_uring-backed mmap fallback)
All drivers implement StorageDriver. open_storage(data_dir) returns
Box<dyn StorageDriver> — callers never need a #[cfg] ladder.
Structs§
- Driver
Capabilities - Mmap
Apfs Driver - Extends
MmapDriverwith Darwin-specific page-management and APFS optimisations: - Mmap
Driver - File-backed mmap driver. Each key maps to a flat file under
root. Reads are served viamemmap2so the OS page cache provides zero-copy semantics for large values. Works on every platform without privileges. - Noop
Filter - WinNvme
Driver - On Windows, raw NVMe Admin and NVM commands are sent via
DeviceIoControl(IOCTL_STORAGE_QUERY_PROPERTY / IOCTL_STORAGE_PROTOCOL_COMMAND)against\\.\PhysicalDriveN. Requires Administrator privileges. - ZnsDriver
- Thin overlay over
ZnsZoneManager. Data is logically stored via the ZNS zone-append path; aMmapDriveroverlay holds small metadata values that don’t need zone-append semantics.
Enums§
Traits§
Functions§
- log_
startup_ diagnostics - Log platform diagnostics at daemon startup. Call once from
mainororchestrator::init. - open_
network_ filter - Open the most capable network filter for this platform.
See
ebpf_filter.rsfor the full platform-specific implementations. - open_
storage - Open the best available storage driver for this platform and hardware.
- running_
under_ wsl2 truewhen running inside WSL2 (a real Linux kernel on Hyper-V).