Runtime compatibility
Which part of CHO runs on which runtime. A number next to a mark leads to a note under the table. The marks say what the tests of the repository show, not what should work.
- Supported, and tested
- Passes the tests, not promised
- Not supported, or not tested
| Component | Deno | Node.js | Bun | Cloudflare Workers |
|---|---|---|---|---|
| The core | ||||
@chojs/coreDependency injection, modules, errors | ✓ | ✓ | ✓ | ✓1 |
| Decorator syntax Standard (TC39) and legacy decorators | ✓ | ✓2 | ✓ | ✓3 |
| HTTP | ||||
@chojs/webControllers, routes, middlewares, validation | ✓ | ✓ | ✓ | ✓ |
The built-in router ChoLinker, on the URL Pattern API | ✓ | ✓4 | ✓4 | ✓ |
serve()The server of the runtime, from @chojs/web/serve | ✓ | ✓ | ✓ | ✕5 |
Server-sent events @Sse | ✓ | ✓ | ✓ | ✓ |
WebSockets @Ws, @WsOpen, @WsMessage, @WsClose | ✓6 | ✓7 | ✓8 | ✓9 |
@chojs/vendor-choMiddlewares: CORS, auth, compression, … | ✓ | ✓ | ✓ | ✓ |
@chojs/openapiThe OpenAPI document, and its page | ✓ | ✓ | ✓ | ✓3 |
| HTTP adapters | ||||
@chojs/vendor-honoRoutes on Hono | ✓ | ✓ | ✓ | ✓ |
@chojs/vendor-fastifyRoutes on Fastify | ✕10 | ✓11 | ✕10 | ✕10 |
| The command line | ||||
@chojs/commandCommand-line applications | ✓ | ✓ | ✓ | ✕12 |
| Messages | ||||
@chojs/messageHandlers of messages, contracts, the client | ✓ | ✓ | ✓ | ✓13 |
@chojs/vendor-natsNATS, with JetStream | ✓14 | ✓14 | ✓14 | ✕15 |
@chojs/vendor-kafkaKafka | ~16 | ✓17 | ~16 | ✕15 |
Notes
- The environment on a Worker. A Worker has no
process: give the environment to CHO withset_env()of@chojs/core/utils, as debug logging reads it. - Decorators on Node.js. Node.js does not run decorator syntax itself: compile the application with TypeScript 5, or run it with a tool such as
tsx. Deno and Bun run it directly. - A bundle keeps the names. A Worker is bundled, and the bundler compiles the decorators. CHO puts the names of classes and functions in error messages, in logs and in the tags of an OpenAPI document: a bundle that renames them changes those.
- The built-in router needs the global
URLPattern. Node.js has it from version 24, and Bun from 1.3.4. On an older one, use@chojs/vendor-hono. - No
serve()on a Worker. The runtime calls the handler itself: the entry point isexport default { fetch: app.handler }. - WebSockets on Deno. Upgraded by
serve(app), or byapp.handlerwithDeno.serve. The protocol is Deno's. There is no limit of the size of a message to set (maxPayload). In the Autobahn test suite one case of 301 fails,7.3.6, and a plainDeno.servefails it the same way. - WebSockets on Node.js. Upgraded by
serve(app), or bynodeUpgrade(app)on anode:httpserver of your own. Node.js has no WebSocket server: the protocol is part of@chojs/web, with no dependency. Messages are not compressed, and there are no subprotocols. It passes the Autobahn test suite: 301 cases, none failed. - WebSockets on Bun. Upgraded by
serve(app), or byBun.serve({ ...bunOptions(app) }). The protocol is Bun's.Bun.serve({ fetch: app.handler })alone does not upgrade: Bun takes the callbacks of its sockets when the server is made. - WebSockets on a Worker. Upgraded by
app.handler, with aWebSocketPair. Durable Objects, and their sockets that hibernate, are not covered. - Fastify is built on the HTTP server of Node.js. On the other runtimes use the built-in router, or
@chojs/vendor-hono. - No WebSockets through Fastify. Fastify holds the server, and the adapter does not upgrade its connections: a route marked with
@Wsis refused when the application is created. Every other adapter upgrades. - A Worker has no command line. The tests of
@chojs/commanddo not run there. - Messages on a Worker. The package itself runs there, and its tests pass. No broker adapter does: an application delivers its messages with
app.handle. - The transport of NATS is the runtime's. The application gives the connection:
@nats-io/transport-nodeon Node.js and on Bun,@nats-io/transport-denoon Deno. - Not tested on a Worker. The adapters run where the client library of their broker does. The client of NATS can connect through WebSockets, which a Worker has, but nothing here checks it.
- Kafka on Deno and Bun: tested, not promised. The tests of the adapter pass on Deno 2.9 and on Bun 1.4, against a broker. Its client library is written for Node.js alone, so a release of it can change that. The CI runs these tests on Node.js only. On Deno the application needs
--allow-read. - Kafka on Node.js needs Node.js 22.22, or 24.6 and later.
How this is known
- The CI runs the tests on Deno 2, Node.js 24, Bun, and workerd, the runtime of Cloudflare Workers, at the compatibility date
2025-09-01. - Brokers. The tests of NATS run against a real server on Deno, Node.js and Bun; those of Kafka against a real broker, on Node.js.
- Workers are tested in workerd, on a machine. A deployment to Cloudflare is not covered.
- The Autobahn test suite is run by hand:
tools/autobahn. - Each package says more in the "Runtime support" section of its README.
Last checked on 2026-11-19.
Compatibility report in the framework repository · Runtime setup · WebSocket hosting