BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News The Creators of the Atom Code Editor Open-Source Zed, Their New Rust-Based High-Performance Editor

The Creators of the Atom Code Editor Open-Source Zed, Their New Rust-Based High-Performance Editor

This item in japanese

Nathan Sobo recently open-sourced Zed, a code editor that focuses on performance, integrates AI capabilities, and supports software teams’ collaboration out of the box. For performance, Zed leverages a Rust code base, multicore- and GPU-optimized code, with a custom Rust GUI framework. For collaboration, Zed relies on CRDTs and team channels. For AI-assisted code generation, Zed supports GitHub Copilot and GPT-4. Zed is currently Mac only.

Sobo explained that among major reasons for open-sourcing Zed are to foster developer adoption and get feedback and support from the community:

We believe that making Zed open source will make it the best product. Our mission is to build the world’s most advanced code editor and get it into the hands of millions of developers. There’s a ton of surface area on that problem, and we’ll need all the help we can get. Considering that all of Zed’s users are programmers, it makes the most sense to open Zed to the maximum pool of talent.

[…] We want to massively grow adoption in 2024 so that more developers can benefit from Zed, and we’ve put together a public roadmap based on user feedback that we think can help us get there. If your contributions help us make progress toward completing that roadmap, especially items near the top, we’ll be more likely to make time for them.

Developers have noticed the miscellaneous performance improvements. One developer on YouTube demonstrated the instant start-up of the Zed editor when compared to Visual Studio Code:

[Visual Studio] Code maybe takes three seconds to get up and going. Now, Zed: instant. This is an IDE that is focused around being fast.

The Zed team credits GPUI, their custom hardware-accelerated UI framework, for UI performance:

We have this hardware in the computer and rather than negotiating what DOM nodes are in the DOM at a given moment, or all this nonsense, we could just literally be like, what color should this pixel be? Great. Okay, if we can program that hardware to decide what color every pixel on the screen should be in parallel, or as parallel as possible — we should probably use that if we want to be fast.

GPUI rasterizes the entire window on the GPU, just like a 3D video game.

While recently open-sourced, GPUI is already used in one other application. A notable drawback is that GPUI runs only on MacOS at the time of writing.

Using Rust is another notable source of performance:

GPUI is a hybrid immediate and retained mode, GPU accelerated, UI framework for Rust.
It’s not just about being native. I also think Rust brings to the table innovations. The language is designed to be used the way we’re using it on multiple threads and at a low level.

One Reddit user evaluated Zed as follows:

A couple of nice things to note:

  • It really is remarkably responsive, and makes one really notice how unresponsive everything else is. I have reasonably fast machines, so we’re not talking about the difference between 5ms typing lag and 500ms, but it’s still pretty surprising. VSCode never felt slow on my Macs until I started using Zed.

  • They seem reasonably responsive to feedback. […]

There are a few downsides that I’m hoping get addressed soon:

  • The collaboration workflow/security isn’t very clear to me. You sign in via GitHub (no other option???), there are ‘contacts’ (I guess these are GitHub usernames?), and ‘channels’ (where do these live? on Zed’s servers?). I would really like to know if I can self-host the chat server and use a company Oauth provider rather than GitHub. If the diffs being passed around are going through Zed’s servers, that may be a showstopper for the company I work for as well. If they’re p2p and encrypted, maybe not.

The code for Zed itself is available under a copyleft license (GPL for the editor, AGPL for server-side components). GPUI is distributed under the Apache 2 license. Interested readers with a MacOS device can download Zed and try it out. The list of Zed features is available on Zed’s website.

About the Author

Rate this Article

Adoption
Style

BT