Rust, the language of every backend
- Does here
- All server code: the
bakery-apiWorker, its Durable Object classes, the Queue consumer and the cron handler, and the platform-free crates. - Why here
- It is the owner’s rule, not an engineering verdict; the engineering case is a domain tested natively in seconds, and the measured cost is the WebAssembly.
- When not
- When Durable Object RPC, Workflows or a first-party object test harness matter, which workers-rs does not give.
- Not measured
- A TypeScript Worker with the same objects beside the Rust one (roadmap R78).
Records: ADR 0002 · ADR 0016, section 1
Considered and not chosen (6)
TypeScript on Workers, the site’s choice
- Would have replaced
- Every Worker and object.
- Why not here
- It fails the owner’s rule outright, and the site already shows this stack.
- When it would be right
- Where a first-class SDK, RPC, Workflows and
@cloudflare/vitest-pluginmatter. - Record
- ADR 0002
Go, through workers-go or native Go in Containers
- Would have replaced
- The backend.
- Why not here
- workers-go is untagged and lacks typed auto-response, attachments and RPC, and Containers are Paid-only with cold starts of 1 to 3 s.
- When it would be right
- Not recorded.
- Record
- ADR 0002
Python Workers
- Would have replaced
- The backend.
- Why not here
- There is no test harness for its objects, and it fails the owner’s rule.
- When it would be right
- Not recorded.
- Record
- ADR 0002
A TypeScript shell with a Rust core as WebAssembly
- Would have replaced
- The Rust Worker’s adapters, to get RPC, Workflows and Vitest while keeping Rust.
- Why not here
- Two languages in every request path and a hand-written boundary, and the adapters, where most bugs live, are not Rust.
- When it would be right
- Spike S6 named it as the fallback had the Rust queue consumer failed.
- Record
- ADR 0002
Rust in Containers, native, with Tokio, axum and sqlx
- Would have replaced
- The backend.
- Why not here
- Paid-only and billed while awake, cold starts in seconds, and the state leaves the Durable Objects.
- When it would be right
- Not recorded.
- Record
- ADR 0002
A TypeScript Worker for the API
Weighed after the build, 2026-11-10
- Would have replaced
- The Rust Worker
bakery-apiand workers-rs. - Why not here
- The owner’s rule that every backend is Rust, which is a rule, not an engineering verdict.
- When it would be right
- When the Worker needs what workers-rs does not bind, which ADR 0002 lists as of 2026-11-04: Durable Object RPC, Workflows, point-in-time recovery and a first-party test harness for objects.
- Never measured
- A TypeScript Worker with the same objects; spike S1 measured only the Rust one (roadmap R78).
- Record
- ADR 0016, section 1