Choose a runtime
Cow runs on the JavaScript runtime that you choose: Node.js, Bun, Nub, or Deno. This guide shows you how to choose a runtime and what differs between them.
After installing Cow, use the command below. Replace
cow with npx @cowlang/cow. For a project-local installation, prefix it with npm exec --offline -- instead.cow site --runtime node
cow site --runtime bun
cow site --runtime nub
cow site --runtime denoInstall your chosen runtime separately. The flag changes the runtime, not your page syntax. Stop the server before you switch. Cow uses the same installed dependencies and SQLite database format.
Supported runtimes
| Runtime | Minimum | Status |
|---|---|---|
| Node.js | 22.16 | Baseline runtime |
| Bun | 1.4.2 | Supported with runtime-specific limits |
| Nub | 0.9.2 + Node.js 22.16 | Node.js launcher |
| Deno | 2.9.6 | Supported with runtime-specific limits |
The recorded runtime checks cover Windows. This is not a promise that every operating system or later runtime version behaves identically.
Note: Windows is the supported platform. Other platforms have no compatibility guarantee. Runtime support does not imply identical native APIs or resource guarantees.
Differences between runtimes
- Per-worker heap limits are enforced on Node.js and Nub, not on Bun and Deno. An explicit
--memory-limitfails on Bun and Deno. - Bun has a documented exception for server-wide
OPTIONS *and an extra diagnostic for some failed top-level-await imports. - Nub launches Cow through its Node.js compatibility mode.
Warning: Cow launches Deno with full host permissions. This is not a sandbox for untrusted Cow sites.
Keep your files portable
Use Cow APIs and supported packages for shared application code. Runtime-specific imports such as
bun:* or jsr:* are not portable Cow APIs. Native adapters must support the selected runtime.Set a default runtime
COW_RUNTIME sets the default runtime. The command flag wins over it. COW_NODE, COW_BUN, COW_NUB, and COW_DENO can point to specific executables. Cow does not download runtimes itself.