Open-Source Wikis

/

Zed

/

Zed

zed-industries/zed

Zed

Zed is a high-performance, multiplayer code editor written in Rust. It was created by the team behind Atom and Tree-sitter, and is developed by Zed Industries, Inc. The project ships a desktop editor (zed), a CLI launcher (cli), a backend collaboration server (collab), a remote development server (remote_server), and a custom GPU-accelerated UI framework (gpui).

What Zed is

Zed is a native code editor with first-class support for collaboration, AI-assisted coding (the "agent"), edit prediction, vim emulation, language servers, debug adapters, terminals, and remote development. It runs on macOS, Linux, and Windows. Performance is the headline goal — Zed renders directly via a GPU-backed framework (gpui) and runs the entire UI on a single foreground thread with explicit async escape hatches to background work pools.

The repository is a Rust monorepo with 231 workspace crates under crates/, totaling roughly 1.3M lines of Rust at the time of this wiki. The largest single crate is editor (147k LOC), followed by agent (100k LOC) and project (~90k LOC).

Audience

This wiki is for engineers contributing to Zed. It assumes familiarity with Rust. It aims to give a navigable mental model of the codebase: where things live, how the major subsystems fit together, and where to start when modifying or extending the editor.

  • Architecture — components, processes, and how they connect
  • Getting started — build, run, test
  • Glossary — Zed-specific vocabulary
  • How to contribute — workflow, PR hygiene, testing
  • Appszed, cli, collab, remote_server, and other binaries
  • Systems — GPUI, project, editor, language services, agent
  • Features — AI agent, edit prediction, vim, debugger, collaboration, remote dev
  • By the numbers — codebase statistics
  • Lore — history of the codebase
  • Reference — configuration, dependencies, data models

Top-level layout

zed/
├── crates/         # 231 Rust workspace crates (the bulk of the code)
├── extensions/     # First-party bundled extensions (proto, html, glsl, ...)
├── assets/         # Fonts, icons, themes, default keymaps, default settings
├── docs/           # mdbook user-facing docs (zed.dev/docs source)
├── script/         # 100+ helper scripts (bootstrap, clippy, releases, sentry, ...)
├── ci/             # CI-only Cargo configuration
├── .github/        # Workflows, issue templates
├── tooling/        # Misc dev tooling
├── legal/          # Third-party license aggregation
├── Cargo.toml      # Workspace manifest (members + shared dependencies)
└── .rules          # Coding rules read by every agent session

The .rules file is symlinked to AGENTS.md, CLAUDE.md, and GEMINI.md so AI coding assistants pick up the same guidance the team uses.

Key facts

  • Language: Rust (edition 2024). Workspace lints and dependencies are centrally managed in the root Cargo.toml.
  • License: GPL-3.0 for application crates, AGPL-3.0 for collab, Apache-2.0 for gpui. Third-party licenses are vetted via cargo-about and script/licenses/zed-licenses.toml.
  • Build tool: Cargo. Clippy runs via ./script/clippy (not cargo clippy directly).
  • Platforms: macOS, Linux, Windows. Per-platform code lives in gpui_macos, gpui_linux, gpui_windows (plus gpui_platform, gpui_wgpu for rendering).
  • Telemetry: First-party Clickhouse pipeline; opt-in for usage analytics, opt-out for crashes.
  • Distribution: Direct downloads from zed.dev/download plus distro-specific packagers. Auto-update is built in (auto_update, auto_update_helper).

Where to start reading code

If you have never opened the codebase before:

  1. crates/zed/src/main.rs — application entrypoint. Sets up the GPUI runtime, reads settings, opens windows, and wires every subsystem together.
  2. crates/gpui/src/gpui.rs — the UI framework. Read GPUI for an overview before fighting with rendering or state.
  3. crates/editor/src/editor.rs — the editor view. The largest crate by LOC; most editor behaviour lives here.
  4. crates/project/src/project.rs — the model of "an open project": worktrees, language servers, tasks, debug adapters, collaboration state.
  5. crates/agent/src/agent.rs and crates/agent_ui/src/agent_ui.rs — the AI agent and its UI panel.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Zed – Zed wiki | Factory