Discord

Discord strips away abstraction layers to rebuild chat with Rust and GPU speed

Discord's CTO Stanislav Vishnevskiy is stripping away abstraction layers by rebuilding the company's desktop and mobile clients in Rust.

3 min readInfoQ
Discord strips away abstraction layers to rebuild chat with Rust and GPU speed

Discord's decision to strip away Electron and React Native in favor of a Rust core that talks directly to the GPU is the kind of hard engineering bet most companies talk about but few actually make. We think it is exactly the right move, and it carries a lesson for anyone building software that claims to be fast: abstraction layers are not free, and pretending otherwise costs your users real performance.

The CTO Stanislav Vishnevskiy has described a project that eliminates the middleware between the application and the hardware. On desktop, that means leaving Electron behind. On mobile, it means discarding React Native. In their place sits a shared Rust core that can leverage the device's GPU directly, along with native views on each platform. Early numbers show reduced RAM usage and faster boot times for chat, voice, and streaming. That is not incremental improvement. It is a structural reset.

This approach mirrors a pattern we see across modern tooling. Consider what Qwik 2.0 RC Delivers Faster Reactivity With Script Blocks and Streamlined State is doing: replacing comment markers with script blocks to reduce what the browser has to parse. Both Discord and Qwik are rejecting the idea that you must accept the overhead of the layer above you. Both are saying that the path to speed is not optimization of the existing stack but a rethinking of the stack itself.

For the average user, the practical outcome is a chat app that feels snappier and uses less memory. That matters. But the deeper implication is for the developers who maintain these tools. Discord is betting that the upfront cost of rewriting in Rust pays off in lower operational complexity over time, fewer bugs that live in the abstraction gap, less memory pressure on the device, a single codebase that actually behaves the same way everywhere. That is a bet on maintainability disguised as a bet on performance.

There is a parallel here to what Sqwish Labs has done with decision models: training on your own data to remove the abstraction of generic assumptions. In both cases, the insight is that the fastest path is the most direct one. Discard the layer that does not serve you. Own the hardware path.

The specific detail we will be watching is how Discord handles the native UI layer across platforms. Rust gives them a shared core, but the views are still platform-specific. That means they will need to maintain three UI codebases, desktop, iOS, Android, instead of one. If they can do that without introducing new inconsistencies, the payoff is enormous. If they cannot, the abstraction they removed will be replaced by a different kind of complexity. Either way, they have shown that the industry's default stack is not a law of physics. It is a choice, and choices can be unmade.

From InfoQ

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.

Read the original at InfoQ