Skip to main content

Module watch

Module watch 

Source
Expand description

Debounced filesystem watcher for live re-indexing.

Requires the watch Cargo feature (pulls in notify). The watcher blocks the calling thread until the event channel disconnects.

Strategy: accumulate interesting paths (.md / .rs / .canvas), wait for a quiet period (WatchConfig::debounce), then run a full [WorkspaceIndexer::index_workspace] (content-hash skips unchanged files) which also remaps graph.mmap.

Paths under .brain/, target/, .git/, and entries matching .rustbrainignore (when present) are ignored.

Structs§

WatchConfig
Configuration for watch_workspace.

Functions§

is_indexable
True when the path extension is one rustbrain indexes.
is_under_skipped
True when the path sits under a directory rustbrain never indexes.
watch_workspace
Watch workspace for Markdown / Rust / Canvas changes and re-index + remap.