Skip to main content

How Discord Used Zed’s GPU Rendering Framework to Rebuild Its Apps

Christina Hill
Christina HillMarketing Manager
12 min read
How Discord Used Zed’s GPU Rendering Framework to Rebuild Its Apps

Discord’s Phoenix rewrite: what changed and why it matters

Discord’s CTO, Stanislav Vishnevskiy, has confirmed a broad rewrite of the desktop and mobile clients, and that alone tells you this isn’t a weekend refactor. Internally, the project goes by Phoenix. The aim is plain enough: strip away extra abstraction layers that have piled up over time and rebuild the app around a shared Rust core.

That matters because Discord is not just swapping one library for another. On desktop, Electron is out. On mobile, React Native is out. Those choices made sense for a product that had to ship fast and stay available across platforms, but they also come with a cost. Every extra layer adds weight, every bridge between languages adds friction, and every abstraction makes it a little harder to control startup time, memory use, and the feel of everyday actions like opening a chat, switching servers, or joining voice.

A rewrite like this is less about changing tools and more about deciding which layer gets to stay in charge.

Phoenix points in the opposite direction from the browser-first stack Discord used before. Instead of letting a web runtime do most of the heavy lifting, the company is moving core application logic into Rust and keeping the user interface flexible enough to vary by platform. That sounds subtle on paper. In practice, it changes where the work happens. Shared logic can live in one place, while the desktop and mobile surfaces still look and behave like their native environments where that makes sense.

That balance is the interesting part. Teams often talk about “write once, run anywhere” as if the ideal is one universal UI that behaves identically on every screen. Reality is messier. A desktop app and a phone app do not get used in the same way, and forcing both into the same mold can create clunky behavior that users feel immediately, even if they can’t explain why. Discord’s approach appears to split the difference. The expensive, shared parts move into Rust. The surfaces that need to feel native can stay native.

The early numbers Discord has shown suggest the rewrite is not just cleaner in architecture, but also lighter on the machine. Internal builds reportedly start much faster than the old Electron version and use less memory. Core interactions feel snappier too, especially the ones people hit dozens of times a day: chatting, moving around the app, and voice features. That kind of improvement is easy to notice and hard to fake. If an app opens quickly, reacts without lag, and doesn’t chew through RAM like it’s on a bulk diet of browser tabs, users notice right away.

For developers, that’s the useful part of the story. A rewrite like Phoenix is a reminder that client architecture can become a product issue, not just an engineering preference. If your app spends a lot of time waiting on startup, or if every interaction has to travel through layers of runtime before anything appears on screen, you may eventually hit a ceiling that no amount of patching can fix. Discord seems to have decided that ceiling had arrived.

There’s also a practical lesson for teams that build tools with heavy text handling, media surfaces, or real-time interaction. When an app gets large enough, the framework choice starts to shape the user experience in ways that are hard to paper over. One more abstraction can mean one more place for latency to creep in. One fewer layer can mean more direct control over what happens when a user clicks, types, or joins a call. That’s the trade Discord is making here, and it sets up the deeper architectural choices behind Phoenix.

Inside the new architecture: Rust core, GPUI on desktop, native views on mobile

Inside the new architecture: Rust core, GPUI on desktop, native views on mobile

The rewrite makes more sense once you stop thinking about it as “one app” and start thinking about a shared Rust core with a few different faces. Discord has been moving Rust through its stack for years already. Back in 2018, the company described how it was shifting parts of its infrastructure and voice systems to Rust, which gives the Phoenix rewrite a pretty long runway instead of a sudden hard pivot. That history matters here, because the new client work does not begin with zero Rust experience and a prayer.

The real trick is to share the rules of the app without forcing every screen to be drawn the same way.

On desktop, Discord is dropping the usual Chromium plus Node.js setup and moving to GPUI, the GPU-accelerated Rust UI framework built by the Zed team. GPUI is where this rewrite gets a little more unusual. Instead of leaning on a browser engine for every pixel of the interface, Discord is letting Rust drive the UI layer more directly, while the GPU handles much of the rendering work. The result is a client that can keep the app logic close to the metal, while still drawing a modern interface across Windows, macOS, and Linux.

That Zed connection is worth spelling out. Zed is an open-source editor written in Rust for macOS, Linux, and Windows, built by the team that includes some of Atom’s original creators. Their work on GPUI gave Discord a framework that already had opinions about fast rendering, responsiveness, and the trade-offs that come with leaving the browser stack behind. In practical terms, Discord did not need to invent its own entire UI runtime before it could test a different desktop architecture. It could start with a framework that already existed, already had real users, and already proved that Rust could drive a complex desktop interface without falling back to Electron.

The desktop and mobile split is not a matter of one platform being “native” and the other being “rewritten.” It is more deliberate than that. On mobile, Discord keeps native iOS and Android views, which means the screens still look and behave like mobile apps should on each operating system. The shared part is the application logic, which lives in Rust. So the buttons, gestures, navigation, and platform conventions can stay native, while the rules for how messages load, how channels behave, and how state moves through the app come from a common codebase.

That separation is the whole point. Discord does not seem interested in forcing the same UI layer everywhere. It wants the same product logic everywhere, while each platform uses the drawing tools that fit best. If a screen on iPhone needs to feel like an iPhone app, it can. If a desktop surface needs more custom rendering work, GPUI can handle it without dragging in a browser runtime.

The browser client follows a third path. It still renders HTML, which keeps the web version in familiar territory for users and for the team. The difference is that the app logic is compiled to WebAssembly. That gives Discord a way to reuse more of the same Rust core in the browser without making the browser itself responsible for the business logic. For a product with a lot of shared behavior across devices, that is a tidy compromise. The interface stays web-native, but the logic underneath doesn’t have to be written twice.

There is also a smaller but interesting change around embedded web content. Some experiences, including videos and Activities, now use an operating-system webview instead of Electron’s built-in browser. That may sound like a minor plumbing detail, but it changes where certain web surfaces live and who owns the rendering. Rather than carrying the full browser stack everywhere, Discord can hand off those specific embedded experiences to the OS’s own webview. It is a cleaner split than bundling every web surface into the same heavyweight shell.

For developers, the architecture is easiest to read as a set of layers:

  • Rust holds the shared application logic. - GPUI draws the desktop client without Chromium or Node.js. - Native iOS and Android views handle mobile presentation. - WebAssembly runs the logic in the browser version. - OS webviews take over some embedded browser-like features.

That arrangement also explains why Discord can talk about one rewrite while shipping several platform-specific implementations. The codebase is not literally one UI toolkit stretched across every device. It is one logic layer, then different presentation layers depending on where the app runs.

If you want a useful comparison point, think less about a traditional cross-platform wrapper and more about a core engine with separate control panels. The engine stays shared. The controls stay local to each device. That is a much cleaner fit for a product like Discord than trying to make the same widget tree behave identically everywhere.

The team has also had time to practice this style of work. Discord already documented its move from Go to Rust in earlier infrastructure efforts, and that history helps explain why a larger client rewrite is even on the table. The company has spent years pushing more responsibility into Rust, not just for speed, but for having a single language that can run across back-end services, client logic, and platform boundaries. On top of that, Discord’s engineering org has been using cloud development environments, which makes a broad rewrite easier to coordinate when people need to test the same code across desktop, mobile, and web without waiting around for local setups to cooperate.

The result is a client architecture that looks messy at first glance, then starts to feel sensible. Desktop gets a GPU-driven Rust UI stack through GPUI. Mobile keeps native screens and shared Rust logic. Web keeps HTML, with Wasm handling the app brain. Special embedded surfaces fall back to the operating system’s webview when that makes more sense than dragging Electron into every corner. It is a practical arrangement, and one that gives Discord room to trade some browser convenience for tighter control over the parts of the app users touch most often.

Performance gains—and the trade-offs developers should notice

The raw numbers are the easiest part of Discord’s rewrite to talk about, because they fit neatly into a chart and leave very little room for hand-waving. In internal desktop builds, the app reportedly sits around 290 MB of RAM even with two accounts open. Startup drops from roughly five and a half seconds in the Electron version to something closer to instant. On mobile, the rewritten client opens in under two seconds instead of about five.

That’s the sort of difference users notice without opening DevTools or reading a changelog. The app feels less like it’s warming up a server in the back room and more like it’s already ready when you are.

Faster startup is nice. A client that responds cleanly after launch is nicer, because the whole app feels less like a pile of tabs and more like one piece of software.

Discord also says the gains are not limited to memory and boot time. Navigation and in-app interaction feel snappier too, which matters more than a benchmark screenshot tends to admit. A chat app spends most of its life in small motions. Open a server, jump between channels, switch accounts, load a call, bring up a message list, poke around a settings panel. If each of those steps trims a little dead time, the product feels lighter even before anyone checks RAM usage.

GPUI, the Rust UI framework behind Zed’s desktop editor, is built around that idea. It uses a hybrid immediate and retained rendering model, which gives the app more control over what gets redrawn and when. That matters because Discord is trying to push the desktop client toward 120 frames per second without the usual garbage-collection pauses that can show up in a browser runtime. In plain English, the app can spend less time waiting for the framework to get out of the way.

If you are comparing an Electron alternative or a React Native alternative, that part is tempting. It says, in effect, that a lower-level stack can buy back headroom where it counts: startup, scrolling, channel switching, and those tiny UI reactions that make software feel crisp rather than merely functional. Discord has also shown before that it is willing to do the boring work underneath the product, from its 64-bit architecture upgrade to the systems it uses to store trillions of messages. The pattern is familiar. Trim overhead where it hurts, then keep shaving.

The catch is that a browser stack quietly hands you a lot of machinery you stop noticing until it disappears. Once Discord leaves Electron behind on desktop, the team also gives up built-in text layout, input-method support, screen-reader hooks, and right-to-left text handling. Those are not fancy extras tucked in a settings menu. They are the stuff that makes Japanese text entry, Arabic layout, and assistive technology work without a pile of special cases.

That trade-off is easy to miss if all you look at is startup time. A browser engine gives you a lot of text and accessibility behavior for free, or close enough to free that many teams treat it that way. Once you move to a Rust UI framework, that work comes back onto your plate. Some of it can be restored with libraries like Parley, which helps with text shaping and layout, but that is only part of the job. A library can render glyphs. It does not magically stitch together a polished text system, input handling, and accessibility support across every surface your app exposes.

And that’s where the real cost shows up. The rewrite can be faster and leaner, yet still leave teams with a long list of non-obvious work. Text selection has to behave properly. IME flows need to survive real typing, not just demo input. Screen readers need usable hooks, not half-built access points. Right-to-left support has to feel native, not bolted on after the fact. In a browser, a lot of that is already baked in. Outside the browser, you own the whole path.

Discord’s numbers suggest the effort is paying off in the places users feel first. The missing pieces suggest why this kind of move is not for the faint of heart. A Rust UI framework can buy speed, memory savings, and a cleaner rendering model. It can also hand you a longer checklist than the browser ever did.

That tension is the point. The new client looks faster because it is faster, but it also asks the team to rebuild a bunch of invisible infrastructure that used to come bundled with Electron. The next question is whether that trade makes sense for the rest of your app, because once you leave the browser stack, there’s no sneaking the browser’s comforts back in for free.

What developers can take away from Discord’s move

Discord’s rewrite is useful because it avoids the usual false choice. A team does not have to keep every surface inside Electron or React Native just to stay productive, and it also doesn’t need to throw out all shared code to get better performance. Discord’s desktop app rewrite and mobile app rewrite point to a middle path: keep one systems-language core in Rust, then let each platform use the UI layer that makes the most sense.

That part matters more than the framework fan club debates usually admit. If your product logic is duplicated across desktop, mobile, and web, the cost shows up fast. Bugs get fixed twice, features drift apart, and performance work gets patched in one place while another platform lags behind. A shared Rust core cuts down that duplication without forcing the same rendering model onto every client. The UI can still be native where native makes sense, while the rules for accounts, messaging, voice, state sync, or permissions live in one place.

Pick the architecture around the user experience you actually need, not the one that’s easiest to defend in a tooling argument.

That’s the most practical lesson here. GPU-accelerated rendering makes sense when your app lives or dies on startup time, scrolling, drag-and-drop, tab switching, or chat-style interaction. If users open the app dozens of times a day and expect it to feel instant, shaving seconds off startup and trimming memory use can buy real goodwill. The same goes for interfaces that redraw often, or screens where a tiny hitch feels worse than it would in a CRUD dashboard. In those cases, a lower-level stack can pay for itself.

The catch is that browser runtimes quietly do a lot of work for you. Once you leave that comfort zone, accessibility, text layout, and input handling stop being background noise and become your problem. That includes screen readers, IME support, right-to-left text, font shaping, selection behavior, copy and paste, and all the little edge cases users notice immediately when they go missing. If your team switches to GPU-first rendering, treat those as first-class tasks from day one. Don’t stash them in a “later” column. Later has a nasty habit of arriving right before launch.

A useful way to judge the architecture is to ask a blunt set of questions:

  1. Which parts of the product need tight control over latency? 2. Which parts are perfectly fine with web tooling? 3. How much duplicated logic exists across desktop and mobile today? 4. Can your team afford the extra work that comes with owning rendering, accessibility, and input behavior more directly?

If most of your app is forms, tables, and standard navigation, Electron or React Native may still be the faster road. You’ll probably ship sooner, and your team will spend less time rebuilding things browsers already do well. If your product spends a lot of time animating large, interactive surfaces, or if the app’s feel is becoming a customer complaint, the equation changes. That’s when a GPU-accelerated rendering stack starts looking less exotic and more practical.

The broader lesson is simple enough: framework choice is a product decision, not a personality test for engineers. Discord did not rewrite its clients because Rust sounded tidy on a slide deck. It did it because the shape of the product justified the cost. That’s the question other teams should ask too. What do users notice every day, and where is your current stack getting in the way? If the answer points toward performance-sensitive interaction, a lower-level client may be worth the extra plumbing. If not, web tooling can still carry a lot of weight without drama, and without turning your roadmap into a science project.

Newsletter

Stay in the loop

Join our newsletter and get resources, curated content, and inspiration delivered straight to your inbox.