Skip to content

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-unwind build flag. "Highly recommend upgrading and trying it out for a more stable Rust Workers experience, and plan to make panic=unwind the default in a subsequent release." Users staying on panic=abort still 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

Last updated · 510 distilled / 1,221 read