Async web programs, composed in F#
A lightweight, high-performance web server and library. Non-blocking I/O, composable WebParts, and a small surface you can learn in an afternoon.
Why Suave?
Built for teams who want full control of HTTP without a heavy framework.
High performance
Async, non-blocking I/O with low-allocation hot paths—steady latency under load.
Type-safe by default
Model routes and responses with F# types. Catch mistakes at compile time.
Composable WebParts
Small functions of type HttpContext → Async<HttpContext option>, combined with >=> and choose.
HTTP/2 built-in
Multiplexed framing, HPACK, and ALPN—same handlers for HTTP/1.1 and HTTP/2.
Production features
TLS, compression, cookies/sessions, rate limiting, WebSockets, and logging hooks.
Cross-platform
Runs on modern .NET on Linux, macOS, and Windows—as an executable or a container.
Hello World
open Suave
open Suave.Successful
let app = OK "Hello, Suave!"
startWebServer defaultConfig app
Serves on http://127.0.0.1:8080. Next: getting started or a recipe.
What you can build
- REST APIs Typed routes, JSON bodies, status combinators
- Microservices Small process footprint, clear composition
- Real-time apps First-class WebSockets
- Static & hybrid sites Files, templates, SPA fallbacks
Install
dotnet add package Suave
Or with Paket: nuget Suave