DocsReference
#ADR 0001: workers-rs on Cloudflare, axum as the router, runtime-agnostic core
Status: accepted, 2026-09-05
#Context
Ventures need a stateless backend with near-zero ops. Compute must be able to move to self-hosted infrastructure later without touching modules.
#Decision
- v1 runtime is Cloudflare Workers via
workers-rs(workercrate,httpandd1features), built withworker-build, deployed with wrangler. - The router is axum (
default-features = false). workers-rs can serve an axumRouterdirectly, and the sameRouterruns on tokio natively. cratefield-coredepends onhttp,axum,serde,tracingand pure-Rust crypto only. Noworker,wasm-bindgen,tokio,std::fsorstd::netin core or in modules. Runtime crates own those.
#Consequences
- A dependency that only works natively (tokio runtime, mio, native TLS) cannot enter core or a module; CI's
worker-buildstep catches it. cratefield-runtime-nativeis a thin crate: axum on tokio plus native adapters.
Mirrored from docs/adr/0001-workers-rs-and-axum.md at b6f50cd. The harness is the source of truth: a correction goes there first.