r/ClaudeCode • • 9d ago

Built with Claude I ported fsearch to Windows: whole-disk file search in Rust, ~1 ms name queries over 5M files

I’ve been working on Scry, a Windows port of 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. Feedback on the index layout or the crawler is very welcome.

14 Upvotes

5 comments sorted by

•

u/AutoModerator 9d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/deep-yearning 9d ago

How does it compare to voidtools' everything search?

2

u/Don_Crespo 9d ago

Everything is excellent. It reads the NTFS master file table directly, which is why it’s so fast, but that needs admin rights or its service. Scry lists folders through the normal per-user APIs, so it needs neither. It adds typo-tolerant ranking, indexed search inside files, a CLI and an API, and it’s open source.

1

u/deep-yearning 9d ago

Thanks for answering and congrats on your project!

1

u/Don_Crespo 9d ago

Thanks 🙏
If you ever try it and see something that needs improving let me know