#watch #events

rolldown-notify-debouncer-full

notify event debouncer optimized for ease of use

10 releases

Uses new Rust 2024

0.7.4 Dec 25, 2025
0.7.3 Dec 19, 2025
0.7.1 Nov 25, 2025
0.6.4 Nov 23, 2025
0.6.0 Oct 16, 2025

#916 in Filesystem

Download history 1518/week @ 2025-10-14 1696/week @ 2025-10-21 1869/week @ 2025-10-28 1715/week @ 2025-11-04 3026/week @ 2025-11-11 2552/week @ 2025-11-18 1695/week @ 2025-11-25 2285/week @ 2025-12-02 3129/week @ 2025-12-09 3464/week @ 2025-12-16 2688/week @ 2025-12-23 2279/week @ 2025-12-30 2947/week @ 2026-01-06 4308/week @ 2026-01-13 3801/week @ 2026-01-20 3164/week @ 2026-01-27

14,902 downloads per month
Used in 5 crates (3 directly)

MIT/Apache

470KB
10K SLoC

A debouncer for [notify] that is optimized for ease of use.

  • Only emits a single Rename event if the rename From and To events can be matched
  • Merges multiple Rename events
  • Takes Rename events into account and updates paths for events that occurred before the rename event, but which haven't been emitted, yet
  • Optionally keeps track of the file system IDs all files and stitches rename events together (macOS FS Events, Windows)
  • Emits only one Remove event when deleting a directory (inotify)
  • Doesn't emit duplicate create events
  • Doesn't emit Modify events after a Create event

Installation

[dependencies]
notify-debouncer-full = "0.5.0"

In case you want to select specific features of notify, specify notify as dependency explicitly in your dependencies. Otherwise you can just use the re-export of notify from debouncer-full.

notify-debouncer-full = "0.5.0"
notify = { version = "..", features = [".."] }

Examples

use notify_debouncer_full::{notify::*, new_debouncer, DebounceEventResult};

// Select recommended watcher for debouncer.
// Using a callback here, could also be a channel.
let mut debouncer = new_debouncer(Duration::from_secs(2), None, |result: DebounceEventResult| {
    match result {
        Ok(events) => events.iter().for_each(|event| println!("{event:?}")),
        Err(errors) => errors.iter().for_each(|error| println!("{error:?}")),
    }
}).unwrap();

// Add a path to be watched. All files and directories at that path and
// below will be monitored for changes.
debouncer.watch(".", WatchMode::recursive()).unwrap();

Features

The following crate features can be turned on or off in your cargo dependency config:

  • serde passed down to notify-types, off by default
  • web-time passed down to notify-types, off by default
  • crossbeam-channel passed down to notify, off by default
  • flume passed down to notify, off by default
  • macos_fsevent passed down to notify, off by default
  • macos_kqueue passed down to notify, off by default
  • serialization-compat-6 passed down to notify, off by default

Caveats

As all file events are sourced from notify, the known problems section applies here too.


Notify Debouncer Full

» Docs

A debouncer for notify that is optimized for ease of use.

  • Only emits a single Rename event if the rename From and To events can be matched
  • Merges multiple Rename events
  • Takes Rename events into account and updates paths for events that occurred before the rename event, but which haven't been emitted, yet
  • Optionally keeps track of the file system IDs all files and stitches rename events together (FSevents, Windows)
  • Emits only one Remove event when deleting a directory (inotify)
  • Doesn't emit duplicate create events
  • Doesn't emit Modify events after a Create event

Features

  • crossbeam-channel passed down to notify, off by default

  • flume passed down to notify, off by default

  • serialization-compat-6 passed down to notify, off by default

Dependencies

~5–9.5MB
~92K SLoC