Bun
The Bun adapter wraps the native Bun.serve API for REST API deployments. You get fast startup, a smaller memory footprint, and first-class TLS and Unix-socket support without extra middleware.
When to choose Bun
- You want startup measured in milliseconds and lower per-request overhead than Node.
- You ship a single self-contained binary or a small container.
- You're fine with Bun 1.2+ (matches the adapter's expectations).
Scaffold
The bun-basic template ships a Bun-native server with bun testand Hey API codegen.
Install
Minimal server
Hot reload in dev
Dockerfile
Gotchas
idleTimeoutis in seconds, capped at 255. Pass0to disable.- Some npm packages with native bindings still need Node — test before committing to Bun in production.
- Bun's built-in
routesoption is not used by the adapter; routing is owned by DaloyJS so the same REST API stays portable across runtimes.