Lean 4.35.0 CERTIFIED · Apache-2.0 · Served by HottubHTTP

Apache HTTP, rebuilt in Rust and WebAssembly.

A complete, zero-dependency Rust and WebAssembly port of the Apache HTTP Server — parsing real httpd.conf, outperforming Apache 2.4.67 by 3.4–4.9×, and mathematically verified by LeanRust & Lean 4.35.0.

111,862 req/s #1 vs NGINX, Apache, Caddy & Node
17.9 MiB RSS 3.85× less memory · 701 KB binary
27 Proofs Lean 4.35.0 + LeanRust · zero sorry
0 Ext Crates #![forbid(unsafe_code)] · 129 KB WASM

Live HottubHTTP Engine (in this tab via WASM)

Loading hottubhttp_bg.wasm…

HTTP/1.1 Request → Wire Response HTTP 200

          

          
    Head-to-Head Benchmarks

    Faster than NGINX 1.31.8, Apache 2.4.67, Caddy 2.11.9 & Node.js 24

    Apples-to-apples native ARM64 benchmark on Apple M1 Max (10-core) serving this exact hottubhttp.org site with identical KeepAlive, 3 mod_headers security headers, GZIP compression, and access logs disabled. Zero failed requests across all 40 runs. Download full 4-page Benchmark Report (PDF) →

    Static HTML GET / (16.5 KB, 64 conns) 1.18× NGINX · 4.40× Apache
    HottubHTTP
    100,656 req/s
    NGINX 1.31.8
    85,471 req/s
    Apache 2.4.67
    22,857 req/s
    GZIP HTML GET / (HTTP/1.1, 64 conns) 5.50× NGINX · 8.16× Apache
    HottubHTTP
    106,277 req/s
    NGINX 1.31.8
    19,335 req/s
    Apache 2.4.67
    13,026 req/s
    Tiny Asset /robots.txt (67 B, 64 conns) 1.13× NGINX · 4.06× Apache
    HottubHTTP
    111,862 req/s
    NGINX 1.31.8
    99,004 req/s
    Apache 2.4.67
    27,566 req/s
    311 KB WASM Zero-Copy writev 8.34 GB/s · 1.16× NGINX
    HottubHTTP
    28,072 req/s
    NGINX 1.31.8
    24,300 req/s
    Apache 2.4.67
    16,558 req/s
    Workload HottubHTTP 0.1.0 NGINX 1.31.8 Apache 2.4.67 Caddy 2.11.9 Node.js 24
    MT 64-conn Keep-Alive — /robots.txt (67 B)111,862 req/s99,004 req/s27,566 req/s23,956 req/s32,211 req/s
    MT 64-conn Keep-Alive — / HTML (16.5 KB)100,656 req/s85,471 req/s22,857 req/s21,216 req/s25,146 req/s
    MT 64-conn Keep-Alive — / GZIP (HTTP/1.1)106,277 req/s19,335 req/s13,026 req/s16,982 req/s10,636 req/s
    ApacheBench ab -k -n 40k -c 64 — Tiny 67 B (p99)61,505 (3 ms)44,680 (9 ms)13,082 (38 ms)17,285 (26 ms)20,685 (34 ms)
    ApacheBench ab -n 10k -c 32 — No-KA Churn (p99)25,983 (2 ms)17,410 (11 ms)13,453 (9 ms)15,616 (7 ms)7,384 (28 ms)
    Binary / Runtime Footprint701 KiB1.42 MiB2.49 MiB + .so46.8 MiB59.1 MiB
    Architecture

    Apache HTTP semantics, zero C memory hazards

    The live console above is the real Rust engine compiled to a 129 KB gzipped WebAssembly module. The exact same crate serves native multi-worker traffic on AWS Graviton — including this website at hottubhttp.org.

    Real httpd.conf & 11-phase modular pipeline

    Drop in Apache-style <VirtualHost>, <Directory>, <Location>, <FilesMatch>, <IfModule>, .htaccess, RewriteRule, RedirectPermanent, Header always set, Require valid-user, ProxyPass, mod_deflate, mod_autoindex, and mod_status.

    Plus mod_wasm: plug sandboxed WebAssembly handlers directly into Apache's handler phase with zero C ABI risk.

    conf/httpd.confApache-compatible syntax
    <VirtualHost *:8080>
        ServerName hottubhttp.org
        DocumentRoot "/srv/www"
        Header always set X-Content-Type-Options "nosniff"
        RewriteEngine On
        RewriteRule ^/legacy/(.*)$ /docs/$1 [R=301,L]
        <Location "/_wasm/health">
            WasmHandler health
            Require all granted
        </Location>
    </VirtualHost>

    Mathematically proved security boundaries

    Instead of hoping a regression test catches the next CVE-2021-41773 traversal or CL+TE request smuggling bypass, HottubHTTP extracts its core decision kernels to Lean 4.35.0 via LeanRust.

    Every request runs through kernel-certified functions with fingerprint fnv1a64:df3461b7e0fb430e: 12 functional specs, 5 Confidentiality & Integrity Noninterference proofs, and 10 standalone Lean 4 algebraic & Curry–Howard → False impossibility theorems.

    crates/hottubhttp-proof/src/certified.rsLean 4.35.0 CERTIFIED
    #[unhackable]
    #[ensures("has_cl == true && has_te == true
               -> result.status == 400 && result.allow_body == false")]
    #[ensures("cl_conflict == true
               -> result.status == 400 && result.allow_body == false")]
    #[ensures("result.allow_body == true
               -> body_len <= old(pol.max_body_bytes)")]
    #[input(pol, trusted)]
    pub fn framing_policy_check(
        mut pol: FramingPolicy, ...
    ) -> FramingPolicy

    Zero-allocation hot path, never types & 0 external crates

    hottubhttp-core and hottubhttp-server compile with #![forbid(unsafe_code)] and 0 third-party crates — featuring a stack-allocated SWAR HTTP/1.1 parser, bounded zero-copy CachingVfs, single-syscall writev scatter-gather I/O, and Rust's never type (! / Infallible) for panic-free infallible elimination and diverging worker loops.

    Compiles identically to native ARM64/x86_64 binaries (hottubhttpd), browser WebAssembly (wasm32-unknown-unknown), and server/edge WASI (wasm32-wasip1).

    hottubhttpd CLIApache-compatible flags
    hottubhttpd -t -f conf/httpd.conf   # Syntax OK
    hottubhttpd -S -f conf/httpd.conf   # VirtualHost table
    hottubhttpd -M                      # 18 static modules
    hottubhttpd --proof                 # 27 Lean 4.35.0 proofs
    hottubhttpd --license               # Apache-2.0 + NOTICE
    hottubhttpd --bench                 # Micro-benchmarks
    Formal Verification

    What the Lean 4.35.0 kernel proves

    Certificate fingerprint fnv1a64:df3461b7e0fb430e · 27 machine-checked theorems with zero sorry. Re-verify locally in seconds with cargo xtask prove.

    • Functional + Noninterferencepath_step + path_access_allowedSticky DocumentRoot escape detection (CVE-2021-41773) + secret root ID noninterference.
    • Bounded u8 + Noninterferenceuri_byte_safe (u8)Unconditionally rejects NUL, CR, LF, control bytes, DEL, and backslash with noninterference.
    • RFC 9112 §6.3 + Falseframing_policy_check (u16)CL+TE and conflicting Content-Length always return HTTP 400 and never admit a body.
    • Compound Guardchunk_budget_stepCompound arithmetic bound proving streaming chunked bodies never exceed LimitRequestBody.
    • Access Controlauthz_evaluateRequire all denied never grants; unauthenticated callers never pass valid-user.
    • Confidentiality + Integritypublic_status_active_workersNoninterference isolates TLS & HMAC keys from public /server-status telemetry.
    • MPM Pool Boundsmpm_acquire + mpm_releaseMaxRequestWorkers pool never exceeds cap and never underflows below zero.
    • Anti-Range DoSrange_window_validateAnti-CVE-2011-3192: strictly enforces MaxRanges and 0 ≤ start ≤ end < len.
    • Inductive O(n)keepalive_step + header_overhead_budgetBounded Keep-Alive lifecycle + inductive O(n) linear header accounting proof.