4 ms·
Head in the Zed Cloud
- mariopt 1y agoBeen using CF Workers with JavaScript and I absolutely love it. What is performance overhead when comparing rust against wasm? Also think the time for a FOSS alternative is coming. Serverless without, virtually, cold starts is here to stay but being tied to only 1 vendor is problematic.
- wmf 1y agoWorkerd is already open source so that's a good start.
- kevincox 1y agoIt surely depends on your use case. Testing my Ricochet Robots solver (https://ricochetrobots.kevincox.ca/ https://ricochetrobots.kevincox.ca/) which is pure computation with effectively no IO the speed is basically indistinguishable. Some runs the WASM is faster sometimes the native is faster. On average the native is definitely faster but it is surprisingly within the noise. Last time I compared (about 8 years ago) WASM was closer to double the runtime. So things have definitely improved. (I had to check a handful of times that I was compiling with the correct optimizations in both cases.)
- pmarreck 1y agoThe stats I've seen show a 10-20% loss in speed relative to natively-compiled, which is effectively noise for all but the most critical paths. It may get even closer with WASM3, released 2 months ago, since it has things like 64 bit address support, more flexible vector instructions, typed references (which remove runtime safety checks), basic GC, etc. https://webassembly.org/news/2025-09-17-wasm-3.0/ https://webassembly.org/news/2025-09-17-wasm-3.0/
- jsheard 1y agoUnfortunately 64bit address suppport does the opposite, that comes with a non-trivial performance penalty because it breaks the tricks that were used to minimize sandboxing overhead in 32bit mode. https://spidermonkey.dev/blog/2025/01/15/is-memory64-actually-worth-using.html https://spidermonkey.dev/blog/2025/01/15/is-memory64-actuall...
- pmarreck 1y ago1) This may be temporary. 2) The bounds checking argument is a problem, I guess? 3) This article makes no mention of type-checking, which is also a new feature, which moves some checks that normally only run at runtime to only needing to be checked once at compile time, and this may include bounds-style checks
- laktek 1y ago> Also think the time for a FOSS alternative is coming. Serverless without, virtually, cold starts is here to stay but being tied to only 1 vendor is problematic. Supabase Edge Functions runs on the same V8 isolate primitive as Cloudflare Workers and is fully open-source (https://github.com/supabase/edge-runtime https://github.com/supabase/edge-runtime). We use the Deno runtime, which supports Node built-in APIs, npm packages, and WebAssembly (WASM) modules. (disclaimer: I'm the lead for Supabase Edge Functions)
- mariopt 1y agoIt would be interesting if Supabase allows me to use that runtime without forcing me to use supabase, being a separated product on its own. Several years ago, I used MeteorJs, it uses mongo and it is somehow comparable to Supabase. The main issue that burned me and several projects was that It was hard/even impossible to bring different libraries, it was a full stack solution that did not evolved well, it was great for prototyping until it became unsustainable and even hard to on board new devs due to “separating of concerns” mostly due to the big learning curve of one big framework. Having learn for this, I only build apps where I can bring whatever library I want. I need tool/library/frameworks to as agnostic as possible. The thing I love about CloudFlare workers is that you are not force to use any other CF service, I have full control of the code, I combine it with HonoJs and I can deploy it as a server or serverless. About the runtimes: Having to choose between node, demo and bun is something that I do not want to do, I’m sticking with node and hopefully the runtimes would be compatible with standard JavaScript.
- laktek 1y ago>It would be interesting if Supabase allows me to use that runtime without forcing me to use supabase, being a separated product on its own. It's possible for you to self-host Edge Runtime on its own. Check the repo, it has Docker files and an example setup. > I have full control of the code, I combine it with HonoJs and I can deploy it as a server or serverless. Even with Supabase's hosted option, you can choose to run Edge Functions and opt out of others. You can run Hono in Edge Functions, meaning you can easily switch between CF Workers and Supabase Edge Functions (and vice versa) https://supabase.com/docs/guides/functions/routing?queryGroups=framework&framework=hono https://supabase.com/docs/guides/functions/routing?queryGrou... > Having to choose between node, demo and bun is something that I do not want to do, I’m sticking with node and hopefully the runtimes would be compatible with standard JavaScript. Deno supports most of Node built-in API and npm packages. If your app uses modern Node it can be deployed on Edge Functions without having to worry about the runtime (having said that, I agree there are quirks and we are working on native Node support as well).
- tomComb 1y agoWorkers is a v8 isolates runtime like Deno. v8 and Deno are both open source and Deno is used in a variety of platforms, including Supabase and ValTown. It is a terrific technology, and it is reasonably portable but I think you would be better using it in something like Supabase where are the whole platform is open source and portable, if those are your goals.
- kentonv 1y agoThe Cloudflare Workers runtime is open source: https://github.com/cloudflare/workerd https://github.com/cloudflare/workerd People can and do use this to run Workers on hosting providers other than Cloudflare.
- yencabulator 1y agoIt's also worth noting that workerd is only a part of the Cloudflare Workers stack. It doesn't have the same security properties. https://github.com/cloudflare/workerd#warning-workerd-is-not-a-hardened-sandbox https://github.com/cloudflare/workerd#warning-workerd-is-not... (I know you know this, but frankly you should add a disclaimer when you comment about CF or Capnp. It's too convenient for you to leave out the cons.)
- kentonv 1y agoJob scheduling and tenant sandboxing are generally the responsibility of the hosting provider, not the JS runtime. If you are going to run workerd on, say, Lambda, then you rely on Lambda for these things, not workerd. No other server JS runtime offers hardened sandboxing either -- they all defer to the hosting provider. (Though if we assume no zero-days in V8, then workerd as-is actually does provide strong sandboxing, at least as strong as (arguably stronger than) any other JS runtime. Unfortunately, V8 does in fact have zero-days, quite often.) What mariopt said above was: "being tied to only 1 vendor is problematic." My point here is that when you build on Workers, you are not tied to one provider, because you can run workerd anywhere. And we do, in fact, have former customers who have migrated off Cloudflare by running workerd on other providers. > frankly you should add a disclaimer when you comment about CF or Capnp I usually do. Sometimes I forget. But my name and affiliation is easily discovered by clicking my profile. I note that yours is not.
- yencabulator 1y agoI think it's pretty well understood that Cloudflare does not actually deploy a VM/container/etc per tenant, but you guys are relying on something like detecting bad behavior and isolating or punishing tenants that try to use attacks in the style of rowhammer: https://developers.cloudflare.com/workers/reference/security-model/ https://developers.cloudflare.com/workers/reference/security... -- so there is secret sauce that is not part of workerd, and one cannot get the same platform as open source. Meanwhile, somebody like Supabase is making the claim that what you see as open source is what they run, and Deno says their proprietary stuff is KV store and such, not the core offering. Now, do these vendors have worse security, by trusting the V8 isolates more? Probably. But clearly Cloudflare Workers are a lot more integrated than just "run workerd and that's it" -- which is the base Supabase sales pitch, with Postgrest, their "Realtime" WAL follower, etc. (I am not affiliated with any of the players in this space; I have burned a few fingers trying to use Cloudflare Workers, especially in any advanced setup or with Rust. You have open, valid, detailed, reproducible, bug reports from me.)
- imron 1y agoIn code I’ve worked on, cold starts on AWS lambda for a rust binary that handled nontrivial requests was around 30ms. At that point it doesn’t really matter if it’s cold start or not.
- cedws 1y agoPost is a bit sparse on details and seems to be more about the backend than the infra itself. Would be interested to hear more.
- pmarreck 1y agoThe choice to go to WebAssembly is an interesting one. WASM3, especially (released just 2 months ago), is really gunning for a more general-purpose "assembly for everywhere" status (not just "compile to web"), and it looks like it's accomplishing that. I hope they add some POSIXy stuff to it so I can write cross-platform commandline TUI's that do useful things without needing to be recompiled on different OS/chip combos (at the cost of a 10-20% reduction from native compilation- not a critical loss for all but the most important use-cases) and are likely to simply keep working on all future OS/chip combos (assuming you can run the wasm, of course)
- andyferris 1y ago> I hope they add some POSIXy stuff to it Are you aware of WASI? WASI preview 1 provides a portable POSIXy interfance, while WASI preview 2 is a more complex platform abstraction beast. (Keeping the platform separate from the assembly is normal and good - but having a common denominator platform like POSIX is also useful).
- syrusakbary 1y agoI'd go a bit further. If you want full POSIX support, perhaps WASIX is the best alternative. It's WASI preview 1 + many missing features, such as: threads, fork, exec, dlopen, dlsym, longjmp, setjmp, ... https://wasix.org/ https://wasix.org/
- samarthr1 1y agoMy understanding of the wasm execution model was that it was fundamentally single threaded?
- syrusakbary 1y agoI don't think that's accurate, although it's true that needs extra work to work properly in JS based environments. You can already create threads in Wasm environments (we got even fork working in WASIX!). However, there is an upcoming Wasm proposal that adds threads support natively to the spec: https://github.com/WebAssembly/shared-everything-threads https://github.com/WebAssembly/shared-everything-threads
- bluehatbrit 1y agoThe attempts at collaborative tools in Zed was always far more interesting to me than the AI stuff. Don't get me wrong, their AI stuff is nice and works well for me, but it's hardly necessary in an editor with how good Claude Code and others are. But the times I've used the collaboration tooling in Zed have been really excellent. It just sucks it's not getting much attention recently. In particular I'd really like to see some movement on something that works across multiple different editors on this front. I'm glad to hear they're still thinking about these kind of features.
- hresvelgr 1y agoThe thing that made me go "oh damn" was finding out the debugger is multiplayer.
- giancarlostoro 1y agoYeah, I am also glad that they are not exclusive about how you use AI which is what makes it better. They need to stop marketing the AI stuff it puts off some people. They need to advertise how versatile they are.
- ashishb 1y agoHow is Rust + Web Assembly + Cloudflare workers in pricing and performance compared to say deploying Rust-based Docker images on Google Cloud Run or AWS Fargate?
- ashwindharne 1y agoI think performance takes a hit due to WASM, and I imagine pricing is worse at big qps numbers (where you can saturate instances), but I've found that deploying on CF workers is great for little-to-no devops burden. Scales up/down arbitrarily, pretty reasonable set of managed services, no cold start times to deal with, etc. Only issue is that some of the managed services are still pretty half-baked, and introduce insane latency into things that should not be slow. KV checks/DB queries through their services can be double-to-triple digit ms latencies depending on configs.
- jarjoura 1y agoI ended up using container service on azure for a small rust project that I built in a docker container and published to GitHub. GitHub actions publishes to the azure service and in the 3 years I have been running it, it's basically been almost entirely free.
- ashishb 1y agoI have a similar experience except I use Go+GitHub Actions+Google Cloud Run.
- yencabulator 1y agoThe performance hit is less because of WASM but because the Workers platform is fundamentally defined in terms of Javascript and WASM is just a thing the JS engine has as a feature, so everything has to be proxied through JS objects and code, serialized into byte arrays, handed to the WASM, and same story in reverse. We need WASM-native interfaces to get common to get rid of JS.
- resonious 1y ago
- orliesaurus 1y agoi didn't realize the cloud side of an editor had grown to ~70k lines of Rust already… and this work is laying the foundation for collaborative coding with DeltaDB. BUT it's worth noting that WebAssembly still has some performance overhead compared to native, the article chooses convenience and portability over raw speed, which might be fine for an editor backend.
- kwikiel 1y agoI wish Zed would implement support for Jupyter notebooks first. Maybe this sounds like a thing I can contribute
- pprotas 1y agoIt’s coming, there is already basic support for Jupyter kernels https://zed.dev/docs/repl https://zed.dev/docs/repl
- Palmik 1y agoI migrated to using the # %% syntax in plain .py files. For me, it's a superior experience anyway. I also prefer it in editors that support both (like VS code). You can run the REPL with a Jupiter kernel as well. https://zed.dev/docs/repl#cell-mode https://zed.dev/docs/repl#cell-mode
- esquire_900 1y agoIs the dependancy on Cloudflare worth the saved time in infrastructure? Getting a big bare metal and deploying a docker should go a long way. This implementation sounds fully dependant on a service that Zed has little to say about.
- hobofan 1y agoFYI: Cloudflare provides an open source version of their Workers runtime[0], so the lock-in isn't as strong as it once was. [0]: https://github.com/cloudflare/workerd https://github.com/cloudflare/workerd
- hoppp 1y agoI think if the end game is to run workers runtime then they could also run something else from the start. Its gonna be hard to compete with the scaling cloudflare offers if they migrate to their own dedicated infra, but it of course would become much cheaper than paying per request