mobileRumblefishLogo
Menu
desktopRumblefishLogo
Tauri vs. Electron: The Lightweight Champion of Desktop Apps

Tauri vs. Electron: The Lightweight Champion of Desktop Apps

Tue, Oct 14, 20257 min read

Category: Software Development

One of my very first computer-related memories is the moment I launched the epic game called Deluxe Ski Jump 2. For me, as a kid, it was kind of magic: I was able to double-click on the icon and, a few seconds later, be a pro ski jumper. Over 20 years later, this is still magic, but at least I know what kind of magic is behind it. Let’s talk about desktop apps.

Framework: A Developer’s Multitool

I also believe that, over 20 years later, building desktop apps is not as cumbersome as it used to be, and there are many great frameworks out there that help to achieve this. First of all, let’s explain, for the sake of clarity, what a framework is. You can think of it as a ready-made toolkit, a set of libraries, tools, and conventions that provide structure for building applications. You can write your app by plugging into the framework’s lifecycle and patterns, which simply makes dev life easier. So far, the most popular framework for building desktop apps has been, and probably still is, Electron, but a new player has entered the game. His name is Tauri.

My name is Tauri. 2.0 Tauri.

As Tauri’s official documentation says, Tauri is a framework for building tiny, fast binaries for all major desktop and mobile platforms. Sounds cool, doesn’t it? But what does that actually mean? Well, let’s assume you want to build a desktop application for all major platforms: Linux, macOS, and Windows. It’s quite obvious that you want to develop the app codebase once and then just build three different versions suitable for each of the above platforms. This is, of course, about both your backend and frontend code. And here’s where Tauri comes to you and says, Hello there! Take my hand and let me help you do this!, which Tauri’s docs explain in other words: Developers can integrate any frontend framework that compiles to HTML, JavaScript, and CSS for building their user experience while leveraging languages such as Rust, Swift, and Kotlin for backend logic when needed.

Electron vs. Tauri

But haven’t I just written that there was already a leading framework, Electron, which was doing the same? Yes, but Tauri has a slightly different approach and advantages over the former. Electron is like packing your own mini web browser (Chromium) with your app, so it looks the same everywhere. It’s easy for web developers and has tons of plugins, but it makes apps bigger. Tauri is like borrowing the computer’s built‑in browser to show your app and using a fast Rust helper behind the scenes. Apps are much smaller and often use less memory, but you depend on each system’s web engine.

Now that we know the difference, we can decide which framework is better for us and why this is (probably) Tauri. Creating a demo project is a piece of cake, and an officially maintained utility tool guides you by the hand through the first steps of the process. The playground is built; now you can build sandcastles or whatever you want. But don’t forget about security. Fortunately, Tauri hasn’t forgotten and takes security very seriously. The framework provides the Isolation Pattern, which (as the docs say) is a way to intercept and modify Tauri API messages sent by the frontend before they get to Tauri Core, all with JavaScript. The secure JavaScript code that is injected by the Isolation pattern is referred to as the Isolation application. If you’re interested in how it works, I strongly encourage you to take a look here.

Summary

Is Tauri the magician who pulls a rabbit (or another Deluxe Ski Jump 2) out of a hat? No. But it's the perfect toolkit for anyone who wants to build a secure cross-platform desktop app. As a full-stack software developer, I had the opportunity to work with it, and I must say I really enjoyed it! Sure, the framework is still not perfect and (fortunately) is still being actively improved, but hopefully in 20 years it will be more mature than I am. And it will still give as much fun as playing Deluxe Ski Jump 2.

Oskar Karcz
Oskar Karcz

Blockchain Developer & Content Guru

Categories
Follow Us