Back to Skills

workers-multi-lang

verified

Multi-language Workers development with Rust, Python, and WebAssembly. Use when building Workers in languages other than JavaScript/TypeScript, or when integrating WASM modules for performance-critical code.

View on GitHub

Marketplace

claude-skills

secondsky/claude-skills

Plugin

cloudflare-workers

cloudflare

Repository

secondsky/claude-skills
28stars

plugins/cloudflare-workers/skills/cloudflare-workers-multi-lang/SKILL.md

Last Verified

January 24, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/secondsky/claude-skills/blob/main/plugins/cloudflare-workers/skills/cloudflare-workers-multi-lang/SKILL.md -a claude-code --skill workers-multi-lang

Installation paths:

Claude
.claude/skills/workers-multi-lang/
Powered by add-skill CLI

Instructions

# Multi-Language Workers Development

Build Cloudflare Workers using Rust, Python, or WebAssembly for performance-critical operations.

## Language Comparison

| Feature | JavaScript/TS | Rust | Python |
|---------|---------------|------|--------|
| **Startup** | Fast | Fastest (WASM) | Moderate |
| **CPU Perf** | Good | Excellent | Good |
| **Memory** | Higher | Lower | Higher |
| **Bundle Size** | Smaller | Medium | Larger |
| **Type Safety** | Optional (TS) | Strict | Optional |
| **Best For** | General apps | CPU-intensive | Data/ML |

## Quick Decision

```
Need maximum performance? → Rust/WASM
Heavy computation (crypto, image processing)? → Rust/WASM
Data processing, ML inference? → Python
General web apps? → JavaScript/TypeScript
```

## Top 10 Multi-Lang Errors

| Error | Language | Cause | Solution |
|-------|----------|-------|----------|
| `WebAssembly.instantiate() failed` | Rust | Invalid WASM | Check wasm-pack build output |
| `Module parse failed: Unexpected token` | Rust | ESM/CJS mismatch | Use `--target bundler` |
| `Cannot find module` | Python | Missing dep | Add to pyproject.toml |
| `Out of memory` | All | Large WASM | Enable streaming instantiation |
| `Exceeded CPU time limit` | All | Long computation | Chunk processing |
| `wasm-bindgen version mismatch` | Rust | Dep conflict | Align versions in Cargo.toml |
| `RuntimeError: unreachable` | Rust | Panic in WASM | Add proper error handling |
| `TypeError: not a function` | Rust | Missing export | Add `#[wasm_bindgen]` attribute |
| `Python worker startup timeout` | Python | Slow init | Minimize imports |
| `SharedArrayBuffer not supported` | All | Security | Add COOP/COEP headers |

## Rust Quick Start

```bash
# Install tools
cargo install wasm-pack

# Create project
cargo new --lib my-worker
cd my-worker

# Add to Cargo.toml
cat >> Cargo.toml << 'EOF'
[lib]
crate-type = ["cdylib"]

[dependencies]
wasm-bindgen = "0.2"
worker = "0.3"
console_error_panic_hook = "0.1"

[profile.release]
opt-leve

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
4581 chars

Issues Found:

  • name_directory_mismatch