1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! # fsys
//!
//! Adaptive file and directory IO for Rust — fast, hardware-aware, multi-strategy.
//!
//! `fsys` is a low-level filesystem abstraction designed for storage engines,
//! databases, and any application that needs predictable, high-performance
//! file IO with explicit control over durability strategy.
//!
//! ## Status
//!
//! This crate is in early development. The public API is not yet stable.
//!
//! ## Goals
//!
//! - **Hardware-aware.** Detect drive type (NVMe, SSD, HDD) and capabilities
//! (PLP, queue depth, optimal block size) at startup. Pick sensible defaults.
//! - **Multi-strategy durability.** Support `fsync`, `fdatasync`, NVMe passthrough
//! flush, and Phantom Buffer modes. Let the caller pick the right tradeoff.
//! - **Adaptive dispatch.** Route single writes through a low-latency solo lane
//! and bulk writes through a group-commit lane. Switching is automatic.
//! - **Cross-platform.** Linux, macOS, Windows. Best path on each.
//! - **Zero magic.** Every strategy is explicit. No hidden buffering, no
//! unexpected flushes, no surprises in the latency tail.
//!
//! ## Non-goals
//!
//! - High-level filesystem features (locking, watch APIs, fancy paths).
//! - Replacing `std::fs` for general use.
//! - Async-runtime integration (this is a synchronous core; async wrappers
//! may live in a separate crate).
/// Library version, matching the crate version.
pub const VERSION: &str = env!;