Supporting native Rust in Workers with the new Emscripten target for wasm-bindgen
Cloudflare enables the Emscripten target for wasm-bindgen in an experimental preview, allowing native Rust and Tokio applications to run on Workers. This virtualizes platform features like sockets and file systems, demonstrated by a Rust Minecraft server operating within a Durable Object using real TCP connections.

Cloudflare has released the first public experimental preview of native Rust support on Workers by adding the Emscripten wasm32-unknown-emscripten target to the wasm‑bindgen toolchain. The integration lets Rust code, including applications built on Tokio, run directly inside the V8‑based Workers runtime. A demonstration involved a Rust‑native Minecraft server called Pumpkin operating inside a Durable Object and handling real TCP connections via Tokio. By virtualizing platform features such as timers, file‑system operations and sockets, the new target expands the range of libraries that can be used without extensive rewrites. Early tests showed significantly improved compatibility for low‑level system crates, and the ability to compile for both the web and Node.js environments broadens deployment options. This opens a path for developers to bring richer, high‑performance Rust workloads to Cloudflare’s global edge network. The preview remains pre‑release, and Cloudflare has not confirmed when the feature will graduate to a stable offering. Some libraries still require modest patches to recognize the Emscripten target, and the long‑term performance characteristics of Tokio‑based workloads on the single‑threaded Workers runtime are still being evaluated.