egui, Tauri or Electron
Four desktop apps ship on fastframe today: ZapFast, Spotifast, Solco and TonePush. They are written in Rust with egui. A fifth, Chat with Work Desktop, started on egui and moved to Tauri. This page puts what we measured on our own apps next to published figures for Tauri and Electron, and says when we would pick each.
Three ways to draw a desktop app
- Electron ships a copy of Chromium and Node.js inside every app. The interface is a web page, and it looks and behaves the same on every platform, because the browser engine is the same.
- Tauri writes the app’s core in Rust and draws its interface with the webview the operating system already has: WebView2 on Windows, WKWebView on macOS, WebKitGTK on Linux. In Tauri’s words, “a minimal Tauri app can be less than 600KB in size”, because the browser engine is not in the bundle.
- egui draws the interface itself, on the GPU, from Rust. There is no browser engine and no JavaScript: the app is one native binary. fastframe adds what egui leaves to the app: themed components, a system tray, notifications, media keys, start at login, self-update and the rest (all crates).
Size
What we measured, on release builds for Linux x86_64 unless noted, stripped unless noted:
| Binary | Size | Compressed (gzip) |
|---|---|---|
A minimal egui app with fastframe-ui, fastframe-fonts and fastframe-text (examples/hello) |
11.7 MiB | 5.3 MB |
| The same minimal app on macOS (Apple Silicon) | 6.3 MiB | 3.2 MB |
| TonePush, an editor for Line 6 HX pedals (not stripped) | 36.8 MiB | 13.4 MB |
| Spotifast, a Spotify client with its own audio engine and visualiser | 53.9 MiB | 25.1 MB |
| ZapFast, a WhatsApp client | 82.5 MiB | 41.1 MB |
The minimal app is built with the release profile the apps use: thin LTO,
one codegen unit, stripped symbols and panic = "abort". It bundles the
Inter font (about 0.9 MB) and egui’s default fonts, and opens a window
through OpenGL with screen reader support. examples/hello/measure-size.sh
builds it and prints the size, so you can check the number on your own
machine.
Published figures for the other two, from one benchmark by Hopp on a MacBook Pro (a small app with a button that opens windows, measured once): the Electron build was 244 MiB and the Tauri build 8.6 MiB. Tauri’s own documentation puts a minimal app under 600 KB.
So egui sits between the two. An egui app is far smaller than an Electron app, because it carries no browser. It is larger than a Tauri app, because Tauri leaves the browser engine to the operating system while an egui app carries its own renderer, fonts and widgets. Real apps grow with what they carry: Spotifast’s binary holds its own audio engine and a visualiser, and the minimal app is where an egui app starts, not where it ends.
Memory and speed
From the apps’ own probes, on release builds:
- TonePush holds a library of 2,000 tones in 41 to 46 MiB of memory, and draws a frame of it in 0.63 ms (it took 7.4 ms before it moved to fastframe-ui’s table).
- ZapFast, with 2,000 contact pictures loaded, settles at about 54 MB of memory on the CPU side. A chat with 200 phone photos holds 49 MiB of textures (589 MiB before its latest fastframe update). With its window hidden it wakes 4 times a minute (400 before).
- Solco shows the first page of a DJ library in 38 ms (280 ms before).
- Spotifast draws its Home screen in 0.166 ms a frame, the same as the hand-written egui it replaced.
The Hopp benchmark measured about 409 MB of memory for Electron and 172 MB for Tauri with six windows open. That is a different app on a different machine, so read it as an order of magnitude, not a contest. Other published comparisons find a much smaller gap between Tauri and Electron at idle: the system webview is still a browser engine.
An immediate-mode GUI like egui redraws when something changes, and fastframe’s components keep a frame budget: spinners step at 10 frames a second and stop in a window in the background. TonePush’s busy indicator went from 60 to 10.5 frames a second with it.
When each one fits
Pick Electron when the team writes web code, the app needs the same pixels on every platform, and size does not matter to its users. It is the most mature of the three, with the largest ecosystem.
Pick Tauri when the interface is a web app, or should be. Chat with Work Desktop moved from egui to Tauri for that reason: its window loads the real Chat with Work web app from the server it pairs with, so a webview was the honest way to show it. It still uses fastframe’s audio, notifications and start-at-login crates, which do not care what draws the window. On Linux, Tauri depends on the WebKitGTK the distribution ships, and on Windows on WebView2.
Pick egui when the interface is the app’s own and does a lot per frame: long tables, waveforms, live data, editors. There is no web layer to cross, one language from the data to the pixels, and one binary with no runtime to install. The cost is that egui draws its own widgets, so they are not the platform’s controls (fastframe’s looks and themes make them fit in), and the binary carries its own renderer. Text rendering, fonts, scrolling and title bars need care to feel native; that is most of what fastframe-text, fastframe-fonts, fastframe-scroll and fastframe-titlebar do.
Try it
The gallery runs every fastframe-ui component in your
browser, compiled to WebAssembly. To start an app,
add a crate to an eframe app or copy
examples/hello.