mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
16456e5392
The QuickJS engine loaded its WASM binaries by base64-decoding bytes and
handing them to QuickJS.create(), which compiles at runtime. workerd bans
that outright ("Wasm code generation disallowed by embedder"), so the
engine could not boot on Cloudflare Workers even though nothing else about
it needs Node.
Route asset loading through getQuickJSAssets(), which returns the generated
defaults unless a host has installed its own via setQuickJSAssets(). A
Workers host imports the .wasm/.so files as pre-compiled
WebAssembly.Modules (wrangler compiles them at bundle time) and installs
them at module init.
The smoke test drives runQuickJSWorkflow through a step + sleep +
completion replay inside wrangler dev, and doubles as a probe for the
platform constraints (node:vm, eval, compression codecs).