47 model prices

    Developer Tools

    Discord rewrites desktop and mobile clients in Rust, drops Electron

    Discord's Phoenix project swaps Electron and React Native for GPUI and a shared Rust core, and early builds use less RAM, its CTO says.

    Discord is rewriting its desktop and mobile clients in Rust and dropping Electron and React Native, according to CTO Stanislav Vishnevskiy. In the project, codenamed Phoenix, the desktop app is built on GPUI, a GPU-accelerated UI framework from the Zed team. Vishnevskiy says early internal builds use less RAM and start faster.

    On desktop, GPUI takes the place of Chromium and Node.js. Zed's developers created the open-source Rust framework for their own code editor. Vishnevskiy says Discord has used Rust since 2018. Parts of its infrastructure, voice technology and current client already run on it. The company hopes to start user testing soon, he said.

    Mobile apps keep native iOS and Android views and share a common Rust core with desktop. The browser client still renders HTML, while its application logic is compiled to WebAssembly. Embedded web surfaces such as YouTube videos and Activities now call an OS webview, since Electron's bundled browser is gone.

    Early numbers

    Early internal desktop builds use about 290 MB of RAM with two accounts signed in at the same time. Cold start is nearly instant, against 5.5 s on Electron. On mobile, Vishnevskiy demonstrated a load time below 2 seconds for the rewrite. The legacy app takes about 5 seconds.

    The trade-offs

    Developers lose browser-provided features, including text layout, input method integration, screen-reader hooks and right-to-left support. Libraries such as Parley handle some of these gaps, but teams must still integrate them into one coherent interface.

    Tauri also uses a Rust backend with the OS webview, which usually yields smaller executables. Its RAM use on Windows tends to match Electron's, according to the report.

    Related stories