← back

HTTP/1.1 server

2025 · Rust, Tokio

An HTTP/1.1 server in Rust on Tokio, built to find the least RFC 9110 and 9112 require for a server to count as compliant.

HTTP/1.1 is defined in RFC 9110 and RFC 9112. This exercise sorts the requirements into MUST and SHALL (required for compliance) and SHOULD and MAY (optional), and asks how small a compliant server can be. Some answers are surprising: a server has to support GET and HEAD, but POST, PUT and DELETE are all optional.

The server itself is small and runs on Tokio.

The README records what I learned about Tokio along the way: tasks vs. threads, why data held across .await must be Send, and when to use rayon instead.