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

Project Templates

Each template is a complete platform adapter, not only a deployment configuration.

TemplateHost
cloudflareCloudflare Workers JavaScript host plus a Rust Wasm crate
cloudrunNative Rust HTTP server packaged with Docker
fastlyFastly Compute Rust application
spinSpin component
serviceworkerBrowser Service Worker example
webworkerBrowser Web Worker example

The CLI replaces project-name placeholders while copying the selected template. A feature is an overlay that replaces or adds files after the base template is copied.

Cloudflare build scripts

A generated Cloudflare project provides:

ScriptBehavior
pnpm run devBuild the selected Wasm mode and run Wrangler
pnpm run deployBuild the selected Wasm mode and deploy with Wrangler
pnpm startRun Wrangler without rebuilding
pnpm testRun the JavaScript tests with Vitest

The exact Wasm build script name depends on the selected feature: build:wasm:vanilla, build:wasm:asyncify, or build:wasm:queue.

See Cloudflare Workers for the generated layout and configuration.