notify

Cross-platform filesystem notification library for Rust

Library
Cargo
v9.0.0-rc.5
3,457 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

TypeScript
54%
MIT

Anarlog

AI Assistants · Note Taking · Productivity

9,404

Anarlog is an open-source, local-first AI meeting notetaker that records, transcribes, and summarizes meetings entirely on your device — no cloud lock-in, no mandatory account, and every note saved as a plain markdown file you own forever.

View details
86
Repo Health
77
Technical
68
Dependency
Built with
TypeScript 54%
Rust 34%
Updated 4 days ago
TypeScript
54%
MIT

Anarlog

AI Assistants · Note Taking · Productivity

9,404

Anarlog is an open-source, local-first AI meeting notetaker that records, transcribes, and summarizes meetings entirely on your device — no cloud lock-in, no mandatory account, and every note saved as a plain markdown file you own forever.

View details
86
Repo Health
77
Technical
68
Dependency
Built with
TypeScript 54%
Rust 34%
Updated 4 days ago
Swift
62%
GPL 3.0

cmux

AI Development · Developer Tools

27,452

A native, Ghostty-based macOS terminal with vertical tabs, agent-aware notifications, and a scriptable browser built for running many parallel AI coding agent sessions instead of juggling tmux panes.

View details
84
Repo Health
81
Technical
69
Dependency
Built with
Swift 62%
Rust 13%
Updated 4 days ago
Rust
52%
Apache 2.0

cocoindex

AI Development · Data Engineering

11,607

An incremental data indexing engine that keeps AI agent context perpetually fresh by reprocessing only what changed.

View details
87
Repo Health
85
Technical
65
Dependency
Built with
Rust 52%
Python 48%
Updated 4 days ago
TypeScript
64%
Other

Epicenter

Developer Tools · Knowledge Management · Note Taking

4,808

A local-first monorepo led by Whispering, an open-source speech-to-text app, built on an MIT toolkit that turns your data into plain Markdown and SQLite files you own instead of a database you rent.

View details
88
Repo Health
90
Technical
64
Dependency
Built with
TypeScript 64%
HTML 13%
Svelte 13%
Updated 5 days ago
TypeScript
90%
Other

FastGPT

AI Agents · AI Development

29,758

Build, debug, and deploy knowledge-based AI agents with a visual workflow editor, RAG retrieval, and support for any OpenAI-compatible LLM.

View details
93
Repo Health
84
Technical
66
Dependency
Built with
TypeScript 90%
Updated 4 days ago
TypeScript
90%
Other

FastGPT

AI Agents · AI Development

29,758

Build, debug, and deploy knowledge-based AI agents with a visual workflow editor, RAG retrieval, and support for any OpenAI-compatible LLM.

View details
93
Repo Health
84
Technical
66
Dependency
Built with
TypeScript 90%
Updated 4 days ago
Rust
88%
GPL 2.0

Fresh

Code Editors · Developer Tools

9,052

A zero-configuration terminal text editor with familiar keybindings, full mouse support, LSP-powered IDE features, and a built-in orchestrator for running multiple coding agents in parallel worktrees.

View details
86
Repo Health
88
Technical
71
Dependency
Built with
Rust 88%
Updated 5 days ago
Rust
95%
MIT

Fyrox

Game Development

9,568

A production-ready 2D/3D game engine written in Rust with a built-in scene editor, physics, and hot-reloading game scripts

View details
85
Repo Health
79
Technical
68
Dependency
Built with
Rust 95%
Updated 5 days 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