Skip to content

refactor!: move {Async,Poll}Fd to runtime#662

Merged
George-Miao merged 2 commits intocompio-rs:masterfrom
George-Miao:refactor/fds-in-runtime
Feb 5, 2026
Merged

refactor!: move {Async,Poll}Fd to runtime#662
George-Miao merged 2 commits intocompio-rs:masterfrom
George-Miao:refactor/fds-in-runtime

Conversation

@George-Miao
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings February 5, 2026 05:57
@George-Miao George-Miao self-assigned this Feb 5, 2026
@George-Miao George-Miao added refactor Refactoring existing code package: runtime Related to compio-runtime labels Feb 5, 2026
@George-Miao George-Miao changed the title refactor: move {Async,Poll}Fd to runtime refactor!: move {Async,Poll}Fd to runtime Feb 5, 2026
@George-Miao George-Miao added breaking change package: net Related to compio-net package: fs Related to compio-fs labels Feb 5, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 fd module in compio-runtime with PollFd and AsyncFd types
  • Added an async-fd feature flag to compio-runtime for optional AsyncFd functionality
  • 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.

@George-Miao George-Miao merged commit b441a98 into compio-rs:master Feb 5, 2026
54 checks passed
@George-Miao George-Miao deleted the refactor/fds-in-runtime branch February 5, 2026 06:30
@github-actions github-actions bot mentioned this pull request Feb 5, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change package: fs Related to compio-fs package: net Related to compio-net package: runtime Related to compio-runtime refactor Refactoring existing code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants