Skip to content

Bun and Deno

The bun and deno adapters ship as placeholders that throw when used. Node and Cloudflare Workers are the runnable targets today.

AI generated, pending review Updated 10 days ago · Flare 0.3

@flare-ts/core exports a bun adapter and a deno adapter at the subpaths @flare-ts/core/bun and @flare-ts/core/deno. In Flare 0.3 they are placeholders. The import resolves and the adapter object exists, but the runtime it targets is not supported yet. Each adapter’s JSDoc names it a placeholder whose createApp and createTestRequest throw.

AdapterImportStatus in 0.3
bun@flare-ts/core/bunPlaceholder: throws Bun runtime is not yet supported
deno@flare-ts/core/denoPlaceholder: throws Deno runtime is not yet supported

The message says “not yet”. The package names no target version for when these adapters run, so treat that as the only forward signal it makes.

Importing the adapter and constructing a host both succeed, and so do registering routes and services. The failure surfaces at host.build(). Its final step asks the adapter to build the runtime app, and the placeholder createApp throws Error("Bun runtime is not yet supported") (or the Deno equivalent). Under the test harness the same message surfaces from createTestRequest when a request is synthesized.

import { FlareHost, FlareResponse } from "@flare-ts/core";
import { bun } from "@flare-ts/core/bun";
const host = new FlareHost(bun);
host.http.get("/health", () => new FlareResponse(200, { ok: true }));
host.build(); // throws: Error("Bun runtime is not yet supported")

The runnable targets in Flare 0.3 are Node.js and Cloudflare Workers. The registrations are identical across adapters, so a graph written now moves to Bun or Deno by swapping the adapter once support lands.

GoalAdapterImport
Long-lived server, local devnode@flare-ts/core/node
Edge deploycf, buildCf@flare-ts/core/cloudflare

See Node.js and Cloudflare Workers for each adapter’s entrypoint and constraints. The package does not state that the node adapter runs under Bun or Deno, so this page makes no such claim: target Node or Workers to deploy today.