Skip to main content

Bun

RapidREST can run on Bun instead of Node.js. This is a runtime switch, not a separate deployment target — it's orthogonal to Docker and Kubernetes, and can be combined with either.

Under the hood, @rapidrest/service-core's HTTP layer has two backends: the default is built on uWebSockets.js running under Node.js; the alternative is built directly on Bun.serve(). The server picks between them automatically based on which runtime it's executing under — there's nothing to configure in your project's code. See HTTP Engine for how that abstraction works and what's identical across both.

Running on Bun

rapidrest start --bun

This is only available on rapidrest start — there's no rapidrest dev --bun equivalent, since the dev workflow's hot-reload tooling (tsx --watch, nodemon) runs on Node.js regardless of which runtime your production build targets.

--bun requires Bun v1.4.0 or later. If a compatible Bun isn't already installed, the CLI downloads one automatically before starting the server — no manual Bun install step is required. See CLI Reference → Dev Workflow for the full flag reference.