---
title: "Zed Weekly: #25"
description: "Zed is rewriting its UI framework as GPUI 2 and porting the whole editor onto it before open-sourcing, trading feature work for better ergonomics while keeping GPUI 1's performance."
url: "https://swe.quest/articles/zed-weekly-25-cd3a5f41d4f0b187"
canonical: "https://zed.dev/blog/zed-weekly-25"
source: "Zed"
published: "2023-11-03"
difficulty: "medium"
kind: "Case study"
reading_minutes: 6
tags: ["rust","frontend","refactoring","developer-tools"]
---

# Zed Weekly: #25

A post on [Zed](https://swe.quest/sources/zed.md), published 2023-11-03, 6 min read, Case study. Original: [https://zed.dev/blog/zed-weekly-25](https://zed.dev/blog/zed-weekly-25)

## Summary

Zed is rewriting its UI framework as GPUI 2 and porting the whole editor onto it before open-sourcing, trading feature work for better ergonomics while keeping GPUI 1's performance. All state lives in an AppContext that acts like an application-specific heap: Model\<T\> handles are dereferenced through a context, and models emit and subscribe to events. View\<T\> wraps models whose types implement a Render trait that returns element trees. Components, Tailwind-style styling helpers, a color-scale-based theme system and a new layout engine and executor round out the design. Bottleneck crates (project, workspace, editor) made the port largely serial, so the team leaned on Rust's type system and Zed's collaborative editing to pair on it, with roughly a third to half of the app ported after two weeks.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Rust](https://swe.quest/tags/rust.md) (Languages)
- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)
- [Refactoring & migrations](https://swe.quest/tags/refactoring.md) (Engineering practices)
- [Developer tools](https://swe.quest/tags/developer-tools.md) (Engineering practices)

## Prerequisites

- Rust traits and generics ([easy posts on Rust](https://swe.quest/tags/rust.md?difficulty=easy))
- UI framework concepts

## Keywords

GPUI, Zed, AppContext, Tailwind CSS

## Related posts

- [Why the big rewrite?](https://swe.quest/articles/why-the-big-rewrite-ec307a4c7f73f459.md): Zed · 2024-01-23 · Easy · 21 min read · Rust, Frontend, Refactoring & migrations, Developer tools
  Zed rewrote its Rust UI framework from GPUI 1 to GPUI 2 because the original design blocked fast UI work: a Flutter-style constraints-down/sizes-up layout model, styles split between Rust element code and TypeScript-generated JSON "themes" loaded at runtime, model code entangled with presentation (a legacy of an early Electron/JSON architecture), and weakly typed geometry (raw f32s and usizes).
- [This Week at Zed Industries: #16](https://swe.quest/articles/this-week-at-zed-industries-16-c2caea343c027dbd.md): Zed · 2023-08-18 · Medium · 13 min read · Rust, Frontend, Type systems, Developer tools
  Zed has started using its new channels feature internally, where members can message, talk, share screens and co-edit projects, and plans to use it to stream development and host office hours once the editor is open-sourced.
- [Zed Weekly: #22](https://swe.quest/articles/zed-weekly-22-1c922abde503e316.md): Zed · 2023-10-06 · Easy · 7 min read · Developer tools, Rust, Real-time systems, Product engineering
  Zed team members report weekly progress: GPUI is being rewritten with a ported Metal renderer that uses plane-split for primitive draw ordering, multi-threaded entity access, and a MainThread\<T: Context\> wrapper so native UI APIs are only called from the main thread.
- [This Week at Zed Industries: #8](https://swe.quest/articles/this-week-at-zed-industries-8-7c421eb8ade6414f.md): Zed · 2023-06-23 · Easy · 4 min read · Developer tools, Performance engineering, Frontend, Rust
  Zed's weekly team update covers work on the AI assistant panel (multi-cursor, message splitting, saved conversations), voice collaboration via GPUI, and inlay hint latency and caching.
- [Zed Weekly: #27](https://swe.quest/articles/zed-weekly-27-be3a7010da4c60e0.md): Zed · 2023-11-24 · Medium · 4 min read · Rust, Frontend, Developer tools
  GPUI, Zed's UI framework, settled on its core view traits: \`Render\` builds a view from a mutable reference each frame, \`RenderOnce\` builds composable elements by consuming them, and \`#\[derive(IntoElement)\]\` lets custom components be passed straight to \`div().child(...)\`. gpui2 now sizes UI in \`rem\` units tied to a new \`ui\_font\_size\` setting (default 16px, on a 4px grid), so the interface scales independently of buffer font size, though sub-pixel sizes remain unresolved.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
