01 / Title
Deck 10 ยท deep dive

Under the hood: how Zed actually works.

GPUI, the Rope, the CRDT layer that makes multiplayer work, Tree-sitter, and WASM-sandboxed extensions โ€” mapped against what VSCode's Electron process model and WebStorm's JVM/PSI indexing actually do under their own hoods.

GPUI Rope + CRDT Tree-sitter WASM extensions
02 ยท the core decision

One decision everything else follows from.

VSCode is a web page that happens to edit code. WebStorm is a JVM application with a text-editing plugin at its center. Zed made a different call at the start: no DOM, no JVM โ€” native Rust talks to the GPU directly.

Consequence: every layer above this โ€” the buffer, collaboration, AI, extensions โ€” gets built on primitives designed for an editor specifically, not adapted from a general-purpose document renderer or a general-purpose managed runtime.
03 ยท GPUI

GPUI โ€” Zed's own UI framework.

04 ยท the Rope

The Rope โ€” how the text is actually stored.

A Rope is a balanced tree of text chunks instead of one giant string or a flat array of lines. Editors have used ropes and piece-tables for this reason for decades โ€” VSCode's own Monaco editor uses a comparable piece-tree internally.

Insert / delete

O(log n) โ€” only the path from the edited chunk to the root needs updating, not the whole document.

Large files

Opening a huge file doesn't mean loading and re-indexing one massive string on every keystroke.

Zed's twist

Its Rope is the foundation the CRDT layer builds directly on โ€” see next slide โ€” so multiplayer isn't a separate system bolted alongside it.

05 ยท the CRDT layer

The CRDT layer โ€” how concurrent edits actually merge.

Zed's own engineering blog documents this directly: buffers are an operation-based CRDT (Conflict-free Replicated Data Type) โ€” the same family of data structure Figma uses for multiplayer design.

โ—† Lamport timestamps

Every edit gets a logical clock value, so replicas agree on a consistent ordering of concurrent operations without needing a synchronized wall clock or a central lock.

โ—† Anchors

Cursor and selection positions are stored as anchors that survive concurrent edits elsewhere in the document โ€” your selection doesn't silently drift when a collaborator types above you.

SourceDocumented on Zed's own blog ("How CRDTs make multiplayer text editing part of Zed's DNA") โ€” this isn't a retrofit, it's been the buffer's design since early on.
06 ยท Tree-sitter

Tree-sitter โ€” integrated by its own inventor.

07 ยท language servers

Language intelligence: the same protocol, a leaner client.

Zed doesn't reinvent language intelligence โ€” it's an LSP (Language Server Protocol) client, the same protocol VSCode and, for JS/TS, WebStorm ultimately talk to underneath their own tooling.

Where the win actually is: not "better" language servers โ€” the same ones โ€” but a host process that dispatches to them over an async runtime instead of routing every completion through a browser's JS event loop or a JVM's plugin dispatch layer.
08 ยท extension model

Extensions โ€” compiled to WebAssembly, sandboxed.

โ—† Zed

Extensions compile to WASM and run in a sandbox with a narrow, explicit capability surface โ€” an extension can't reach arbitrary filesystem paths or spawn arbitrary processes unless the API grants it.

โ—† VSCode

Extensions are full Node.js processes โ€” powerful (any npm package, any OS call), but a slow or misbehaving one runs with broad access and can be a real performance or security surface. The move to a separate extension-host process years ago was specifically to keep one bad extension from freezing the UI.

The trade-off is real in both directions: WASM's sandbox is why Zed's extension marketplace is smaller โ€” some things Node's ecosystem makes trivial are genuinely harder to express safely in a sandboxed WASM API.

09 ยท AI architecture

AI features sit on the same buffer model as everything else.

10 ยท process model

Process model, side by side.

ZedVSCodeWebStorm / IntelliJ
One native multi-threaded Rust processChromium renderer process + Node.js extension-host process + child LSP processesOne JVM process hosting the whole IDE, plugins included, + child LSP/build processes
Rust's ownership model โ€” no GC, no data races by constructionV8 garbage collector (JS) + Node's own GC in the extension hostJVM garbage collector, sized to hold the project's semantic index in memory
11 ยท VSCode internals

VSCode's model, in more detail.

12 ยท WebStorm internals

WebStorm's model, in more detail.

13 ยท rendering pipeline

Rendering pipeline, compared.

โšก
Zed

Rust โ†’ GPUI โ†’ GPU compositor. One purpose-built path.

vs
๐ŸŒ
VSCode

JS/TS โ†’ DOM โ†’ CSS layout โ†’ Chromium paint โ†’ compositor. A full browser engine, repurposed.

vs
โ˜•
WebStorm

Java โ†’ Swing/AWT (with newer partial GPU-assisted text rendering) โ†’ platform window.

Every one of these can render text correctly. The difference shows up in how many general-purpose layers sit between a keystroke and the pixel changing.

14 ยท ownership model, concretely

Where Rust's ownership model pays off concretely.

15 ยท threading model

Keeping the UI thread free.

GPUI runs on an async executor: LSP requests, file I/O, git status, and AI calls all get pushed to background tasks, with only the result posted back to update the UI. The rendering thread's job stays narrow โ€” draw the current state โ€” instead of also waiting on a language server or a network call.

Contrast: in a single-process JVM IDE or a browser renderer, a slow synchronous call in the wrong place can visibly stall typing โ€” this is the class of bug both Electron and IntelliJ ecosystems have spent years hardening against with their own async patterns.
16 ยท full comparison

The full comparison, in one table.

LayerZedVSCodeWebStorm
LanguageRustTypeScript / JS (Node), C++Java / Kotlin (JVM)
UI frameworkGPUI (own, GPU-native)Chromium (DOM/CSS)Swing/AWT + IntelliJ Platform
Text structureRope + CRDTPiece-tree (Monaco)Custom document model + PSI
ParsingTree-sitter (native)Tree-sitter (partial) / TextMate grammarsPSI (semantic, project-indexed)
ExtensionsWASM, sandboxedNode.js process, broad accessJVM plugins, broad access
CollaborationBuilt-in (CRDT)Live Share (extension)Code With Me (plugin)
Startup costProcess launchBrowser boot + ext-host bootJVM boot + project indexing
17 ยท why this matters

Why any of this matters day to day.

None of this requires knowing any of the above to benefit from it โ€” but knowing it is why the trade-offs on the honest-caveats slide are worth accepting for what you get back.

18 ยท closing

That's the mechanism. Go feel it.

Benchmarks and architecture diagrams only go so far โ€” the honest test is opening your own real project and typing in it for a week.

Deck 10 ยท Zed Editor โ€” Deep Dive

Deck Controls

SpaceNext slide
Previous slide
Home / EndFirst / last slide
19Jump to slide N
OOverview grid
GGo to slide
FToggle fullscreen
BBlackout screen
?Toggle this help
Click left / right halfPrev / next slide
Swipe (touch)Prev / next slide
Press ? or Esc to close

All slides โ€” click to jump