runtime support
yaebal is fetch-first and has zero native-module dependencies in the core, so Bun, Deno, and edge runtimes like Cloudflare Workers work out of the box. This page lists what runs where.
support matrix
| feature | Node | Bun | Deno | CF Workers / edge |
|---|---|---|---|---|
@yaebal/core + most plugins | ✅ | ✅ | ✅ | ✅ |
@yaebal/web — webhook() | ✅ | ✅ | ✅ | ✅ |
nodeWebhookCallback (node http) | ✅ | ✅ (compat) | ✅ (compat) | ❌ no node:http |
@yaebal/panel | ✅ | ✅ | ✅ | ❌ needs fs |
@yaebal/router (file-based) | ✅ | ✅ | ✅ | ❌ needs fs |
@yaebal/workers (thread pool) | ✅ | ✅ | ⚠️ limited | ❌ no worker_threads |
create-yaebal (CLI) | ✅ | ✅ | ✅ | N/A |
(Request) => Promise<Response> instead of (req, res), yaebal adapters work everywhere without shims.Cloudflare Workers
webhook() from @yaebal/web returns a standard fetch handler, so you
can drop it directly into a Workers export. No adapter needed, no Node compatibility flag
required.
// Cloudflare Workers — fetch-first, runs at the edge
import { Bot } from "@yaebal/core";
import { webhook } from "@yaebal/web";
const bot = new Bot(env.BOT_TOKEN);
bot.command("start", (ctx) => ctx.reply("hi from the edge"));
export default { fetch: webhook(bot) };Bun
Pass the same fetch handler to Bun.serve. Bun's Node compatibility layer means
you can also use nodeWebhookCallback with Bun.serve's node:http-style API if you prefer, but the fetch path is simpler.
// Bun — built-in HTTP server
import { Bot } from "@yaebal/core";
import { webhook } from "@yaebal/web";
const bot = new Bot(process.env.BOT_TOKEN!);
bot.on("message:text", (ctx) => ctx.reply(ctx.text));
Bun.serve({ port: 8080, fetch: webhook(bot) });Deno
Deno.serve accepts a fetch handler directly. Import from npm via Deno's npm
specifier support (npm:@yaebal/core) or use a local build.
// Deno — built-in HTTP server
import { Bot } from "@yaebal/core";
import { webhook } from "@yaebal/web";
const bot = new Bot(Deno.env.get("BOT_TOKEN")!);
bot.on("message:text", (ctx) => ctx.reply(ctx.text));
Deno.serve({ port: 8080 }, webhook(bot));edge limitations
Edge runtimes (Cloudflare Workers, Deno Deploy, Vercel Edge) don't expose the filesystem or worker_threads, so anything that relies on those won't run there:
@yaebal/panel— serves a static admin UI from disk; needsfs@yaebal/router— discovers handler files at startup; needsfs@yaebal/workers— spawns aworker_threadspool; not available at the edgenodeWebhookCallback— usesnode:httptypes; polyfills vary
Everything else — core, all filter/keyboard/session/i18n plugins, webhook() — runs fine at the edge.