TL;DR
OpenWorkers is an open-source, Rust-based runtime that runs JavaScript inside V8 isolates and aims to reproduce the Cloudflare Workers developer experience on self-hosted infrastructure. It provides Workers-compatible APIs, bindings (KV, PostgreSQL, S3/R2), sandboxing limits, cron scheduling and a Docker Compose–friendly deployment path.
What happened
A new open-source project called OpenWorkers provides a self-hosted runtime for executing JavaScript in V8 isolates, built in Rust and intended to be compatible with Cloudflare Workers syntax. The runtime exposes common Workers-style bindings — keyed KV storage, PostgreSQL access, S3/R2-compatible object storage, service bindings and environment variables/secrets — along with web APIs such as fetch, Request/Response, ReadableStream, crypto.subtle and timing primitives. Each worker runs inside a V8 isolate with enforced resource caps (100 ms CPU and 128 MB memory per worker). The architecture shown uses nginx as a proxy and components including dashboard, API, logs, multiple runners, a scheduler, NATS and PostgreSQL. Deployment is promoted as simple: a single PostgreSQL instance and a supplied Docker Compose setup, with the project repository and migration steps provided. The author says the codebase evolved over seven years and was recently ported to rusty_v8.
Why it matters
- Provides a path to run Workers-compatible JavaScript on your own infrastructure, reducing dependency on hosted edge providers.
- Matches familiar Cloudflare Workers APIs and developer experience, easing migration of existing Workers code.
- Enforced CPU and memory limits aim to keep untrusted code sandboxed and predictable.
- Self-hosting can eliminate per-request pricing and central vendor lock-in according to the project.
Key facts
- OpenWorkers is open-source and implemented in Rust, using rusty_v8 for direct V8 integration.
- Runs JavaScript in V8 isolates with per-worker limits: 100 ms CPU and 128 MB memory.
- Supported bindings include KV storage (get, put, delete, list), PostgreSQL, S3/R2-compatible storage, service bindings, and environment variables/secrets.
- Exposes Web APIs: fetch, Request/Response, ReadableStream, crypto.subtle, TextEncoder/Decoder, Blob, setTimeout and AbortController.
- Includes built-in cron scheduling with support for 5- or 6-field cron expressions.
- Reference architecture components: nginx proxy, dashboard, API, logs, multiple runners, postgate, NATS, scheduler and PostgreSQL.
- Deployment example uses a single PostgreSQL database and a Docker Compose configuration from the openworkers-infra repository.
- The project evolved through multiple sandboxing approaches (vm2, deno-core) before moving to rusty_v8; author cites about seven years of work.
What to watch next
- Execution recording and replay for deterministic debugging is listed as the project's next planned capability.
- Community adoption, production-readiness and long-term operational characteristics: not confirmed in the source.
Quick glossary
- V8 isolate: A lightweight instance of the V8 JavaScript engine that runs code in isolation from other isolates and the host process.
- KV storage: A simple key-value store interface for storing and retrieving small pieces of application data.
- rusty_v8: A Rust binding to the V8 JavaScript engine that enables embedding V8 into Rust applications.
- Docker Compose: A tool for defining and running multi-container Docker applications using a YAML configuration file.
- Cron syntax: A compact expression format used to schedule recurring tasks at specified times or intervals.
Reader FAQ
Is OpenWorkers compatible with Cloudflare Workers?
The project advertises compatibility with Cloudflare Workers syntax and APIs.
How do I deploy OpenWorkers?
The source provides a Docker Compose–based deployment: clone the openworkers-infra repo, copy .env.example to .env, bring up Postgres and then the remaining services via docker compose.
Does data leave my infrastructure when using OpenWorkers?
The project states that data never leaves your infrastructure.
Is OpenWorkers production-ready?
not confirmed in the source
What resources does each worker get?
Each worker runs with a 100 ms CPU limit and a 128 MB memory limit as described in the project.
Introducing OpenWorkers Self-hosted Cloudflare Workers in Rust OpenWorkers is an open-source runtime for executing JavaScript in V8 isolates. It brings the power of edge computing to your own infrastructure. What…
Sources
- Show HN: OpenWorkers – Self-hosted Cloudflare workers in Rust
- Introducing workerd: the Open Source Workers runtime
- OpenWorkers: Self-Hosted Cloudflare Workers in Rust
- Bringing Node.js HTTP servers to Cloudflare Workers
Related posts
- Single-Page Apps and the mystery of unexpectedly shallow sessions
- RESIDUALS: Differential feature detection in LiDAR DEMs via decomposition
- Balancing code-driven and LLM-driven internal agents for reliable workflows