Discord Rewrites Desktop and Mobile Clients in Rust Using Zed's GPU-Accelerated Rendering Framework
Discord’s CTO Stanislav Vishnevskiy recently announced rewriting its desktop and mobile clients in Rust, moving away from Electron and React Native. The project eliminates layers of abstraction to directly leverage the device’s GPU, native mobile views, and a Rust core shared across platforms. Early results hint at a significant reduction in RAM usage and boot time for chat, voice, and streaming.…
Discord's CTO, Stanislav Vishnevskiy, recently announced plans to rewrite the company's desktop and mobile clients using Rust and the GPU-accelerated rendering framework, Zed's GPUI. The project, codenamed Phoenix, aims to eliminate layers of abstraction, allowing the app to directly leverage the device's GPU, native mobile views, and a shared Rust core across platforms. Early results suggest a significant reduction in RAM usage and boot time for chat, voice, and streaming.
The shift away from Electron and React Native is part of Discord's ongoing adoption of Rust, which has been used in various infrastructure components since 2018. With the desktop app now being built in Rust and leveraging GPUI, it will no longer use Chromium/Node.js. Instead, the app will share its app code with desktop via Rust, while mobile retains native UI and shares code with desktop through Rust.
GPUI, the open-source Rust UI framework developed by the Zed team, is what powers the new desktop app. Zed, the code editor behind GPUI, focuses on performance and user experience, appealing to developers who prioritize speed over a one-size-fits-all approach. Discord's mobile app rewrite will drop React Native, using native iOS and Android views and reusing a common Rust core instead.
The browser client will render HTML with the application logic layer compiled to WebAssembly, with embedded web surfaces invoking an OS webview, as Electron's built-in browser is no longer available.
The motivations behind this rewrite include decreased RAM usage, faster startup times, and reduced latency. Early internal builds of the desktop app show RAM usage around 290 MB (measured with two accounts logged in simultaneously) and a near-instant cold start compared to 5.5 seconds on Electron. Mobile tests reveal a load time under 2 seconds for the rewritten app, compared to approximately 5 seconds for the legacy app.
These improvements are significant, as they showcase the potential benefits of using Rust and GPUI for Discord's clients.
Written by urgent.news from InfoQ's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.