Replies: 1 comment
|
In theory, yes, parts of your Worker code could be adapted to run inside an Electron app via TriFrost, especially the routing and middleware logic. What won’t work out of the box are Cloudflare-specific bindings like KV, DurableObject, Vectorize, R2, and Workers AI, since those rely on the workerd runtime. Trifrost’s caching interface however is agnostic so you could swap those for a RedisCache or MemoryCache instance without any rewrite. If you’re using the remote APIs instead of bindings, you’d have more flexibility. I haven’t tested TriFrost directly in an Electron context yet, but technically it supports Node.js under the hood, which Electron’s backend is built on. So if the demand is there, I’d be happy to explore a proper Electron adapter or guide. |
Uh oh!
There was an error while loading. Please reload this page.
So I have a cloudflare Worker code which is using KV, Vectorise, Durable object, R2 and Workers AI. Can I use same code and bundle it as an electron app?.
All reactions