notify

Cross-platform filesystem notification library for Rust

Library
Cargo
v9.0.0-rc.6
3,480 stars
CC0-1.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
86 /100 Excellent
Development Activity 96
Maintenance 84
Community 64
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
81 /100 Excellent
Architecture 86
Code Quality 84
Innovation 78
Learning Curve 76

notify is a Rust library that watches for filesystem changes across platforms, using the native OS mechanism on each — inotify on Linux, FSEvents or kqueue on macOS, ReadDirectoryChangesW on Windows, and kqueue on the BSDs — with a polling fallback everywhere else. It powers filesystem-watching in widely used tools including cargo-watch, rust-analyzer, watchexec, watchfiles, and Zed.

The project is a small Cargo workspace: alongside the core notify crate it ships notify-types (shared event types), notify-debouncer-mini and notify-debouncer-full (debouncing raw filesystem events into higher-level, coalesced change notifications), and file-id (a helper for stable file identity across renames).

What You Get

  • A unified Watcher API backed by the fastest native mechanism on each platform (inotify, FSEvents, kqueue, ReadDirectoryChangesW)
  • A polling-based fallback watcher for platforms or filesystems without native event support (e.g. network drives)
  • Companion debouncer crates (notify-debouncer-mini, notify-debouncer-full) that coalesce bursts of raw events into stable, higher-level change notifications
  • Shared notify-types event types so downstream crates can consume notify’s event model without depending on the full watcher implementation
  • Battle-tested production usage inside cargo-watch, rust-analyzer, watchexec, watchfiles, and Zed

Common Use Cases

  • Triggering a rebuild or hot-reload when source files change (as cargo-watch and watchexec do)
  • Powering a language server’s file-change detection to keep an in-memory project index up to date
  • Building a file-sync or backup tool that reacts to filesystem changes in near real time
  • Debouncing noisy filesystem events (e.g. many rapid writes during a save) into a single coalesced notification
  • Watching configuration files for changes to trigger a live application reload

Under The Hood

Architecture - The notify crate defines a Watcher trait in src/lib.rs/src/config.rs with platform-specific backend implementations selected at compile time: src/inotify.rs (Linux), src/fsevent.rs and src/kqueue.rs (macOS/BSD), src/windows.rs (ReadDirectoryChangesW), and src/poll.rs as a portable fallback. src/paths.rs normalizes path handling across these differing native APIs so callers see one consistent event shape regardless of backend. The separate notify-debouncer-full/notify-debouncer-mini crates sit on top of this trait, buffering raw events over a time window before emitting deduplicated, semantically richer notifications (e.g. collapsing a temp-file-then-rename sequence into a single “modified” event).

Tech Stack - A Cargo workspace (resolver v2) of six members (notify, notify-types, notify-debouncer-mini, notify-debouncer-full, file-id, examples) targeting Rust 1.88+, using platform-conditional dependencies (inotify, fsevent-sys/kqueue, windows-sys) selected per target OS. Linting is enforced via clippy.toml and dependency licensing/security via deny.toml.

Code Quality - The core notify crate spans roughly 10,800 lines across its platform backends, with a dedicated tests/ directory covering polling-hash behavior, race conditions around directory removal, and event serialization — deliberately targeting the flaky, timing-sensitive edge cases inherent to filesystem-event APIs. The project’s adoption by rust-analyzer, watchexec, and Zed as their filesystem-watching backend is itself a strong quality signal given how latency- and correctness-sensitive those consumers are.

API Design - The single Watcher trait keeps the core API small: construct a watcher, register paths, and receive events over a channel — with debouncing available as an opt-in add-on crate rather than baked into the core, keeping the base dependency light for consumers who want raw events. Cross-platform behavior differences (e.g. what counts as a “modify” event) are documented per-backend rather than fully abstracted away, which is an inherent trade-off of wrapping several genuinely different native APIs.

Used by 23 apps in this directory

Rust
89%
Apache 2.0

Graphite

Code Editors · Design Tools

27,703

A free, open source procedural 2D design tool that unifies vector, raster, motion graphics, and generative art in a single node-based nondestructive workflow.

View details
84
Repo Health
77
Technical
70
Dependency
Built with
Rust 89%
Updated 5 days ago
Rust
89%
Apache 2.0

Graphite

Code Editors · Design Tools

27,703

A free, open source procedural 2D design tool that unifies vector, raster, motion graphics, and generative art in a single node-based nondestructive workflow.

View details
84
Repo Health
77
Technical
70
Dependency
Built with
Rust 89%
Updated 5 days ago
Rust
72%
Other

iii

Developer Tools · Devops

18,854

Compose, extend, and observe every backend service in real time using three primitives: Workers, Functions, and Triggers.

View details
87
Repo Health
85
Technical
65
Dependency
Built with
Rust 72%
TypeScript 16%
Updated 6 days ago
TypeScript
44%
MIT

Kuku

Note Taking

230

A local-first, open-source Markdown knowledge workspace for macOS — plain files, personal wiki and Second Brain workflows, AI-assisted diffs, and encrypted sync, built as an Obsidian alternative.

View details
77
Repo Health
67
Technical
67
Dependency
Built with
TypeScript 44%
Rust 41%
Updated 1 weeks ago
Rust
87%
Apache 2.0

OpenShell

AI Agents · Developer Tools

18,930

The safe, private runtime that lets autonomous AI agents operate in sandboxed environments governed by declarative YAML policies — blocking data exfiltration, credential leaks, and unauthorized network activity before they happen.

View details
84
Repo Health
81
Technical
67
Dependency
Built with
Rust 87%
Updated 5 days ago
Rust
63%
MIT

PostgresML

AI Development · Databases

6,823

Run ML training and LLM inference natively inside PostgreSQL with GPU acceleration — no data movement required.

View details
51
Repo Health
76
Technical
64
Dependency
Built with
Rust 63%
JavaScript 11%
Updated 1 years ago
Rust
63%
MIT

PostgresML

AI Development · Databases

6,823

Run ML training and LLM inference natively inside PostgreSQL with GPU acceleration — no data movement required.

View details
51
Repo Health
76
Technical
64
Dependency
Built with
Rust 63%
JavaScript 11%
Updated 1 years ago
Rust
63%
MIT

Readur

Bookmarks Archiving · File Storage · Knowledge Management

804

A self-hosted document management system that OCRs, indexes, and makes every PDF, scan, and Office file instantly searchable.

View details
83
Repo Health
78
Technical
67
Dependency
Built with
Rust 63%
TypeScript 32%
Updated 5 days ago
Rust
79%
AGPL 3.0

Spacedrive

Collaboration · File Storage

39,292

One file manager for all your devices and clouds — powered by a Virtual Distributed File System built in Rust.

View details
84
Repo Health
84
Technical
63
Dependency
Built with
Rust 79%
TypeScript 18%
Updated 2 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers