Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding kqueue support for iOS. #533

Merged
merged 2 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ and others.
- Linux / Android: inotify
- macOS: FSEvents or kqueue, see features
- Windows: ReadDirectoryChangesW
- FreeBSD / NetBSD / OpenBSD / DragonflyBSD: kqueue
- iOS / FreeBSD / NetBSD / OpenBSD / DragonflyBSD: kqueue
- All platforms: polling

## License
Expand Down
2 changes: 1 addition & 1 deletion notify/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ mio = { version = "0.8", features = ["os-ext"], optional = true }
[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.48.0", features = ["Win32_System_Threading", "Win32_Foundation", "Win32_Storage_FileSystem", "Win32_Security", "Win32_System_WindowsProgramming", "Win32_System_IO"] }

[target.'cfg(any(target_os="freebsd", target_os="openbsd", target_os = "netbsd", target_os = "dragonflybsd"))'.dependencies]
[target.'cfg(any(target_os="freebsd", target_os="openbsd", target_os = "netbsd", target_os = "dragonflybsd", target_os = "ios"))'.dependencies]
kqueue = "^1.0.4" # fix for #344
mio = { version = "0.8", features = ["os-ext"] }

Expand Down
6 changes: 5 additions & 1 deletion notify/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ pub use crate::inotify::INotifyWatcher;
target_os = "openbsd",
target_os = "netbsd",
target_os = "dragonflybsd",
target_os = "ios",
all(target_os = "macos", feature = "macos_kqueue")
))]
pub use crate::kqueue::KqueueWatcher;
Expand All @@ -236,6 +237,7 @@ pub mod inotify;
target_os = "openbsd",
target_os = "dragonflybsd",
target_os = "netbsd",
target_os = "ios",
all(target_os = "macos", feature = "macos_kqueue")
))]
pub mod kqueue;
Expand Down Expand Up @@ -381,6 +383,7 @@ pub type RecommendedWatcher = ReadDirectoryChangesWatcher;
target_os = "openbsd",
target_os = "netbsd",
target_os = "dragonflybsd",
target_os = "ios",
all(target_os = "macos", feature = "macos_kqueue")
))]
pub type RecommendedWatcher = KqueueWatcher;
Expand All @@ -393,7 +396,8 @@ pub type RecommendedWatcher = KqueueWatcher;
target_os = "freebsd",
target_os = "openbsd",
target_os = "netbsd",
target_os = "dragonflybsd"
target_os = "dragonflybsd",
target_os = "ios"
)))]
pub type RecommendedWatcher = PollWatcher;

Expand Down