Zed Weekly: #27
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. On the worktree side, a `file_scan_exclusions` setting now hides files like `.DS_Store`, and project search can reach gitignored files. Extending the fuzzy file finder to gitignored trees is still open, because eagerly scanning and watching huge `node_modules` or `target` directories is costly.
Related posts
- Why the big rewrite?
Zed easyNoviceZed 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). GPUI 2 adopts a Tailwind/Flexbox-inspired Rust DSL with stronger types and one-directional ownership. The migration ran incrementally: GPUI 2 first ran as a prototype on top of GPUI 1, then crates were duplicated (e.g. project_panel2) with the old copies frozen except for bug fixes, which kept the option of sharing code until the final switch.
- Zed Weekly: #25
Zed mediumAdeptZed 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.
- This Week at Zed Industries: #16
Zed mediumAdeptZed 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. Alongside this, GPUI layout and styling are being reworked with the taffy layout engine and Tailwind-like style methods. Antonio proposes `auto` and `prettier` options for the formatter setting. Mikayla walks through a new composable Component primitive for GPUI in Rust: a builder-style trait consumed into an Element, a StylableComponent trait with associated Style/Output types, and the Typestate pattern using `()` as an unbound style, so wrappers like Hover and Toggle compose type-safely and rendering an unstyled component fails at compile time.
- Zed Weekly: #22
Zed easyNoviceZed 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. Channels are being reworked to separate chat-style communication from DAG-structured project notes, with unread indicators, notifications, public channels and deep links on the way. Julia split markdown parsing from rendering for completion documentation, avoiding flicker when grammars load late and speeding up rendering. Other work covers Vue LSP and tree-sitter support, CPU and memory telemetry, and a fix for a follow-loop bug in collaboration.
- Zed Weekly: #29
Zed mediumAdeptZed's port to GPUI 2 is nearing daily usability, and the team is focused on frame-rendering performance measured by holding tab-switch at 60Hz key repeat. Because every element is a boxed trait object, they replaced malloc with a custom thread-local bump arena that enforces safety dynamically instead of via lifetimes, and changed `Element::paint` to take `&mut self` to avoid heap-to-stack copies. The target is full-window redraws under 4ms on an M1, with view caching planned next. Other updates cover a better VS Code theme importer, focus handlers moved to run after each frame draw to fix a split-pane focus bug, and a port of the feedback UI.