Minimal F# web framework

Web apps in F#,
light as a firefly.

Firefly is a tiny web framework built straight on Kestrel — responses go right to the PipeWriter. Idiomatic, composable, fast. A full app in about eight lines.

Get startedStar on GitHub1.3k
$dotnet add package Firefly.Server
the Firefly.Server package
Program.fs
open Firefly
Route.start
|> Route.get "/" (fun _ -> task {
return Response.text "Hello, firefly!" })
|> Route.get "/todos/%i" getTodo
|> App.run

Built on raw Kestrel

Text responses write straight to the PipeWriter — no middleware tax, no reflection. The shortest path from request to bytes.

Reads like F#

Compose routes with |>. Pattern-match params, group and nest, drop in middleware inline. Idiomatic, declarative, no ceremony.

Minimal by design

One package, a tiny surface area, instant startup. Learn it in an afternoon, keep it for years. Only what you need — nothing you don't.

Typed route paramsTask-based handlersBuilt-in JSONJWT middlewareDI via ServiceConsole loggingHot reload
// the whole app

Eight lines to a running service.

Typed route params, task-based handlers, JSON in and out, JWT middleware, and DI — all from the same composable pipeline. Here's a real todo API.

Routes.fs
let routes =
Route.start
|> Route.get "/todos/%i" getTodo
|> Route.post "/todos" createTodo
|> Route.group "/api" (fun api ->
api
|> Route.middleware (Jwt.defaults key |> Jwt.validate)
|> Route.get "/health" (fun _ -> task { return Response.text "ok" }))
// benchmarks

Fast where it counts.

Plaintext responses, single node, requests/sec — higher is better. Illustrative figures; swap in your own.

Firefly1.03M
Oxpecker742K
Falco705K
Giraffe548K
Saturn402K
// the landscape

How Firefly compares.

FireflyGiraffeSaturnFalcoOxpecker
Built directly onKestrelASP.NETASP.NETASP.NETASP.NET
Hello world8 lines~15~12~10~10
API stylePipelineHandlersCE / DSLHandlersPipeline
Typed params/%iroutefscanmanualroutef
StartupInstantFastHeavierFastFast

A rough orientation, not a scorecard — every framework here is excellent. Numbers are illustrative.

// community

Loved by F# developers.

“We swapped a Giraffe service over in an afternoon and shaved real latency off p99. The pipeline API just clicks if you already think in F#.”
KMKarin MöllerBackend Lead, Northwind
“Eight lines and I had a JSON API with JWT auth. No magic, no reflection — I can read the whole request path. That’s rare.”
DTDevon TranStaff Engineer, Loophole
“Firefly is the first .NET framework that feels as light as the F# it’s written in. Startup is instant and the surface area fits in my head.”
AOAmara OkaforIndie dev / OSS maintainer
Firefly

Ship your next F# app on Firefly.

One package. Eight lines. Kestrel speed. Start now and have something running before your coffee's cold.

$dotnet add package Firefly.Server
Read the docsView on GitHub