WhiteThroated

WhiteThroated is an experimental high-performance web framework written entirely in Swift. It is pre-alpha: API compatibility is intentionally secondary to establishing a fast, measurable runtime architecture. Expect breaking changes before 1.0 and pin exact releases.

Two non-negotiable goals

  1. Express.js-level ergonomics for application developers.
  2. Runtime overhead low enough to compete with the fastest practical server frameworks, with Actix Web as an external performance reference and raw SwiftNIO as the lower-bound control.

How it is built

Application code uses the WhiteThroated module (routes, middleware, Request/Response). Execution runs on WhiteThroatedRuntime, an internal module on SwiftNIO that owns the HTTP/1.1 pipeline, dispatch state machine, and response writer. Configuration is mutable during setup and frozen once serving begins. Four responder paths exist so cheap routes never pay for features they don't use: prepared immutable responses, synchronous handlers, event-loop-native futures, and opt-in async/await. The default transport is Tier 1 HTTP/1 with a stock SwiftNIO fallback for request-streaming apps.

The target is overhead, not a number

The target is not a requests-per-second number. The target is to minimize framework overhead until Swift runtime, SwiftNIO, kernel, and hardware costs dominate. The honest comparison order is: same WhiteThroated path before/after, then equivalent raw SwiftNIO, then responder modes, then external frameworks only after Swift-side overhead is understood.

What WhiteThroated offers

  • Express-inspired routing with synchronous, future, and async handler styles.
  • Prepared responses that precompute immutable content at setup.
  • Benchmarks against raw SwiftNIO and external controls, with full methodology published.

What it does not offer: superlatives without a cited, reproducible comparison. No best-case single-metric configuration is ever presented as winning every metric.

Benchmarks with provenance

Every published figure carries its framework commit, toolchain, OS and CPU, load-generator identity, measurement date, gate status, and a link to archived raw data. Start with theresults matrix, read how benchmarks are run and judged, or browse the report archive.