cloudflare · Cloudflare Workers Docs
Workers Wasm in JavaScript
Demonstrates how to import, bundle, and instantiate WebAssembly modules within a Cloudflare Worker using JavaScript or TypeScript to accelerate computational tasks.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers Wasm in JavaScript
Demonstrates how to import, bundle, and instantiate WebAssembly modules within a Cloudflare Worker using JavaScript or TypeScript to accelerate computational tasks.
When To Use
Use when you need to integrate high-performance WebAssembly binaries into a JavaScript or TypeScript Cloudflare Worker to handle computationally intensive operations.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-runtime-apis-webassembly-wasm-in-javascript-workflow-guide.md | A guide explaining how to import, bundle, and instantiate WebAssembly modules within Cloudflare Workers using JavaScript. | Questions about a guide explaining how to import, bundle, and instantiate WebAssembly modules within Cloudflare Workers using JavaScr... |
examples/workers-runtime-apis-webassembly-wasm-in-javascript-cloudflare-workers-w.text | A WebAssembly Text format module that imports a JavaScript function and exports a function to demonstrate Wasm integration in Cloudflare Workers. | Exact payloads, commands, or snippets shown in A WebAssembly Text format module that imports a JavaScript function and exports a function to demonstrate Wasm integr... |
examples/workers-runtime-apis-webassembly-wasm-in-javascript-cloudflare-workers-w-2.text | A text command demonstrating how to compile a WebAssembly Text format file to a binary Wasm file using the wat2wasm tool. | Exact payloads, commands, or snippets shown in A text command demonstrating how to compile a WebAssembly Text format file to a binary Wasm file using the wat2wasm t... |
examples/workers-runtime-apis-webassembly-wasm-in-javascript-cloudflare-workers-w-3.text | A JavaScript code example demonstrating how to import a WebAssembly module and instantiate it with an import object within a Cloudflare Workers environment. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to import a WebAssembly module and instantiate it with an import object w... |
What This Skill Covers
- Wasm can be used from within a Worker written in JavaScript or TypeScript by importing a Wasm module, and instantiating an instance of this module using WebA...
- Main sections:
Simple Wasm Module,Bundling,Use from JavaScript,Next steps.
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/runtime-apis/webassembly/javascript
