Skip to main content

Crate fmf_core

Crate fmf_core 

Source
Expand description

fmf-core — the entire engine logic of find-my-files.

This crate is a pure library: the FFI surface (fmf-ffi) and the dev CLI (fmf-cli) must not contain logic of their own. See docs/ARCHITECTURE.md for the canonical contract this crate fulfills.

Modules§

diag
Process-wide diagnostics: capture every WARN+ tracing event and panic.
engine
Multi-volume engine assembly.
index
In-memory per-volume index: struct-of-arrays, two string pools with shared offsets, FRN map, and pre-sorted permutations for instant sorting (docs/ARCHITECTURE.md).
metrics
Engine observability: per-operation traces, ring buffers of recent activity, and log2-bucket latency histograms.
mft
Initial full-volume index source: raw $MFT scan via ntfs-reader. Holds the measurement spike (spike_scan) and the whole-$MFT reference scanner used as the streaming scanner’s equivalence gate.
query
Query engine: text → AST → compiled matchers → parallel scan → materialized, sort-ordered result (docs/ARCHITECTURE.md).
scan
Streaming $MFT scanner (ADR-0011).
usn
USN change-journal tailing: pure record parsing (records), per-FRN reduction + index application (apply), and the OS-facing session (session, Windows only).
wtf8
WTF-8 name encoding and search-oriented case folding.

Macros§

degrade
The one way to record a degraded path (one that recovers via fallback): warn and counter increment done atomically (the syntactic form of “don’t go silent” — ADR-0018).