open-compute README

README проекта с github.com/elliothux/open-compute. Одним файлом markdown: README.md.

open-compute

One binary. One daemon. Isolated instances.
A self-hosted, Cloudflare Workers-compatible platform for a single machine.

CI Apache-2.0 verified workerd fork 2256 stable members and overloads Rust 1.100.1 macOS | Linux

Website · Docs · Compatibility · Architecture

English · 简体中文


The Workers platform, running on your hardware

You already know how to write Cloudflare Workers. open-compute runs the compatible Workers programming model — module workers, familiar bindings, and cf workflows — on a single machine you own.

One binary. One shared daemon. One object authority per instance. Local filesystem is the default; S3-compatible storage is optional.

No Kubernetes. No Redis. No service mesh. No distributed control plane to babysit. No vendor lock-in.

   Everyone else                        open-compute
   ─────────────                        ────────────
   gateway + router                     ┌──────────────┐
   control plane                        │              │
   scheduler service          ═══>      │  ocd (1 bin) │
   Redis / Valkey cluster               │              │
   Postgres                             └──────────────┘
   K8s + operators                       + SQLite + Local/S3 objects

Why open-compute

workerd is a runtime, not a platform. It executes isolated Workers brilliantly — and stops there. No multi-tenant routing, no durable state, no scheduling, no deployment lifecycle, no control API. Everyone who wants Workers on their own infrastructure has to build that layer.

open-compute is that layer — and it ships as one file.

Compatibility

Write standard module workers (export default { fetch }) with the bindings you already know. Supported means the documented public API matches Cloudflare. Single-node differences are listed in the compatibility guide. A running daemon reports its surface with ocd capabilities --json. If behavior differs from Cloudflare, please open an issue.

Supported Partial Not yet
Workers, Workers Standard limits Cloudflare v4 API: /client/v4 works with cf and the official SDK General Workers AI inference
KV, R2, D1 Dashboard: operator UI on the same /client/v4 API Hyperdrive
Durable Objects, Alarms Workers Logs and Live Tail, on one node Analytics Engine
Queues, Cron, Workflows Workers AI: Markdown Conversion and AI Search only Workers for Platforms
Static Assets, Service Bindings Browser Run: CDP, managed browser, Quick Actions, DevTools, Live View, Custom AI (operator guide) Pipelines
Cache, Images Containers: 65-member API with directory restore; needs an operator-owned Linux Broker; tag qualification pending Rate Limiting
Version Metadata, WebSocket Hibernation mTLS certificates
Vectorize, Markdown Conversion, AI Search Tail Workers, traces, Logpush
Artifacts, Dynamic Workers
cf 1.0.0-rc.7 deploys and manages the supported products

Uploads or configuration that need a "Not yet" capability are rejected.

The test suite tracks 2,256 stable API members and overloads. Ten products (Workers, Cache, KV, D1, R2, Durable Objects, Queues, Vectorize, AI Search and Observability) are compared request by request with real Cloudflare where the hosted API allows it.

Quick start

Set up with an AI coding agent

Copy this prompt into Codex, Claude Code, or another coding agent:

Read https://open-compute.dev/llms.txt and install the current open-compute release on this machine. Configure one local instance, inspect any existing installation first, preserve its configuration and instance data, ask before using sudo or making destructive changes, then run ocd status and report the result.

llms.txt contains the minimum setup and usage instructions, with links to detailed documentation when needed.

Set up manually

Install the release binary for your user, create the default user-owned instance, and start its login-scoped service:

curl -fsSL https://open-compute.dev/install.sh | sh
ocd setup --yes
ocd status
ocd dashboard

For a host-wide service that starts before login, explicitly choose system scope:

curl -fsSL https://open-compute.dev/install.sh | sudo sh
sudo ocd setup --system --yes

Use cloudflare.config.ts and the official cf + Vite plugin v2 workflow. Node.js 22.18+ runs cf; ocd cf selects the deployment target. CI pins cf 1.0.0-rc.7; user versions outside 1.0.x only warn:

npm install --save-dev [email protected] @cloudflare/[email protected] vite typescript
npm run dev
npm run build
ocd cf deploy --prebuilt --mode production

Production remains one release executable and one shared daemon, with explicit per-instance configuration and data directories. Runtime payloads are embedded and verified; daemon startup does not download or search PATH for workerd.

For the complete installation path, remote targets, CI, environments, tail, and rollback, see Get started and Develop.

Architecture

open-compute architecture

Component Role
ocd The control plane: ingress, API, scheduler, supervisor, and deployment authority
workerd Pinned, checksum-verified Worker runtime
SQLite Local authoritative state — no external database, no eventual consistency
Local / S3 object authority Bundles, static assets, R2 bytes, Artifacts, snapshots, backups, cache bodies, and AI sources

Tenants get exactly what their deployment declares — and nothing else. No SQLite or Local object paths, no S3 credentials, no internal tokens, no sibling tenants. Enforced at the capability layer, not by convention.

Built in Rust, engineered for the hot path

The host is a single async Rust process — no GC pauses, no interpreter, no sidecar hops between the socket and your Worker.

Layered crates with enforced boundaries

CI checks the dependency direction:

core ── storage ── artifacts ── runtime      (siblings, lower level)
                    └── workers              (may use core/storage/artifacts, never runtime)
                          └── service        (composition root: CLI, HTTP, workerd bridge)

ocd compiles the runtime configuration, starts workerd as a supervised child, and communicates over a loopback-only channel. It owns readiness, graceful shutdown, restart backoff, and recovery.

Deployments are immutable and content-addressed. workerLoader keys are deployment identities, so promotion and rollback move a pointer — they never mutate what is already running.

Dashboard

open-compute Dashboard in dark and light mode

The Dashboard manages the compute, storage, AI, and platform resources exposed through /client/v4. It also switches between the instances registered with the current ocd daemon.

Native extensions

When a Worker needs local hardware, a proprietary library, or an internal daemon, an operator can register a native extension: a native Provider process with a small JavaScript facade, exposed to Workers through cf Service Bindings (bindings.worker + props).

The extension tutorial walks through the complete setup. The repository also includes a small Rust reference Provider.

What it's not

Documentation

Goal Start here
Understand the design Architecture and project guide
Check API support Compatibility · Worker API index
Track unsupported features Not available
Build and deploy Workers Develop
Download and release GitHub Releases · Project guide
Run in production Get started · Operate
Operate and recover Operate · Incident guides
Contribute Contributing guide · Code of conduct

Security

Report vulnerabilities privately using SECURITY.md.

Sponsors

This project is sponsored by Lynx AI.

License

Apache-2.0. The packaged open-compute workerd fork remains under the applicable upstream Cloudflare workerd licensing.

open-compute (elliothux/open-compute)

Ищем в базе…

Что это?open-compute — это self-hosted платформа, которая запускает код Cloudflare Workers без изменений на вашем железе, заново реализуя Workers, KV, D1, R2, Durable Objects, Queues, Workflows, Cron, Cache, Images, Vectorize и AI Search в виде одного Rust-бинарника.
Это просто рантайм workerd или полноценная платформа?Это полноценная платформа, построенная поверх workerd. workerd лишь исполняет изолированные Workers в песочнице; open-compute добавляет недостающую управляющую плоскость — маршрутизацию, постоянное состояние, планирование и жизненный цикл развертывания — и поставляет всё это одним бинарником (ocd).
Как развернуть на нём свой первый Worker?Вы поднимаете платформу локально и развертываете через тот же Wrangler CLI, которым уже пользуетесь для Cloudflare. Одна команда проверяет типы, собирает, развертывает и запускает Worker. В продакшене всё работает как один исполняемый файл с одним файлом конфигурации и одной директорией данных.
Что нужно установить для сборки и запуска?Для сборки нужны Rust 1.98, Bun 1.3.14, Node 26 и Git LFS. Скомпилированному продакшен-бинарнику ничего из этого не требуется — ни инструментов сборки, ни сетевого доступа на хосте при запуске.
Каких функций Cloudflare всё ещё не хватает?Workers AI, Containers, Hyperdrive, Analytics Engine, Workers for Platforms, Pipelines, Rate Limiting, сертификаты mTLS и Tail Workers/Logpush находятся на отметке 0% — пока не реализованы. Vectorize и AI Search готовы лишь частично, на 80%.
Может ли он масштабироваться на несколько машин, как настоящий Cloudflare?Нет, он изначально одноузловой: одна директория данных, один процесс, одна машина, без Anycast-маршрутизации и межрегиональной репликации, как у настоящего edge Cloudflare.
Он отправляет данные Cloudflare или требует аккаунт?Нет — он полностью работает офлайн: без аккаунта Cloudflare, без исходящих вызовов наружу, без телеметрии и без счетов к оплате.
Насколько точно его поведение совпадает с настоящим Cloudflare?Команда прогоняет одни и те же тестовые фикстуры через open-compute и настоящий Cloudflare и не выпускает релиз при расхождениях: 2 097 членов API реализовано без пробелов, 7 из 7 продуктовых поверхностей проверены побайтово, и продакшен-сборка Next.js 16 работает одинаково на обеих.
Где на самом деле хранятся мои данные?Метаданные платформы лежат в локальной базе SQLite, а байты объектов — данные R2, бандлы и снапшоты кэша — по умолчанию находятся в локальной файловой системе, с опциональным S3-совместимым хранилищем как единственной альтернативой — Redis или внешняя база данных не нужны.
Зачем это создавать, вместо того чтобы использовать напрямую workerd?workerd лишь запускает изолированные Workers — у него нет собственных маршрутизации, постоянного состояния, планировщика или API развертывания. open-compute оборачивает стандартный workerd всей этой управляющей плоскостью (ocd), так что ничего дополнительного запускать рядом не нужно.
Могу ли я по-прежнему пользоваться панелью Cloudflare или инструментами для её API?Wrangler работает почти без изменений — привязан к версии 4.127.1 и проверен на 95% — против локального API /client/v4, а на том же API есть отдельная админ-панель для операторов, хотя это не клон собственной панели Cloudflare.
Какие есть похожие проекты?celld, rivet, cloudflare_temp_email, DoulorCloud, WasmEdge, mailflare, ember-cloudflare, durable-git
Автор
elliothux
Размер
94.3 MB
Звёзды
4K
Возраст
3 мес
Коммиты · 90 дней