A map of the machine.
A first-pass guide to Zed's Rust workspace: major layers, text paths, and the boundaries that deserve deeper source tracing.
A workspace, not a monolith
Zed is a Rust workspace whose responsibilities are split across crates. The application crate is only one part of the system: UI infrastructure, editing, text representation, language support, project management, and collaboration are implemented in separate areas.
Verified scope: the paths below are concrete entry points in the upstream repository. The diagram is a conceptual guide, not a complete dependency graph.
crates/ ├── zed/ application ├── gpui/ UI framework ├── editor/ editor behavior ├── text/ buffer and text model ├── rope/ chunked text representation ├── sum_tree/ summary-indexed tree ├── language/ language and syntax infrastructure ├── lsp/ language-server protocol └── project/ project and workspace behavior
The text path
The current investigation follows the route from editor-facing operations into the buffer model and then down through rope storage and the summary tree.
Editor
└─ Buffer / BufferSnapshot
├─ fragment and insertion indexes
└─ Rope
└─ SumTree
└─ Chunk + bitmap metadata
Relevant source entry points: crates/editor, crates/text, crates/rope, and crates/sum_tree.
The UI runtime
crates/gpui is a separate investigation track. It deserves its own pass over element composition, layout, event dispatch, rendering, platform boundaries, and scheduling. This first architecture page deliberately avoids claims about frame timing or rendering performance until those paths have been inspected.
Language and project services
language, lsp, and project provide another major axis of the editor. The exact dependency direction and runtime call paths need to be traced from concrete features rather than inferred from crate names.
Next investigations
- Trace one local edit through buffer mutation and operation construction.
- Trace one language-server request from editor action to transport and response handling.
- Map GPUI layout and event lifecycles from public API to platform renderer.
- Pin each finished investigation to a specific upstream commit.