An idiomatic Rust wrapper for Linux's inotify API, providing safe and convenient file system event monitoring.
inotify-rs is a Rust library that wraps the Linux inotify API, enabling programs to monitor filesystem events like file creation, modification, and deletion. It provides a safe, idiomatic Rust interface to inotify, eliminating common pitfalls associated with raw system calls while maintaining close adherence to the underlying API.
Rust developers building Linux-specific applications that require real-time filesystem monitoring, such as daemons, sync tools, or build systems.
Developers choose inotify-rs for its balance of safety and low-level control—it offers a memory-safe wrapper without abstracting away inotify's power, unlike higher-level cross-platform alternatives.
Idiomatic inotify wrapper for the Rust programming language
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Converts raw inotify system calls into a safe Rust interface, preventing common C errors like buffer overflows, as emphasized in the safe API wrapper feature.
Offers both blocking reads with `read_events_blocking` and async event streams via `StreamExt`, allowing seamless integration with various Rust concurrency models, shown in the examples.
Supports comprehensive watch masks like CREATE, MODIFY, and DELETE for precise monitoring of filesystem activities, enabling developers to filter events without overhead.
Adheres closely to the underlying inotify semantics while adding Rust conveniences, providing low-level control for systems programming without sacrificing safety, as stated in the philosophy.
Exclusive to Linux due to its reliance on the inotify API, making it unusable for cross-platform applications, a limitation openly admitted in the README's notice section.
Developers must understand inotify's quirks, such as event queue overflows and manual buffer management, as the library doesn't abstract these complexities away and points to the inotify man page for guidance.
Lacks built-in functionality for recursive directory monitoring or event coalescing, forcing users to implement these on top, unlike higher-level alternatives like notify recommended in the README.