I ported fsearch to Windows: whole-disk file search in Rust, ~1 ms name queries over 5M files
retained text
I’ve been working on **Scry**, a Windows port of [fsearch](https://github.com/noahdunnagan/fsearch) by Noah Dunnagan (macOS, MIT). It indexes every file and folder on your fixed drives and answers as you type: a search bar on Alt+Shift+Space, a CLI, and a JSON-over-named-pipe API. Numbers from my laptop: i7-11850H, NVMe, Defender on, 5.08M files and folders on C:, a busy dev machine. Name queries are `scry bench` medians over 20 runs. ||| |:-|:-| |one word (`invoice`)|0.5 ms| |with a typo (`mian.rs` finds main.rs)|1.2 ms| |two words (`src main`)|11 ms| |with a filter (`ext:pdf invoice`)|0.07 ms| |a new, renamed or deleted file is searchable|\~0.1 s| |search inside files, literal / regex (warm)|2–10 ms / \~60 ms| |first crawl of the whole drive|50–80 s, once| |memory|\~22 MB private, plus a 190 MB index mmap’d from disk| How it gets there (the index design is Noah’s; the Windows side is new): * **Crawl:** each folder is opened relative to its parent’s handle (`NtOpenFile`) and listed in bulk with `GetFileInformationByHandleEx`, so names, sizes and times come in a few calls per folder, with no per-file stat. 16 reads are in flight. * **Index:** one flat mmap’d blob, written folder by folder in depth-first order, so every folder’s subtree is a contiguous range: `in:C:\Projects` is a range bound, not a filter. Names are interned and each distinct name is scored once per query. * **Staying live:** `ReadDirectoryChangesW` on each drive root. A change names a folder, which is relisted and diffed. After a restart, the NTFS change journal (readable without admin) says which folders changed. * **Inside files:** a trigram index of your text files. Matches are re-read from disk, so they’re never stale. * **Deps:** windows-sys, rayon, memchr, memmap2, regex and serde. No async runtime. The UI is raw Win32: the search bar, the tray icon, and the folder picker through a hand-rolled COM vtable call. It installs per user, with no admin rights and no service. The installer and a zip are on the releases page, or `cargo build --release`. It isn’t code-signed yet (I’ve applied for SignPath’s free OSS signing), so SmartScreen will warn. [https://github.com/R-Hatim/scry](https://github.com/R-Hatim/scry). Feedback on the index layout or the crawler is very welcome.
document fetched 2026-10-14 00:40 · canonical https://reddit.com/r/ClaudeCode/comments/1x52ti3/i_ported_fsearch_to_windows_wholedisk_file_search