What it does
| Area | In 0.4.0 |
Later |
|---|---|---|
| Transports | TCP; Unix domain sockets with peer credentials and descriptor passing; UDP with budgets and an amplification guard | Windows named pipes and AF_UNIX (0.5.0) |
| Drivers | a bounded blocking worker pool: 2 system calls per keep-alive round trip on Linux (3 on macOS and Windows), no allocation after warm-up | its own reactor on epoll, kqueue, and IOCP (0.5.0) |
| Limits | global, per-listener, and per-source caps; idle, read, write, exchange, and park deadlines; a minimum transfer rate against slowloris and slow readers; bounded buffers | adaptive deadlines and lane reservations (0.6.0) |
| Lifecycle | the door, graceful drain with a deadline, kill from any thread, one CloseReason and one closed event per connection, a control line (shed, lockdown, drain, stop); listeners added and removed while running; systemd and FastCGI inheritance; listener hand-off between processes (Unix) |
the Windows hand-off (0.5.0) |
| Seams | the gate (admission before any byte is read, a check before every write, also for adopted and dialed connections), sans-IO sessions, an event sink, a completion queue for offloaded work; the PROXY protocol from trusted proxies; the TLS seam on listeners | adaptive deadlines and lane reservations (0.6.0) |
The full plan:
| Area | Planned |
|---|---|
| Transports | TCP, UDP, Unix domain sockets (Unix and Windows), Windows named pipes |
| Socket options | TCP_NODELAY, keepalive tuning, linger, buffer sizes, SO_REUSEADDR / SO_EXCLUSIVEADDRUSE, SO_REUSEPORT, IPV6_V6ONLY, and the server options std does not expose |
| Connections | a never-reused ConnectionId, ConnectionInfo (endpoints, real client behind a trusted proxy, transport, TLS facts), one CloseReason on every close |
| Limits | global, per-listener, and per-source caps; handshake, idle, read, write, and total deadlines; a minimum transfer rate against slowloris and slow-read; bounded buffers and queues |
| Drivers | a bounded blocking worker pool (0.3.0); its own reactor on epoll, kqueue, and IOCP (0.5.0); one completion-shaped interface |
| Sessions | sans-IO protocol engines driven the same way on every driver, with zero-copy input and an O(1) buffer hand-off |
| Behind a proxy | PROXY protocol v1 and v2, honoured only from configured trusted proxies |
| Restarts | a door that opens last and closes first, graceful drain, systemd socket activation, FastCGI descriptor 0, listener hand-off between processes |
| Seams | a gate (admission before any byte is read, a check before every write, kill from any thread), a sans-IO TLS seam, an event sink, a control line, a completion queue for offloaded work |
Use
[]
= "0.3"
The simplest server (the full API is in docs/API.md; examples/ has a sans-IO session, kill and drain, and a gate):
What is not here
- QUIC: it runs on UDP but builds TLS 1.3 into the transport itself, so it gets its own crate later (
quic-net) on top of this one's UDP socket. - DNS resolution:
stdcovers it for now; a real resolver becomes its own crate later (dns-net). - A TLS implementation: TLS plugs in through the seam from a separate adapter crate, which keeps this crate dependency-free.
- Application protocols, ban policy, authentication: these live in the crates above it.
Contributing
See dev/DIRECTIVES.md for engineering standards and the definition of done. Before a PR: cargo fmt --all, cargo clippy --all-targets --all-features -- -D warnings, and cargo test --all-features must be clean.