Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Prerequisites

All generated projects require a current stable Rust toolchain.

For Cloudflare Workers, install:

  • Rust and Cargo
  • the wasm32-unknown-unknown Rust target
  • Node.js
  • pnpm
rustup target add wasm32-unknown-unknown
npm install --global pnpm

The generated project installs Wrangler as a development dependency, so use it through pnpm or pnpm exec.

Projects generated with Cloudflare’s enable-external or queue feature also require Binaryen’s wasm-opt, because those builds apply Asyncify:

brew install binaryen

On other operating systems, install Binaryen using the packages or binaries listed by the Binaryen project.

A Cloudflare account and Wrangler login are required for deployment, but not for creating a project.