mirror of
https://github.com/encounter/notify.git
synced 2026-03-30 11:31:42 -07:00
windows-ub
windows::start_read
The primary issue is that `mem::transmute` from `isize` to `Box<_>` (without first casting to `*mut _`) is undefined behavior. On Rust v1.78.0+, this ends up crashing with `STATUS_ILLEGAL_INSTRUCTION` when `ReadDirectoryChangesW` fails and this branch is hit in release mode. While this could be fixed by simply adding `as *mut ReadDirectoryRequest`, this cleans up the overall unsafe logic to be more readable and idiomatic Rust.
Notify
Cross-platform filesystem notification library for Rust.
- Notify Documentation
- Mini Debouncer Documentation
- Full Debouncer Documentation
- Examples
- Changelog
- Upgrading notify from v4
- Earliest supported Rust version: 1.63
As used by: alacritty, cargo watch, cobalt, docket, mdBook, rust-analyzer, watchexec, xi-editor, watchfiles, and others.
(Looking for desktop notifications instead? Have a look at notify-rust or alert-after!)
Platforms
- Linux / Android: inotify
- macOS: FSEvents or kqueue, see features
- Windows: ReadDirectoryChangesW
- iOS / FreeBSD / NetBSD / OpenBSD / DragonflyBSD: kqueue
- All platforms: polling
License
Notify is licensed under the CC Zero 1.0.
notify-debouncer-mini is licensed under the MIT or Apache-2.0 license.
notify-debouncer-full is licensed under the MIT or Apache-2.0 license.
file-id is licensed under the MIT or Apache-2.0 license.
Origins
Inspired by Go's fsnotify and Node.js's Chokidar, born out of need for cargo watch, and general frustration at the non-existence of C/Rust cross-platform notify libraries.
Originally created by Félix Saparelli and awesome contributors.
Description
Languages
Rust
99.5%
Shell
0.5%