refactor!: move {Async,Poll}Fd to runtime#662
Merged
George-Miao merged 2 commits intocompio-rs:masterfrom Feb 5, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the codebase by moving AsyncFd and PollFd from their respective crates (compio-fs and compio-net) into a centralized compio-runtime crate under a new fd module. This consolidation improves code organization by placing these fundamental file descriptor wrappers in the runtime layer where they logically belong.
Changes:
- Created a new
fdmodule incompio-runtimewithPollFdandAsyncFdtypes - Added an
async-fdfeature flag tocompio-runtimefor optionalAsyncFdfunctionality - Updated all imports in dependent crates (
compio-net,compio-fs) to use the new centralized location
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| compio-runtime/src/lib.rs | Adds public fd module to runtime |
| compio-runtime/src/fd/mod.rs | New module entry point with feature-gated exports |
| compio-runtime/src/fd/poll_fd/mod.rs | Updated documentation and made from_shared_fd public |
| compio-runtime/src/fd/poll_fd/unix.rs | Changed internal path from compio_runtime:: to crate:: |
| compio-runtime/src/fd/poll_fd/windows.rs | Changed internal path from compio_runtime:: to crate:: |
| compio-runtime/src/fd/async_fd/mod.rs | Restructured to move platform-specific impls to separate files, added Splittable trait |
| compio-runtime/src/fd/async_fd/windows.rs | Platform-specific Windows trait implementations for AsyncFd |
| compio-runtime/src/fd/async_fd/unix.rs | Platform-specific Unix trait implementations for AsyncFd |
| compio-runtime/Cargo.toml | Added optional compio-io dependency and async-fd feature |
| compio-net/src/lib.rs | Removed poll_fd module export |
| compio-net/src/tcp.rs | Updated import to use compio_runtime::fd::PollFd |
| compio-net/src/unix.rs | Updated import to use compio_runtime::fd::PollFd |
| compio-net/src/socket.rs | Updated import to use compio_runtime::fd::PollFd |
| compio-net/tests/poll.rs | Updated import to use compio_runtime::fd::PollFd |
| compio-fs/src/lib.rs | Removed async_fd module export |
| compio-fs/src/stdio/unix.rs | Updated import to use compio_runtime::fd::AsyncFd |
| compio-fs/src/named_pipe.rs | Updated import to use compio_runtime::fd::AsyncFd |
| compio-fs/Cargo.toml | Added async-fd feature to compio-runtime dependency |
Comments suppressed due to low confidence (1)
compio-runtime/src/fd/poll_fd/mod.rs:25
- Grammar error: "Ready-based sources does not need" should be "Ready-based sources do not need" (subject-verb agreement). The subject "sources" is plural and requires the plural verb form "do".
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Berrysoft
reviewed
Feb 5, 2026
Berrysoft
reviewed
Feb 5, 2026
Berrysoft
approved these changes
Feb 5, 2026
Open
George-Miao
added a commit
to George-Miao/compio
that referenced
this pull request
Feb 5, 2026
* refactor: move {Async,Poll}Fd to runtime
* feat: keep alias with deprecate note
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.
No description provided.