Prompt Buddy logoPrompt Buddy

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.

Import to Prompt Buddy

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

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-rust-index-workflow-guide.mdAn introductory guide for developing Cloudflare Workers using the Rust programming language and the workers-rs crate.Questions about an introductory guide for developing Cloudflare Workers using the Rust programming language and the workers-rs crate.
examples/workers-rust-index-cloudflare-workers-rust-wasm32-target-setup.textThe command to add the wasm32-unknown-unknown target to rustup for Cloudflare Workers development.Exact payloads, commands, or snippets shown in The command to add the wasm32-unknown-unknown target to rustup for Cloudflare Workers development.
examples/workers-rust-index-cloudflare-workers-rust-cargo-generate-installation.textThe command to install cargo-generate for initializing Cloudflare Workers Rust projects.Exact payloads, commands, or snippets shown in The command to install cargo-generate for initializing Cloudflare Workers Rust projects.
examples/workers-rust-index-cloudflare-workers-rust-cargo-generate-command.textThe 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-index-cloudflare-workers-rust-wrangler-dev-command.textA text snippet demonstrating the command to run a Cloudflare Workers Rust project locally using wrangler dev.Exact payloads, commands, or snippets shown in A text snippet demonstrating the command to run a Cloudflare Workers Rust project locally using wrangler dev.
examples/workers-rust-index-cloudflare-workers-rust-hello-world.textA 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-index-cloudflare-workers-rust-deploy-command.textThe wrangler deploy command used to deploy a Cloudflare Workers project written in Rust.Exact payloads, commands, or snippets shown in The wrangler deploy command used to deploy a Cloudflare Workers project written in Rust.
examples/workers-rust-index-cloudflare-workers-rust-wasm-js-interop.textA JavaScript code snippet demonstrating how to handle WebAssembly module imports for both Node.js and the workerd runtime environment.Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to handle WebAssembly module imports for both Node.js and the workerd run...
examples/workers-rust-index-cloudflare-workers-rust-introduction.textAn 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-index-cloudflare-workers-rust-cargo-toml-release-profile.textA 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

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.cloudflare.com/workers/languages/rust/index.md