The Spectrum Dispatch News

technology

Discord ditches Electron framework, rewrites app in Rust to slash RAM usage

The messaging platform is moving its desktop and mobile clients to Rust, aiming to cut memory consumption from over 1GB to 290MB.

Discord ditches Electron framework, rewrites app in Rust to slash RAM usage

Discord is abandoning Electron, the cross-platform framework widely used for building desktop apps with web technologies, in favor of a full rewrite in Rust, a modern programming language optimized for speed and memory efficiency.

Discord ditches Electron framework, rewrites app in Rust to slash RAM usage

Electron apps are known for consuming significant system resources. Discord’s current Windows client can use 1GB or more of RAM when users participate in multiple servers. By contrast, Discord’s new Rust-based Windows client uses just 290MB of RAM, representing a substantial reduction in memory footprint.

According to Discord chief technology officer Stanislav Vishnevskiy in a post on X, the company has been “early adopters of Rust since 2018” with much of its infrastructure, voice technology, and portions of the current client already built on the language. “The holy grail was getting the whole client there,” Vishnevskiy stated.

The migration involves eliminating both Electron and React Native from Discord’s stack. Mobile will retain native UI while sharing application code with the desktop version through Rust, streamlining development across platforms.

While Vishnevskiy did not provide a specific timeline for the complete transition, he indicated that Discord “hope[s] to get it into testing with users soon.” The company is conducting the rewrite in stages, with the new Rust-based architecture expected to deliver performance improvements and reduced resource consumption compared to the current Electron-based implementation.

This move reflects a broader industry trend of reconsidering Electron, which has faced criticism for performance and memory usage despite its convenience for cross-platform development. By switching to Rust, Discord aims to deliver a leaner, faster application while maintaining feature parity across desktop and mobile platforms.

Key facts

  • Discord is migrating from Electron to Rust for its desktop and mobile clients
  • The new Rust-based Discord Windows client uses 290MB of RAM versus 1GB+ in the current version
  • Discord has used Rust since 2018 for infrastructure and voice technology
  • The migration eliminates both Electron and React Native from Discord’s tech stack
  • Mobile will use native UI but share code with desktop via Rust

Sources

← All posts