wavefnd / wavefnd/Wave

Integrate async tasks with std::net readiness and Windows IOCP

Open
#445 0 comments 0 reactions 0 assignees View on GitHub
cross-platform enhancement help wanted
Dominant language
Rust
Stars
53
Forks
16
Avg merge
4h 22m
Merged PRs (30d)
46

Description

Parent: #439
Depends on: #444 and the portable `std::net::event` foundation merged in #438.

## Summary

Integrate async task wakeups with portable network readiness while keeping HTTP, TLS, and protocol policy outside `std::net`.

## Scope

- Adapt Linux epoll, Darwin/FreeBSD kqueue, and the existing Windows readiness provider to wake registered tasks.
- Define registration ownership, token lifetime, deregistration, timeout, cancellation, close, error, and hangup behavior.
- Preserve final readable data when readable and hangup arrive together.
- Prevent stale events from waking a reused task or descriptor registration.
- Add an IOCP completion provider for Windows when the runtime's buffer ownership and cancellation contracts are available.
- Keep synchronous `std::net` APIs operational and avoid forcing an executor on non-async programs.
- Expose primitives sufficient for external HTTP, DNS, TLS, and protocol libraries without adding those protocols to `std`.

## Completion criteria

- [ ] Async connect, accept, read, write, timeout, cancellation, and close have deterministic tests.
- [ ] epoll and kqueue wake paths pass hosted CI on their native systems.
- [ ] Windows distinguishes the bounded readiness fallback from the IOCP completion backend.
- [ ] Buffer ownership remains valid until an IOCP operation completes or cancellation is acknowledged.
- [ ] No busy polling is required for an idle executor.
- [ ] Synchronous networking regression tests remain green.

This is a high-difficulty cross-platform runtime task, not a good first issue.

Contributor guide

Open the contributing guide

Research direction

Read the portable std::net::event foundation in #438 and the prerequisite work in #444, then inspect the existing Linux epoll, Darwin/FreeBSD kqueue, and Windows readiness providers. Define ownership, tokens, cancellation, timeout, close, and hangup behavior before implementing wakeups. Done means deterministic async and native CI tests pass, IOCP contracts are respected, idle executors do not busy-poll, and synchronous networking regressions remain green.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.