Skip to content

feat(driver,net,unix): async bind & listen - #806

Merged
Berrysoft merged 3 commits into
compio-rs:masterfrom
Berrysoft:dev/async-bind-listen
Mar 28, 2026
Merged

Berrysoft merged 3 commits into
compio-rs:masterfrom
Berrysoft:dev/async-bind-listen

Conversation

@Berrysoft

Copy link
Copy Markdown
Member

No description provided.

@Berrysoft Berrysoft self-assigned this Mar 28, 2026
@Berrysoft
Berrysoft requested a review from George-Miao March 28, 2026 14:11
@Berrysoft Berrysoft added this to the v0.19 milestone Mar 28, 2026
@Berrysoft
Berrysoft requested a review from Copilot March 28, 2026 14:11
George-Miao
George-Miao previously approved these changes Mar 28, 2026

@George-Miao George-Miao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds async bind/listen support to the Unix driver layer and wires it through compio-net so socket setup/bind/listen can be performed via submitted driver ops (io-uring/poll backends) instead of direct syscalls.

Changes:

  • Replace Socket::bind constructor usage with Socket::new + async Socket::bind(...) across TCP/UDP/Unix listener codepaths.
  • Introduce new driver ops Bind and Listen and implement them for polling + io-uring backends.
  • Re-export the new ops from compio-driver::op for Unix builds.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
compio-net/src/unix.rs Switch UnixListener setup to new + async bind/listen.
compio-net/src/udp.rs Switch UDP bind path to new + async bind.
compio-net/src/tcp.rs Switch TCP listen/connect bind steps to async bind/listen.
compio-net/src/socket.rs Redefine bind/listen as async instance methods (Unix uses driver ops).
compio-driver/src/sys/unix_op.rs Add Bind and Listen op structs.
compio-driver/src/sys/poll/op.rs Implement OpCode for Bind/Listen in polling backend.
compio-driver/src/sys/iour/op.rs Implement OpCode for Bind/Listen in io-uring backend.
compio-driver/src/op.rs Re-export Bind and Listen for Unix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread compio-net/src/socket.rs Resolved
Comment thread compio-driver/src/op.rs Resolved
@Berrysoft

Copy link
Copy Markdown
Member Author

@George-Miao could you approve it again? I fixed some build errors.

@George-Miao George-Miao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@Berrysoft
Berrysoft added this pull request to the merge queue Mar 28, 2026
Merged via the queue into compio-rs:master with commit 20f149a Mar 28, 2026
120 of 121 checks passed
@Berrysoft
Berrysoft deleted the dev/async-bind-listen branch March 28, 2026 17:06
@github-actions github-actions Bot mentioned this pull request Mar 27, 2026
This was referenced Apr 21, 2026
@github-actions github-actions Bot mentioned this pull request Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants