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-workflow-guide.mdA 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.textThe 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.textThe 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.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-cloudflare-workers-rust-wrangler-dev-command.textA 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.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-cloudflare-workers-rust-deploy-command.textA 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.textA 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.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-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