Skip to content

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
ComponentDenoNode.jsBunCloudflare 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

  1. The environment on a Worker. A Worker has no process: give the environment to CHO with set_env() of @chojs/core/utils, as debug logging reads it.
  2. 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.
  3. 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.
  4. 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.
  5. No serve() on a Worker. The runtime calls the handler itself: the entry point is export default { fetch: app.handler }.
  6. WebSockets on Deno. Upgraded by serve(app), or by app.handler with Deno.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 plain Deno.serve fails it the same way.
  7. WebSockets on Node.js. Upgraded by serve(app), or by nodeUpgrade(app) on a node:http server 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.
  8. WebSockets on Bun. Upgraded by serve(app), or by Bun.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.
  9. WebSockets on a Worker. Upgraded by app.handler, with a WebSocketPair. Durable Objects, and their sockets that hibernate, are not covered.
  10. Fastify is built on the HTTP server of Node.js. On the other runtimes use the built-in router, or @chojs/vendor-hono.
  11. No WebSockets through Fastify. Fastify holds the server, and the adapter does not upgrade its connections: a route marked with @Ws is refused when the application is created. Every other adapter upgrades.
  12. A Worker has no command line. The tests of @chojs/command do not run there.
  13. 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.
  14. The transport of NATS is the runtime's. The application gives the connection: @nats-io/transport-node on Node.js and on Bun, @nats-io/transport-deno on Deno.
  15. 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.
  16. 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.
  17. 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