曦远 (DealiAxy)一份私人的文字刊物

StarBlog
返回文章列表折页手记阅读全文
IDE

A Brief Look at Next-Gen Code Editor Zed: Native Rust Performance, GPU Rendering

Zed? A bunch of veterans reinventing the wheel in Rust after Atom failed? The performance is genuinely sick, and that silky GPU-rendered feel is something VSCode never quite learned. Collaboration is pretty interesting too, but is the plugin ecosystem even decent yet?

曦远 (DealiAxy)约 14 分钟
目录11 个章节

Preface

When people mention IDEs, everyone thinks of the JetBrains suite, VSCode, and its many derivatives.

But these mainstream IDEs are also synonymous with being memory hogs and bloated. I recently tried Zed, which is known for being native, lightweight, and high-performance, and found it pretty interesting. This article gives a brief introduction to Zed. I'll follow up later with AI feature configuration and more practical usage scenarios.

About Zed

Zed may be an unfamiliar name to most people. But its team's background is extremely hardcore—you could even say they are heavyweights in the modern code editor space.

The Team

Zed's founding team (Zed Industries) is mainly composed of three big names:

  • Nathan Sobo (CEO): He is the founder of the GitHub Atom editor. During his time at GitHub, he led Atom's development and participated in research on collaborative editing technology (CRDT).
  • Max Brunsfeld: He is the author of Tree-sitter. If you've used a modern editor, you've definitely heard of Tree-sitter—it's the core technology behind silky syntax highlighting and code parsing in today's mainstream editors (including VS Code and Neovim).
  • Antonio Scandurra: Also a core member of the Atom team, and an expert in distributed systems and real-time collaboration.

Why Did They Build Zed?

Simply put, the Atom editor they built back then was just too underwhelming. Although it started the trend of building editors with web technologies, Atom had poor performance and high memory usage, and was left in the dust by Microsoft's later-comer VSCode. After that, Atom was also discontinued by GitHub (which had already been acquired by Microsoft).

The Zed team realized that editors based on a browser engine (Electron) had too low a performance ceiling. So they decided to completely abandon HTML/JS and write the fastest editor from scratch in low-level Rust.

They wanted code editing to be like a game, with every frame rendered by the GPU, eliminating any perceptible latency.

They already wanted to do “real-time multiplayer programming” when developing Atom, but it was hard to achieve on the old architecture, so Zed considered “multiplayer” functionality from the very first line of code.

Summary

In short, this is a group of people who understand editors. After experiencing Atom's failure and bottlenecks, they are using a high-performance language like Rust to try to redefine what development tools should look like in the AI era.

A Few Features

Here I'll briefly analyze a few key features promoted on Zed's official website.

Input Latency

In performance comparisons, Zed emphasizes one metric: insertion latency (Insertion Latency).

Zed's latency is about 58ms, while VS Code's is about 97ms. This gap is similar to switching from a 60Hz screen to a 144Hz screen—you don't notice it until you've used it, and then you can never go back.

This comes from Zed's unique rendering mode. Unlike traditional apps that use system widgets (Retained mode), Zed uses Immediate mode with a Vulkan backend. It treats the editor like a 3D game, with every frame rendered directly by the GPU. Although GPU rendering isn't always faster than CPU-optimized algorithms in partial-update scenarios (such as changing only one line of code), the silky animations and extremely low overall latency it brings have indeed redefined the tactile feel of writing code.

Syntax Analysis

A great editor doesn't just need to be fast—it also needs to “understand” your code. Zed's speed largely benefits from Tree-sitter, developed by its team—a general-purpose parser (syntax parser) generator.

Before Tree-sitter, most editors (including VS Code) were still using TextMate rules based on regex matching. This approach can only handle single lines, and often fails when the code has syntax errors.

Tree-sitter, on the other hand, can build a complete syntax tree in real time and supports incremental updates. This means that whether it's syntax highlighting or autocomplete, Zed can give accurate feedback in milliseconds—even when your code is half-written and the syntax is a mess, it can still precisely identify the code logic.

Collaboration

Besides an extreme single-player experience, Zed also has powerful built-in collaboration features. Unlike traditional screen sharing, Zed implements true real-time multiplayer editing based on CRDTs (Conflict-free Replicated Data Types).

Although it currently can't shake VS Code's position when it comes to Remote features (such as remote server development), its native collaboration experience does make team Pair Programming smoother than ever before.

Summary

Frankly, at this stage Zed still can't fully replace VS Code.

  • Ecosystem gap: VS Code has tens of thousands of plugins, while Zed's plugin library is just getting started.
  • Feature completeness: A disruptive Remote development model like VS Code's currently still has no rival.

Zed doesn't necessarily have to replace that VS Code of yours packed with dozens of plugins and complex configuration. When you need to read source code, rapidly edit a single file, or want to enter a pure writing state, Zed is a solid choice.

In the next article, I'll share how to configure Zed and turn it into your own AI Code Agent.

References

_EOF_

A Brief Look at Next-Gen Code Editor Zed: Native Rust Performance, GPU Rendering

本文作者:
程序设计实验室
版权声明:
本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!

相关文章

讨论

共 0 条

良言一句三冬暖,恶语伤人六月寒。

加载评论中…