This guide covers local contributor workflows for ExtendDO. ExtendDO is a Workers project with TypeScript host code, Durable Objects, R2 bindings, and local ExtendDB Rust crates compiled to wasm.
- Node.js and
pnpmmatchingpackage.json. - Rust with the
wasm32-unknown-unknowntarget installed. wasm-pack; the project scripts use it to buildcrates/wasm.- Wrangler from the project dev dependency. Prefer
pnpm exec wrangler ...or the package scripts over a globally installed Wrangler.
Install dependencies:
pnpm installIf the wasm target is missing:
rustup target add wasm32-unknown-unknownworker/src: Worker host, auth, management API, R2 import/export adapter, and Durable Object classes.crates/wasm: wasm-bindgen bridge that calls local ExtendDB operation handlers and calls back into the Worker host for storage.third_party/extenddb: ignored local ExtendDB core, engine, storage, and auth crates created bypnpm run setup:extenddb.patches/extenddb: tracked source manifest and ExtendDO compatibility patch applied during local setup.docs: operator, contributor, architecture, and parity documentation.
The ignored external-projects/extenddb checkout is reference-only. It is not a
Cargo dependency and it is not used as a Git submodule.
Build the wasm package consumed by the Worker:
pnpm run build:wasmGenerate Cloudflare Worker binding types from the tracked example Wrangler config:
pnpm run generate:typesRun TypeScript type checking after regenerating wasm and Worker types:
pnpm run typecheckRun Rust checks for all crates using the Worker wasm target:
cargo check --workspace --target wasm32-unknown-unknownRun the combined Rust and TypeScript check script:
pnpm run checkRun the Worker/Vitest suite:
pnpm run testBuild and dry-run package the Worker:
pnpm run deploy:dry-run
pnpm run buildExtendDO does not track ExtendDB source files in Git. Before building, create the ignored local source tree:
pnpm run setup:extenddbThe setup script downloads the pinned upstream archive from
patches/extenddb/manifest.json, extracts only crates/core, crates/auth,
crates/storage, crates/engine, LICENSE, and NOTICE, then applies tracked
ExtendDO compatibility patches from patches/extenddb.
To use an existing local checkout instead of downloading:
pnpm run setup:extenddb -- --source ../extenddbTo recreate from a remote Git checkout with an exact ref:
pnpm run setup:extenddb -- --repo <extenddb-git-url> --ref <tag-or-sha>Build scripts run scripts/check-extenddb-source.mjs and fail with setup
instructions when third_party/extenddb is missing. They do not download source
implicitly.
When refreshing ExtendDB, update patches/extenddb/manifest.json, regenerate
patches/extenddb/compatibility.patch, update docs/extenddb-reference.md, and
run pnpm run setup:extenddb -- --force, pnpm run test, and pnpm run build.
Build wasm and generated types before starting local development:
cp wrangler.example.json wrangler.jsonc
pnpm run build:wasm
pnpm run generate:types
pnpm exec wrangler dev --config wrangler.jsoncWrangler local development uses local simulated bindings unless a binding is
configured for remote use. The tracked wrangler.example.json and local
wrangler.jsonc bind:
CATALOGtoCatalogDOTABLEtoTableDOTRANSACTIONStoTransactionCoordinatorDOIMPORT_EXPORT_BUCKETto the configured R2 bucket
Use /healthz to confirm the Worker and wasm module are available:
curl http://localhost:8787/healthzpnpm run build:wasm writes the wasm package under
worker/src/generated/wasm. pnpm run generate:types writes
worker/src/worker-configuration.d.ts. Regenerate both after changes to Rust
wasm exports, Worker bindings, Durable Object classes, wrangler.example.json,
or local wrangler.jsonc.
The Vitest suite exercises:
- DynamoDB JSON request routing through wasm.
- Durable Object SQLite persistence and alarms.
- Table lifecycle, item operations, query/scan, secondary indexes, TTL, streams, backups, import/export, and transactions.
- Management credentials, IAM-shaped resources, SigV4 data-plane auth, and policy evaluation through the local ExtendDB auth crate.
Run pnpm run test after changing Worker code, Rust wasm code, management API
behavior, import/export handling, Durable Object schema, or docs examples that
copy live command shapes.