Workflow currently depends on Node's node:vm module for workflow execution (runInContext / VM contexts). That blocks Cloudflare Workers runtime implementations: even with nodejs_compat, Wrangler/Workers currently expose node:vm as a non-functional unenv stub, so calling vm.runInContext() fails with:
[unenv] vm.runInContext is not implemented yet!
This means community Cloudflare worlds can provide storage/queue backends, but a workbench deployed directly to Cloudflare Workers cannot run the actual Workflow e2e suite until Workflow has a runtime execution path that does not rely on node:vm.
Relevant community-world PRs:
Likely related work: @TooTallNate's QuickJS snapshot runtime PR, which appears to remove the node:vm dependency as a side effect:
I tested a minimal Wrangler worker locally with compatibility_flags = ["nodejs_compat"] that imports node:vm and calls vm.runInContext("1 + 1", vm.createContext({})); it returns a 500 with the unenv error above.
Once the QuickJS/snapshot runtime or another Worker-compatible execution path lands, we should be able to revisit Cloudflare Workers e2e coverage for these community worlds.
Workflow currently depends on Node's
node:vmmodule for workflow execution (runInContext/ VM contexts). That blocks Cloudflare Workers runtime implementations: even withnodejs_compat, Wrangler/Workers currently exposenode:vmas a non-functional unenv stub, so callingvm.runInContext()fails with:This means community Cloudflare worlds can provide storage/queue backends, but a workbench deployed directly to Cloudflare Workers cannot run the actual Workflow e2e suite until Workflow has a runtime execution path that does not rely on
node:vm.Relevant community-world PRs:
Likely related work: @TooTallNate's QuickJS snapshot runtime PR, which appears to remove the
node:vmdependency as a side effect:I tested a minimal Wrangler worker locally with
compatibility_flags = ["nodejs_compat"]that importsnode:vmand callsvm.runInContext("1 + 1", vm.createContext({})); it returns a 500 with the unenv error above.Once the QuickJS/snapshot runtime or another Worker-compatible execution path lands, we should be able to revisit Cloudflare Workers e2e coverage for these community worlds.