Discord Rewrites Desktop Client in Rust, Replacing Electron with GPUI
Discord is rewriting its desktop client in Rust using the GPUI framework, replacing Electron to drastically reduce memory usage from 1–2 GB to around 290 MB, while sharing core logic with mobile apps via Rust.
Discord co‑founder and CTO Stanislav Vishnevskiy confirmed that the company is rewriting its desktop client in Rust, replacing the long‑standing Electron version with a fully native application built on the GPUI framework. The announcement was made on X, with a target reveal date of November 4, 2026. Mobile apps will keep their platform‑native UIs, but core application logic will be shared across desktop and mobile through Rust.
Vishnevskiy described the rewrite as the culmination of years of investment in Rust, which Discord has used since 2018 for infrastructure, voice technology, and parts of the existing client. The hardest step was moving the entire client to Rust; both Electron and React Native will be removed. User testing is expected soon, though a final release date remains unset.
Memory usage is the most immediate win
The current Electron client typically consumes 1–2 GB under normal use (Discord’s own target is under 1 GB), and some users have seen it climb to around 4 GB. Discord even tested automatic restarts when memory exceeded that threshold. The new client, internally codenamed Discord Phoenix, shows roughly 290 MB with two accounts open in a Task Manager screenshot. The new process model is a single lightweight binary instead of Electron’s Chromium multi‑process tree.
GPUI: a GPU‑accelerated UI framework from the Zed team
GPUI blends immediate‑mode and retained‑mode rendering: developers describe UI each frame in a React‑like style, while the framework retains an element tree and diffs it for efficient GPU updates. Rendering goes directly to platform graphics APIs — Metal on macOS, DirectX on Windows, wgpu on Linux — bypassing browser engines and system WebViews. There is no DOM, no JavaScript‑to‑native RPC boundary; event handlers are plain Rust closures. Styling uses a Tailwind‑inspired builder API.
A minimal view example:
struct Counter { count: i32, } impl Render for Counter { fn render(&mut self, _window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement { div() .flex() .flex_col() .gap_3() .child(format!("Count: {}", self.count)) .child( div() .on_click(cx.listener(|this, _, _, cx| { this.count += 1; cx.notify(); })) .child("Add"), ) } }Styled elements are built via chained calls:
div() .flex() .flex_col() .gap_3() .justify_center() .items_center() .bg(rgb(0x505050)) .text_xl() .child("Hello, world")Electron vs. GPUI comparison
Language / Runtime: Electron uses JavaScript + Node.js + Chromium; GPUI uses Rust
Rendering: Electron uses browser engine (Chromium); GPUI uses GPU accelerated (Metal / DirectX / wgpu)
UI Model: Electron uses Web (HTML/CSS/JS); GPUI uses hybrid immediate/retained mode
Process Model: Electron uses multi‑process (main + renderer); GPUI typically uses single process
Memory Baseline: Electron high (Discord often 1–2 GB or more); GPUI noticeably lower (observed ~290 MB)
Event Handling: Electron across JS/native boundary; GPUI native Rust closures
Styling: Electron CSS / frameworks; GPUI Tailwind‑style Rust builder API
Cross‑platform: Electron strong (via Chromium); GPUI per‑platform native graphics backends
Ecosystem Maturity: Electron very mature, huge community; GPUI newer, smaller (originated from Zed)
Typical Use Case: Electron rapid cross‑platform desktop apps; GPUI high‑performance native UI
Vishnevskiy explicitly ruled out Tauri. The new app’s look and feel will match the current client; system WebViews will only embed specific content like YouTube or Activities. Discord maintains its own patches on top of GPUI and plans to contribute useful changes upstream.
This architecture enables extensive code reuse between desktop and mobile while keeping mobile UIs native. Previously, desktop used Electron and mobile used React Native. On the backend, Discord earlier migrated services such as Read States from Go to Rust, achieving measurable latency improvements that paved the way for the client rewrite.
For engineering teams considering a similar migration, the trade‑offs are clear: higher upfront implementation cost and a smaller ready‑made UI component ecosystem, in exchange for eliminating Chromium’s memory and process overhead, tighter integration with platform graphics and input, memory‑safe language guarantees, and shared non‑UI business logic across device form factors. Community reaction has been enthusiastic given long‑standing frustration with Electron’s resource consumption in popular desktop apps. Whether these performance gains hold under full feature parity and heavy real‑world loads (multi‑account, media‑heavy scenarios) will only be known when broader testing begins.
References
https://x.com/svishnevskiy/status/2118081920194203799
https://www.invenglobal.com/articles/28182/discord-cto-confirms-the-desktop-and-mobile-apps-are-being-rebuilt-in-rust
https://www.windowslatest.com/2026/11/05/discord-is-killing-its-electron-app-that-can-eat-4gb-of-ram-on-windows-11-and-the-rust-rebuild-uses-just-290mb/
https://gpui.rs/
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
High Availability Architecture
Official account for High Availability Architecture.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
