event: add kevent64 support on apple targets#2781
Merged
Merged
Conversation
Member
Author
|
|
3 tasks
144aa17 to
aca6408
Compare
Member
Author
|
New constants are in 0.2.186 |
3 tasks
SteveLauC
reviewed
May 11, 2026
There was a problem hiding this comment.
Pull request overview
Adds an Apple-specific kevent64(2) wrapper to nix::sys::event, exposing a fixed-width 64-bit event structure and flags to support the extra ext data supported by the Darwin syscall.
Changes:
- Add
KEvent64(wrapper aroundlibc::kevent64_s) with constructors and field accessors onapple_targets. - Add
Kqueue::kevent64andKevent64Flagsto calllibc::kevent64on Apple platforms. - Add an Apple-only unit test validating
KEvent64accessors/layout and a changelog entry; bumplibcdependency.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/sys/event.rs |
Introduces KEvent64, Kqueue::kevent64, and Kevent64Flags under cfg(apple_targets). |
test/sys/test_event.rs |
Adds an Apple-only test validating KEvent64 getters and size_of vs libc::kevent64_s. |
changelog/2781.added.md |
Documents the newly added kevent64 API surface on Apple targets. |
Cargo.toml |
Bumps libc to a newer patch version to support the new Darwin types/syscall. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
SteveLauC
approved these changes
May 11, 2026
Add KEvent64, Kevent64Flags, and Kqueue::kevent64 wrapping the kevent64 syscall available on apple platforms. This uses fixed-width 64-bit fields and provides an additional ext field for filter-specific data.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add KEvent64, Kevent64Flags, and Kqueue::kevent64 wrapping the kevent64 syscall available on apple platforms. This uses fixed-width 64-bit fields and provides an additional ext field for filter-specific data.
What does this PR do
Checklist:
CONTRIBUTING.md