Use WebAssembly in your extension without custom bundler setup. Extension.js ships with built-in WebAssembly (Wasm) defaults in its Rspack pipeline, so common Wasm workflows work without extra configuration.Documentation Index
Fetch the complete documentation index at: https://extension.js.org/llms.txt
Use this file to discover all available pages before exploring further.
When WebAssembly is a good fit
- You run compute-heavy tasks in your extension (parsing, media, optical character recognition (OCR), transforms).
- You need near-native performance for frequently executed code paths.
- You are reusing existing Wasm modules from web projects.
WebAssembly capabilities
| Capability | What it gives you |
|---|---|
| Built-in Wasm pipeline defaults | Run common Wasm flows without manual bundler wiring |
| Async Wasm support | Load .wasm modules in extension contexts |
| Runtime compatibility helpers | Handle common Wasm ecosystem asset patterns |
| Regular command workflow | Use Wasm with the same dev and build commands |
Template examples
sidebar-transformers-js

What Extension.js enables
The Wasm plugin configures:experiments.asyncWebAssembly = true.wasmin module resolution extensions- Path aliases for common Wasm libraries (for example, ffmpeg for media processing, imagemagick for image manipulation, and tesseract for OCR) so imports resolve correctly at runtime.
How to use
Use Wasm modules in your extension code as part of regular development/build flows:Typical use cases
- Compute-heavy parsing/transforms.
- Media processing pipelines.
- OCR / image processing workflows.
- Performance-sensitive algorithms shared across web/runtime contexts.
Best practices
- Keep Wasm modules focused on hot paths; keep orchestration logic in JavaScript/TypeScript.
- Validate output size and load timing for extension contexts (background, content scripts, pages).
- Test Wasm-heavy flows across browser targets you ship (
chrome,edge,firefox).
Next steps
- Learn more about WebAssembly.
- Learn how Extension.js works with ECMAScript Modules.

