OpenWorkers is an open-source serverless platform for running JavaScript, TypeScript and Rust (WebAssembly) workers, with built-in bindings for databases, key-value storage, and object storage.
| Repository | Description | Language |
|---|---|---|
| openworkers-runner | Worker execution engine, serves JavaScript and wasm | Rust |
| openworkers-task-executor | Standalone executor (fetch only) | Rust |
| openworkers-core | Shared types and traits | Rust |
| Repository | Description | Language |
|---|---|---|
| openworkers-runtime-v8 | V8 JavaScript runtime (production) | Rust |
| openworkers-runtime-wasm | WebAssembly components on wasmtime (wasi:http) |
Rust |
| openworkers-runtime-jsc | JavaScriptCore runtime | Rust |
| openworkers-runtime-quickjs | QuickJS runtime | Rust |
| openworkers-runtime-boa | Boa runtime | Rust |
| openworkers-runtime-nova | Nova runtime (experimental) | Rust |
| openworkers-conformance | Cross-engine conformance suite, one recorded oracle | Rust |
| Repository | Description | Language |
|---|---|---|
| openworkers-worker | Rust guest SDK, API-compatible with worker 0.8 |
Rust |
| workers-types | TypeScript types for the worker runtime | TypeScript |
| adapter-sveltekit | Deploy SvelteKit apps as workers (SSR) | TypeScript |
| adapter-static | Deploy static sites as workers | TypeScript |
| Repository | Description | Language |
|---|---|---|
| rusty-v8 | V8 bindings and prebuilt binaries | Rust |
| serde-v8 | Serde integration for V8 values | Rust |
| glue-v8 | Rust to V8 binding macros | Rust |
| Repository | Description | Language |
|---|---|---|
| openworkers-api | User-facing REST API | TypeScript/Bun |
| openworkers-scheduler | Cron job scheduler | Rust |
| openworkers-logs | Log ingestion (NATS) + SSE streaming | Rust |
| openworkers-cli | Admin/infra tool | Rust |
| postgate | Multi-tenant HTTP proxy for PostgreSQL | Rust |
| openworkers-infra | Docker Compose deployment | - |
| Repository | Description | Language |
|---|---|---|
| openworkers-dash | User dashboard | Angular |
| openworkers-website | Documentation & website | SvelteKit |
Don't need the full platform? Use openworkers-runtime-v8 as a standalone JavaScript runtime in your Rust application:
use openworkers_core::{Event, HttpRequest, Script};
use openworkers_runtime_v8::Worker;
#[tokio::main]
async fn main() {
let code = r#"
addEventListener('fetch', (event) => {
event.respondWith(new Response('Hello from V8!'));
});
"#;
let script = Script::new(code);
let mut worker = Worker::new(script, None).await.unwrap();
let (event, rx) = Event::fetch(HttpRequest::get("http://localhost/"));
worker.exec(event).await.unwrap();
let response = rx.await.unwrap();
println!("Status: {}", response.status);
}Add to your Cargo.toml:
[dependencies]
openworkers-runtime-v8 = { git = "https://github.com/openworkers/openworkers-runtime-v8", tag = "v0.15.0" }
openworkers-core = { git = "https://github.com/openworkers/openworkers-core", tag = "v0.15.0" }
tokio = { version = "1", features = ["full"] }See openworkers-runtime-v8 for full documentation. See openworkers-task-executor for a complete implementation example.
┌─────────────────┐
│ nginx (proxy) │
└────────┬────────┘
│
┌──────────────┴──────────────┐
│ │
┌────────┴────────┐ ┌─────────┴─────────┐
│ runner (x3) * │ │ logs * │
│ │ │ │
│ every worker, │ │ SSE log stream │
│ api included │ │ │
└────────┬────────┘ └─────────┬─────────┘
│ │
└──────────────┬──────────────┘
│
┌─────────┴─────────┐
│ nats │
└─────────┬─────────┘
│
┌─────────┴─────────┐
│ scheduler * │
└───────────────────┘
Single database. Components marked with * read and write PostgreSQL.
The dashboard and api run as workers on the platform itself (dogfooding); postgate is then optional, since the workerized api reaches the database through its runtime binding.
Services logs and scheduler are not required for the core runtime but provide additional functionality (log streaming and cron jobs).
- JavaScript/TypeScript execution via V8
- Rust workers as native WebAssembly components (
wasm32-wasip2), with a workers-rs-compatible SDK - Web-standard APIs:
fetch(),Request,Response,Headers,crypto,TextEncoder/Decoder - Streaming support: ReadableStream, WritableStream
- Console logging with structured output
Workers can access platform resources through bindings:
export default {
async fetch(request, env) {
// Key-Value Storage (native JSON support)
await env.KV.put("session", { userId: 123 }, { expiresIn: 3600 });
const session = await env.KV.get("session");
// Database (PostgreSQL)
const users = await env.DB.query("SELECT * FROM users WHERE id = $1", [
session.userId,
]);
// Static Assets (S3/R2)
const asset = await env.ASSETS.fetch("/images/logo.png");
return new Response("Hello World");
},
};- Multi-tenant isolation via PostgreSQL schemas
- SQL validation blocks dangerous operations (system tables, schema escapes)
- BYOD support: Bring Your Own Database with direct connection strings
export default {
async scheduled(event, env) {
// Runs on schedule
console.log(`Cron triggered at ${event.scheduledTime}`);
},
};- V8 Isolates: Each worker runs in an isolated V8 context
- No credential exposure: Workers only see binding names, never secrets
- SQL validation: Queries are parsed and validated before execution
- Schema isolation: Multi-tenant databases use
SET search_pathfor isolation - Path sanitization: Object storage paths are sanitized to prevent traversal attacks
- Rust 1.85+
- Bun 1.0+
- PostgreSQL 15+
- NATS Server
# Clone repositories
git clone https://github.com/openworkers/openworkers-runner.git
git clone https://github.com/openworkers/openworkers-api.git
# Start the runner
cd openworkers-runner && cargo run --features v8
# Start the API dev loop (in another terminal)
cd openworkers-api && bun install && bun run devFor a full self-hosted platform, follow openworkers-infra's GETTING_STARTED.
-
Database is the single source of truth: All components read from/write to PostgreSQL. No local state.
-
API is userland: The API is designed to run as a worker on the platform itself (dogfooding).
-
CLI is the infra tool: All infrastructure operations (migrations, setup) go through the CLI.
-
Security by design: Credentials never reach the JavaScript sandbox.
-
Cloudflare Workers compatible: API compatibility with Cloudflare Workers where possible.
MIT, across the organization.
Contributions are welcome - open an issue or a pull request on the relevant repository.
Built with Rust, TypeScript, Claude Code, and a lot of love.