Osegi
Software·1 min read

Discord ditches Electron and rewrites its clients in Rust

Discord is building new desktop and mobile clients in Rust, dropping Electron and React Native. A test build runs on about 290 MB of RAM, and user testing is planned soon.

Discord logo beside the Rust programming language crab mascot on a dark background, representing the client rewrite.
Image: Хабр

Discord is developing new clients for computers and smartphones and moving away from Electron on desktop and React Native on mobile. The company is rewriting the client code in Rust and plans to begin testing with users in the near future.

A GPU-rendered desktop app

The desktop interface will be rebuilt on GPUI, a Rust framework with GPU rendering that the Zed team created for its code editor. The system WebView will handle embedded web content, including the mini-games in the activities section. The team is also working on a native Linux client.

On iOS and Android, the apps will get a native interface and share Rust code with the desktop version. In the browser, the interface will be drawn with HTML, while the application logic runs through WebAssembly.

Early memory figures

Discord co-founder and CTO Stanislav Vishnevskiy shared a screenshot of a test build called Discord Phoenix in the Windows Task Manager. The app used just 290 MB of RAM. According to Vishnevskiy, two accounts were active in the app at the time.

The figure is a single data point from an early build, so it says little about final performance. Still, memory use has long been a common complaint about Electron-based apps, which bundle a full browser engine, and a lighter footprint would be a visible change for users.

Rust is not new to Discord, which has used the language since 2018. In 2020, the company described how it moved its service for tracking channels and read messages to Rust. The new project extends that approach from backend services to the client applications themselves.

Apps worth a look

SUMO: the number puzzle

Tap the right tiles, add them up, hit the target. Easy to learn, hard to master. Free, for all ages.

Tags:discordrustelectronreact nativegpuiwebassembly

More from this day

See all →

More in: Software

See all →