Tauri explained for desktop developers choosing Electron or Flutter
Tauri produces lean binaries between 3 MB and 10 MB by utilizing native system WebViews instead of bundling Chromium. This architectural approach allows Tauri applications to consume 60% to 90% less RAM than comparable Electron applications.
Tauri produces lean binaries through native WebViews
Tauri produces binaries between 3 MB and 10 MB, whereas a basic Electron application requires between 120 MB and 200 MB of disk space. Some developers report that a simple "Hello World" Electron app can reach sizes of 170 MB or even 275 MB. Electron bundles the Chromium browser and the Node.js runtime into every executable, but Tauri uses the native WebView provided by the operating system, such as WebView2 on Windows, WKWebView on macOS, or webkit2gtk on Linux. The difference in resource consumption is stark because Tauri applications consume 60% to 90% less RAM than comparable Electron apps by using the system webview instead of bundling a full Chromium runtime. This architectural choice reduces idle RAM usage from the 150 MB to 300 MB range seen in Electron to a much lower 30 MB to 80 MB in Tauri. Tauri 2.0 has a capability-based security model that restricts the frontend from reading local files or triggering platform APIs without explicit permission. Developers must register native commands in the Rust backend and grant specific permissions in the manifest file. You probably know how a renderer process with unrestricted Node.js access increases the attack surface of an application. This permission system ensures that the frontend cannot perform unauthorized actions. Vercel Labs recently released Zero-native, a framework written in Zig that also bypasses the Electron runtime in favor of native OS WebViews. Zero-native targets macOS and Linux desktops, with Windows and mobile support still in development. Zig provides faster incremental compilation times than Rust. Richard Feldman, the creator of the Roc programming language, switched his compiler from Rust to Zig because slow compile times drained productivity and enjoyment. Maintaining Electron apps also requires constant patching of Chromium-specific bugs and dependencies.
Comparing the UI rendering engines
Flutter Desktop uses the Skia engine to render every pixel on a Canvas, which results in highly consistent UI across Windows, macOS, and Linux. Because the application must package the Skia engine and the Dart runtime, Flutter binaries fall between 20 MB and 40 MB in size. Tauri relies on the system’s native WebView, which means CSS properties might behave differently on Linux’s webkit2gtk than on Windows’ WebView2, and this creates potential rendering inconsistencies for developers who expect identical behavior across all desktop platforms. While Flutter provides a more predictable visual experience, it does not allow for the same direct use of web-based CSS and HTML as Tauri. Developers can pick from a wide range of frontend frameworks like React, Vue, or Svelte to build the user interface in Tauri. Svelte NodeGui provides another alternative by using the Qt widget toolkit and the Svelte compiler. This framework is a Node.js app that uses Qt widgets for its user interface. A "Hello World" app built with Svelte NodeGui runs on less than 20 MB of memory. However, Svelte NodeGui applications cannot use the full extent of HTML and CSS or use the fetch browser API. Svelte NodeGui uses 13 tags or UI components, including buttons, image tags, editable text areas, progress bars, or native OS windows. The UI uses a subset of CSS supported by Qt’s stylesheet syntax and lays out the interface with Flexbox. Developers can debug Svelte NodeGui applications with the Chromium Developer Tools. Will the reliance on system-provided webviews eventually lead to more cross-platform UI bugs for web developers?
Performance benchmarks and the Rust backend
Discord CTO Stanislav Vishnevskiy announced a rewrite of the Discord client to Rust to eliminate layers of abstraction and leverage the device GPU. This project, codenamed Phoenix, reduced RAM usage to approximately 290 MB for two accounts logged in simultaneously. The new client also achieved a faster cold start compared to the 5.5 second boot time required by the previous Electron version. On mobile, the rewrite achieved a load time under 2 seconds compared to 5 seconds for the legacy app. Tauri 2.0 includes a plugin system for specific tasks like file system access, biometric authentication, and haptic feedback. The learning curve for Rust is steep because variables are immutable by default and the language uses move semantics for non-primitive data types. Developers using Tauri must manage the complexity of a Rust backend to achieve these performance gains. Performance tests from Inverita show that for memory-intensive tasks on iOS, Flutter performs closely to native Swift, while React Native is 20 times slower than Objective C. For CPU-intensive tasks, the Borwein algorithm results showed that both Flutter and React Native lagged behind native options. In a scrolling test, Flutter achieved 39 frames per second while React Native only achieved 1 frame per second. A separate study involving a 1,000-row scrollable image list found that Swift beat React Native across every comparable runtime metric on iOS. On Android, the gap to native remains small, though native remains ahead on both memory and CPU usage.