cloudflare · Cloudflare Workers Docs
Workers Rust
A guide to setting up a Rust development environment for Cloudflare Workers, including project initialization with Wrangler, local development workflows, and writing Worker code using the workers-rs crate.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers Rust
A guide to setting up a Rust development environment for Cloudflare Workers, including project initialization with Wrangler, local development workflows, and writing Worker code using the workers-rs crate.
When To Use
Use when you need to initialize a new Rust project for Cloudflare Workers, configure the wasm32 toolchain, or run a local development server for Rust-based Workers.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-rust-workflow-guide.md | A guide covering prerequisites, project creation with Wrangler, local development, and writing Worker code using the workers-rs crate. | Questions about a guide covering prerequisites, project creation with Wrangler, local development, and writing Worker code using the... |
examples/workers-rust-cloudflare-workers-rust-wasm32-target-setup.text | The command to add the wasm32-unknown-unknown target using rustup for Cloudflare Workers development. | Exact payloads, commands, or snippets shown in The command to add the wasm32-unknown-unknown target using rustup for Cloudflare Workers development. |
examples/workers-rust-cloudflare-workers-rust-cargo-generate-installation-command.text | The shell command required to install cargo-generate for initializing Cloudflare Workers Rust projects. | Exact payloads, commands, or snippets shown in The shell command required to install cargo-generate for initializing Cloudflare Workers Rust projects. |
examples/workers-rust-cloudflare-workers-rust-cargo-generate-command.text | The terminal command used to scaffold a new Cloudflare Workers project using the Rust template via cargo generate. | Exact payloads, commands, or snippets shown in The terminal command used to scaffold a new Cloudflare Workers project using the Rust template via cargo generate. |
examples/workers-rust-cloudflare-workers-rust-wrangler-dev-command.text | A text snippet demonstrating the npx wrangler dev command used to develop Cloudflare Workers written in Rust. | Exact payloads, commands, or snippets shown in A text snippet demonstrating the npx wrangler dev command used to develop Cloudflare Workers written in Rust. |
examples/workers-rust-cloudflare-workers-rust-hello-world.text | A basic Rust implementation of a Cloudflare Worker that returns a 'Hello, World!' response using the worker crate. | Exact payloads, commands, or snippets shown in A basic Rust implementation of a Cloudflare Worker that returns a 'Hello, World!' response using the worker crate. |
examples/workers-rust-cloudflare-workers-rust-deploy-command.text | A text snippet demonstrating the npx wrangler deploy command used to deploy a Cloudflare Workers project written in Rust. | Exact payloads, commands, or snippets shown in A text snippet demonstrating the npx wrangler deploy command used to deploy a Cloudflare Workers project written in R... |
examples/workers-rust-cloudflare-workers-rust-wasm-interop-javascript.text | A JavaScript code snippet demonstrating how to switch between Node.js and workerd environments for loading WebAssembly modules in Cloudflare Workers using Rust. | Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to switch between Node.js and workerd environments for loading WebAssembl... |
examples/workers-rust-cloudflare-workers-rust-introduction.text | An introductory overview of using the Rust programming language within the Cloudflare Workers environment. | Exact payloads, commands, or snippets shown in An introductory overview of using the Rust programming language within the Cloudflare Workers environment. |
examples/workers-rust-cloudflare-workers-rust-cargo-toml-release-profile.text | A Cargo.toml configuration snippet defining release profile optimizations including LTO, stripping, and codegen units for Cloudflare Workers in Rust. | Exact payloads, commands, or snippets shown in A Cargo.toml configuration snippet defining release profile optimizations including LTO, stripping, and codegen units... |
What This Skill Covers
- Cloudflare Workers provides support for Rust via the workers-rs crate ↗, which makes Runtime APIs and bindings to developer platform products, such as Worker...
- Main sections:
Prerequisites,1\. Create a new project with Wrangler,2\. Develop locally,3\. Write your Worker code,Related runtime APIs.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.cloudflare.com/workers/languages/rust
