Cargo Features
FSYS has no features set by default.
[dependencies]
fsys = { version = "1.1.0", features = ["async", "stress", "fuzz", "tracing", "oom_inject", "spdk"] }
FEATURES
- async
-
Async layer (locked decision D-1 in
.dev/DECISIONS-0.6.0.md). Adds_asyncsiblings to every sync method viatokio::task::spawn_blocking; async batch ops viatokio::sync::oneshot. Pulls in tokio'srt,rt-multi-thread,sync,macrosfeatures.Enables tokio
Tokio runtime — gated behind the
asyncfeature flag. Feature set rationale (locked decision D-10 in.dev/DECISIONS-0.6.0.md):rt+rt-multi-thread: required forspawn_blockingand#[tokio::test(flavor = "multi_thread")]for batch tests.sync: required fortokio::sync::oneshot(async batch response channel per locked decision D-5).macros: required for#[tokio::test].fswas dropped in 0.6.0 — fsys's async layer usesspawn_blockingagainst the sync core, never tokio's fs primitives.
Affects
fsys::async_io… - stress
-
Stress / soak test harnesses (locked decision D-7). Tests gated behind this flag run for the full 1-hour duration; without the flag they compile but skip the long-running body. CI nightly enables this for full-duration validation; dev iteration uses short validation runs.
- fuzz
-
Fuzz harness wiring. Compile-only flag — actual fuzz target binaries live in the
fuzz/directory and usecargo-fuzz. This flag exists so library code that supports fuzz instrumentation can be conditionally enabled without it bloating release builds. - tracing
-
Opt-in
tracinginstrumentation. Adds spans + events on the write / read / journal hot paths. Off by default — thetracingmacros compile to no-ops when the dep is absent, so there's zero overhead for non-tracing builds. Enable this in production observability environments wheretracingsubscribers (tokio-console, OpenTelemetry, etc.) are already wired.Enables tracing
Optional structured-event instrumentation. Gated behind the
tracingfeature flag; when off, the dep isn't pulled in.tracing's macros (trace_span!,debug!, etc.) compile to no-ops in the absence of the dep — fsys's own code uses them unconditionally inside#[cfg(feature = "tracing")]blocks so the no-op-on-absent-feature property is enforced by the type system, not just convention. - oom_inject
-
0.9.7 H-9 / H-7 — internal test-hooks feature. Replaces the system global allocator with an OOM-injecting one that tests can program (via thread-local size threshold) to fail allocs above a target size. NEVER enable in production builds — every allocation goes through an extra dispatch + threshold check. The feature is here to make the integration test
tests/oom_injection.rscompileable; CI runs it as a separate matrix entry with--features oom_injectand the production matrix never sees it.Affects
fsys::test_support… - spdk
-
1.1.0 — SPDK (Storage Performance Development Kit) backend for the journal substrate. Kernel-bypass NVMe access on Linux server workloads with pre-allocated hugepages, IOMMU, and unbound NVMe devices. The backend implementation lives in the companion crate
fsys-spdk(separate to keep DPDK / C-binding weight off users who don't need it). With this feature OFF,Method::Spdkis present in the public enum but selecting it returnsError::FeatureNotEnabled. With this feature ON, fsys depends onfsys-spdkand the SPDK backend becomes selectable on Linux when the capability probe reportsspdk_eligible = true.In 1.1.0 the
fsys-spdkcrate is in scaffold state — the feature is wired through the public API surface (capability cache, error variants,Method::Spdk, builder methods, observability accessors) so 1.1 consumers can write code against the 1.x-stable interface today, but selecting the backend on Linux will returnError::SpdkUnavailableuntil the implementation lands. Thefsys-spdkcompanion crate is published separately; seedocs/SPDK.mdfor the setup requirements and rollout.
Features from optional dependencies
DEPENDENCIES