@boshen_c: Published Oxc packages that run on Cloudflare Workers using the wasm32-wasip1 target. Demo:
Summary
Oxc packages now run on Cloudflare Workers using the wasm32-wasip1 target, with live demos and deployment instructions.
View Cached Full Text
Cached at: 08/10/26, 05:26 AM
Published Oxc packages that run on Cloudflare Workers using the wasm32-wasip1 target.
Demo: https://t.co/WGbxnrjS9F
Boshen/oxc-wasip1-workers
Source: https://github.com/Boshen/oxc-wasip1-workers
Oxc WASI bindings on Cloudflare Workers
Runnable Cloudflare Workers demos for Oxc’s threadless wasm32-wasip1 N-API bindings:
@oxc-parser/binding-wasm32-wasip1@oxc-minify/binding-wasm32-wasip1@oxc-transform/binding-wasm32-wasip1@oxc-transform-react/binding-wasm32-wasip1
Each Worker imports a precompiled WebAssembly module and instantiates the N-API binding inside its request handler, where Cloudflare permits WASI initialization.
Live demos
curl -fsS https://oxc-wasip1-parser-yx3a4w.boshenc.workers.dev/
curl -fsS https://oxc-wasip1-minify-yx3a4w.boshenc.workers.dev/
curl -fsS https://oxc-wasip1-transform-yx3a4w.boshenc.workers.dev/
curl -fsS https://oxc-wasip1-transform-react-yx3a4w.boshenc.workers.dev/
Every endpoint returns JSON containing "ok": true, its package version, and package-specific output.
Run locally against Cloudflare’s remote runtime
Install dependencies:
npm ci
Start any demo through Wrangler’s remote preview:
npm run dev:parser
npm run dev:minify
npm run dev:transform
npm run dev:transform-react
Run the bundle checks and verify the deployed endpoints:
npm run check
npm run test:remote
Deploy
Authenticate Wrangler, then deploy one or all Workers:
npx wrangler login
npm run deploy:parser
npm run deploy:all
The four Workers are kept separate so every compressed bundle remains comfortably below Cloudflare’s Worker size limits.
To remove them:
npx wrangler delete --name oxc-wasip1-parser-yx3a4w --force
npx wrangler delete --name oxc-wasip1-minify-yx3a4w --force
npx wrangler delete --name oxc-wasip1-transform-yx3a4w --force
npx wrangler delete --name oxc-wasip1-transform-react-yx3a4w --force
Integration details
Use the .wasm-suffixed package export so Wrangler classifies the import as a compiled WebAssembly module:
import parserWasm from "@oxc-parser/binding-wasm32-wasip1/wasm.wasm";
import { instantiate } from "@oxc-parser/binding-wasm32-wasip1/workerd";
Start instantiation inside fetch(), not at module scope. The demos cache the resulting promise so warm requests reuse the same binding:
let bindingPromise;
function getBinding() {
bindingPromise ??= instantiate(parserWasm);
return bindingPromise;
}
The low-level parser binding returns serialized AST data through result.program. Decode it with JSON.parse(result.program).node, as shown in src/parser.js.
Project layout
src/parser.jsparses TypeScript and inspects its AST.src/minify.jsminifies JavaScript.src/transform.jsremoves TypeScript syntax.src/transform-react.jsruns the React Compiler and JSX transform.scripts/test-remote.mjschecks all live endpoints.
License
MIT
This demo was created with AI assistance and reviewed through live Cloudflare Worker execution.
Similar Articles
@konghayao: If I Had Seen This Project Sooner, I Wouldn't Have Needed to Develop cellp
Reposted and commented on @elliothux's open-source open-compute project: it packages the entire Cloudflare Workers platform into a single zero-dependency binary, with KV, D1, R2, DO, Queues, Workflows, and the full ecosystem built in. It uses extremely few resources and can be deployed in one minute.
Cloudflare Python Workers are now generally available
Cloudflare Python Workers have reached general availability, enabling Python code execution on their edge network via WebAssembly and Pyodide after a two-year preview period.
Workers Cache
Cloudflare launches Workers Cache, a tiered cache that sits in front of Workers, allowing cached responses to be served without invoking the Worker, reducing CPU time and improving performance.
Wanix — Wasm-native Unix sandboxing for the web
Wanix is a Wasm-native Unix sandboxing tool that lets you run and interact with real Wasm and x86 programs entirely in the browser using Web Components, inspired by Plan 9.
cloudflare/computer
Cloudflare Computer is a preview virtual filesystem built on Durable Objects, with pluggable runtimes for containers, shell, and JavaScript, enabling stateful serverless compute on Cloudflare Workers.