denoflare
denoflare copied to clipboard
denoflare serve: WorkerD support?
Now that workerd is working reasonably well: https://github.com/cloudflare/workerd
Should we add support to be able to start/watch it in the same way wrangler dev --experimental-local does? Since the APIs are emulated the same, it shouldn't matter if its deno or node style post-bundling using this worker.
👍 I would love to have workerd as a local option for serve - good long-term goal.
First step would be to find/make a Deno package to manage workerd. It does not have implementations for any Cloudflare service APIs like KV, so we'd need a way to pass our implementations down for it to use.
Denoflare's default isolation mode already rpc-ifies these service APIs, so they can be threaded out through the permissionless isolate, and in preparation for a process-based isolation mode, once https://github.com/denoland/deno/issues/10750 is implemented. This work might make remoting down to a separate workerd process a bit easier than starting from scratch.
Some of the missing features and sandbox warnings in the current workerd readme are also an indication to me that this might be a longer-term vision rather than a shorter-term viable project.