
DeterministicESPAsyncWebServer
An HTTP/1.1 web server for ESP32 with a fully deterministic memory footprint, RFC 7230 compliant request parsing, and an OSI-layered architecture. Should be on the Arduino registry tonight.
I'm actively working on it; docs, second optimization pass, adding assertions to tests, etc. I'm going to be adding more hw crypto support because I ultimately want to ssh into this.
I built this from the ground up to be different from the existing library. Please share your thoughts, use the library, and report any bugs by opening an issue.
My next project is going to be like a web based terminal using this deterministic async webserver, fully featured and free under agpl, I want it to look like telnet or ssh.
Happy coding!
Github: github
API Documentation: docs
Git: git
```txt
Features
Zero heap allocation *ever*. The event queue, connection pool, HTTP pool, WebSocket pool, and SSE pool are all statically sized in BSS; the entire memory footprint is fixed at link time
RFC 7230 compliant request parser validates method, path, header field-names, and field-values byte-by-byte before storing anything
WebSocket support (RFC 6455) SHA-1 handshake via mbedTLS hardware accelerator, frame parser, ping/pong/close handled automatically
Server-Sent Events persistent connections, per-connection and broadcast push
HTTP Basic Authentication per-route credential checking via mbedTLS base64
Static file serving chunked reads from any Arduino FS (LittleFS, SPIFFS, SD)
Multipart form-data parser in-place, no allocation, up to MAX_MULTIPART_PARTS parts
Compile-time feature flags strip unused subsystems entirely; a REST-only build includes none of the above
Compile-time configuration every buffer, pool, and timeout is a #define; illegal combinations produce #error messages
Diagnostic JSON endpoint optional DETWS_ENABLE_DIAG build-config dump, disabled by default for security
Backpressure-aware TCP shrinks the receive window instead of dropping data when the ring buffer fills
CORS preflight short-circuit OPTIONS answered with 204 automatically when CORS is enabled
restart() hard-resets all connections and reinitializes on the same port without touching the WiFi/TCP stack
321 tests across nine Unity test suites, runnable on native x86/x64 (no hardware required)
```