denoflare icon indicating copy to clipboard operation
denoflare copied to clipboard

denoflare serve: WorkerD support?

Open JustinGrote opened this issue 2 years ago • 1 comments

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.

JustinGrote avatar Dec 08 '22 20:12 JustinGrote

👍 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.

johnspurlock-skymethod avatar Dec 08 '22 21:12 johnspurlock-skymethod