SYSTEM Cited by 1 source
workers-rs¶
workers-rs is
Cloudflare's Rust SDK for writing
Cloudflare Workers. Rust source is
compiled to WebAssembly (wasm32-unknown-unknown
target), marshalled across the Rust↔JS boundary by
wasm-bindgen, and executed inside a
V8 isolate on
workerd.
Role on this wiki¶
Canonical system for Rust-on-Workers reliability work disclosed in Cloudflare's 2026-04-22 post. Two inflection points:
- workers-rs 0.6 — first fix: a platform-side custom wrapper combining a Rust panic handler that tracks failure state per Worker, JS Proxy encapsulation of every Rust↔JS call, and targeted patches to wasm-bindgen's generated bindings to reinitialize the Wasm module after failure. Solved the concepts/sandbox-poisoning symptom for workers-rs users but lived outside wasm-bindgen.
- workers-rs 0.8.0 — second fix: the upstreamed
panic=unwind+ abort-recovery machinery, gated behind a--panic-unwindbuild flag. "Highly recommend upgrading and trying it out for a more stable Rust Workers experience, and plan to makepanic=unwindthe default in a subsequent release." Users staying onpanic=abortstill get the 0.6.0 wrapper.
Failure-mode substrate¶
Rust on wasm32-unknown-unknown defaults to
panic=abort: a panic traps with
unreachable, exits Wasm back to JS with
WebAssembly.RuntimeError, and — in stock wasm-bindgen —
leaves the instance in an undefined state. Before workers-rs
0.6, "panics were historically fatal, poisoning the instance
and possibly even bricking the Worker for a period of time."
Workers holding in-memory state (e.g.
Durable Objects) were particularly exposed because
reinitialisation would destroy that state.
Seen in¶
- sources/2026-04-22-cloudflare-making-rust-workers-reliable-panic-and-abort-recovery-in-wasm-bindgen — canonical wiki instance. Disclosure of the two-step reliability arc (0.6 platform wrapper → 0.8 upstreamed exception-handling recovery) and the Rust-Wasm-error-class taxonomy workers-rs now handles.
Related¶
- systems/cloudflare-workers — host platform.
- systems/wasm-bindgen — binding generator workers-rs consumes; now co-maintained by Cloudflare.
- systems/webassembly — runtime substrate.
- systems/workerd — the V8 isolate runtime executing the compiled Wasm module.
- concepts/panic-unwind — the recovery primitive 0.8.0 unlocks.
- concepts/abort-recovery — last-resort reinit for the non-unwindable class.
- concepts/sandbox-poisoning — the failure class workers-rs 0.6 addressed platform-side and 0.8 addresses upstream.
- patterns/reinitialize-on-unrecoverable-error / patterns/proxy-based-entrypoint-encapsulation — the 0.6 pre-upstream recipes.
- companies/cloudflare — author.