Built for serverless
Fast cold starts, roughly 5 MB RSS on Apple silicon, and one binary. No npm install for the core.
Built for cold starts, tight memory, and short-lived handlers. One binary with HTTP, TLS, HTTP/2, WebSocket, fetch, SQLite, Postgres, workers, and FFI.
curl -fsSL https://www.fairyfly.dev/install.sh | sh

Fast cold starts, roughly 5 MB RSS on Apple silicon, and one binary. No npm install for the core.
HTTP, TLS, HTTP/2, WebSocket, fetch, SQLite, Postgres, workers, crypto, and FFI ship in the same binary.
About 24k lines of Zig across 54 files. The whole runtime fits in your head.
Pure-JS ESM packages via ff imprint, one flat node_modules, and a lockfile with integrity hashes.
Every hard cap is documented — connections, bodies, timers, workers, and fetch slots.
Prebuilt binaries, containers, and bytecode for serverless, edge, and long-lived deployments.
Serverless first
Fairyfly is designed first for short-lived, memory-constrained workloads: fast cold starts, one binary, no npm install for the core, and a process that exits when the event loop drains.
const port = Number(process.env.PORT ?? 3000);
http.serve({ port }, (url) => {
if (url === "/health") return Response.json({ ok: true });
return new Response("hello from fairyfly");
});Fairyfly is a native POSIX binary: it fits container-based serverless platforms and edge VMs, not V8-isolate runtimes such as Cloudflare Workers.
Quick start
No package.json, no node_modules, no build step for the core. The server, client, and database are already in the binary.
http.serve.fetch.Database.open.http.serve({ port: 3000 }, (url, method, body) => {
if (url === "/json") return Response.json({ ok: true });
if (url === "/echo" && method === "POST") return new Response(body);
return new Response("not found", { status: 404 });
});Batteries included
HTTP, WebSocket, fetch, SQLite, Postgres, workers, crypto, and FFI. No dependency tree to install or audit.
HTTP/1.1, TLS, HTTP/2, and automatic WebSocket upgrades.
16 concurrent HTTP/1.1 slots, redirects, proxies, and a 30 s timeout.
Server upgrades and a client with text and binary frames.
Embedded, synchronous Database.open() with transactions.
Tagged-template sql queries and a 10-connection pool.
Up to 8 OS threads with structured-clone messaging.
UUIDs, random values, SHA digests, and base64 helpers.
Call C-ABI shared libraries with --allow-ffi.
Performance
Four runtimes benchmarked inside isolated microVMs (2 vCPUs, 1 GB RAM): Phase 1 isolated cold-start telemetry vs. Phase 2 5,000,000 requests across 500 concurrency via oha.
| Runtime | App Cold Start | Warm RPS | p50 | p99 | Slowest |
|---|---|---|---|---|---|
| Fairyfly | 10.4 ms | 164,967 /s | 2.93 ms | 5.01 ms | 25.5 ms |
| Bun | 80.6 ms | 163,610 /s | 2.94 ms | 5.29 ms | 21.8 ms |
| Deno | 79.4 ms | 163,566 /s | 2.93 ms | 5.27 ms | 117.2 ms |
| Node | 118.6 ms | 15,523 /s | 32.33 ms | 34.17 ms | 7,983 ms |
2 vCPU / 1 GB RAM microVMs · 5M requests @ 500 concurrency via oha (100% success rate across all 5M requests) · Full microVM benchmark & telemetry →
Architecture
About 24k lines of Zig across 54 files. One event loop, no hidden request threads, and a hot path designed for the common case.
CLI
Scaffold, run, test, and ship with the same ff binary. No separate task runner or build tool.
Write ff.json and an entry file in one command.
Run the project's main, with optional TLS cert and key.
Run test/*.test.js through the runtime.
Ship bytecode with source and debug info stripped.
Deploy
Ship a prebuilt binary, a container, or bytecode with the source stripped.
macOS and Linux, installed to ~/.local/bin/ff with a SHA-256 check.
A container image with the runtime and tools ready to run.
Compile to .ffbc with source and debug info stripped.
ES modules
ff imprint installs pure-JS ESM packages, writes a lockfile with integrity hashes, and keeps one flat node_modules.
ff imprint marked@18.0.11
# adds marked to ff.json and ff.lock
# materializes node_modules/Get started
Install Fairyfly, run a server, and measure the memory yourself.
curl -fsSL https://www.fairyfly.dev/install.sh | sh