What is Tauri?
Tauri is a cross-platform programming framework based on Rust. In this article, you’ll learn why Tauri might take over from Electron as the cross-platform framework of choice and how the framework is used.
Table of Contents
What is the Tauri framework?
Tauri is a relatively new cross-platform application framework. Many apps we use day-to-day, like Slack, Microsoft Teams, and Discord run on a framework called Electron. But you might have noticed that those apps, Teams I’m looking at you, are slow and clunky. Electron-based apps can be a real resource hog, partly because they require Chromium, the rendering engine used by the Google Chrome and Microsoft Edge browsers.
But the disadvantage of Electron is that because each app needs to carry a complete version of the Chromium source code with it, it’s intensive in terms of disk space. And Chromium is not very efficient when it comes to processor and memory usage.
Tauri aims to bring solve these issues with the simplicity of Electron but closer performance to a native app.
What language does Tauri use?
Tauri is based on Rust and it comprises of two components:
Tau handles creating windows and managing icons. For example, icons on the taskbar and system tray, tasks like that.
Is Tauri better than Electron?
There’s been a lot of chat about Rust in the past year because it’s a memory safe language. Programmers don’t have to think about memory protections and build them into their code manually; it’s all handled by Rust.
Unlike some memory-safe languages, C# for instance, Rust has comparable performance to C++. Google announced recently that it would be introducing Rust to some APIs and elements in the Chromium project to improve performance and security. That’s exactly what Rust was designed for.
Tauri performance and disk footprint
The biggest advantage of Tauri is applications can be up to 44 times smaller in disk footprint. And Tauri apps use about half the memory of their Electron counterparts. So, if you’re working on a notebook, your battery is going to last longer. Tauri also claims to be more secure.
Apps will be more responsive and start faster. And in general Tauri makes better use of system resources.
Tauri vs Electron in the enterprise
All this sounds great and you might be thinking why aren’t companies like Slack and Microsoft ditching Electron and moving to Tauri? There are several reasons:
- Tauri is relatively new on the scene, so it’s not as mature as Electron yet.
- There are certain things that Tauri can’t do but as time goes by it should reach feature parity with Electron.
- Electron is well established in the enterprise. IT teams know how to roll out and manage Electron apps.
The future of Tauri
According to the people behind Tauri, while app backends today need to be programmed in Rust, the future will bring other options for the backend, like Go, Nim, Python, and C#. Microsoft is already moving away from Electron. The new Outlook and Teams clients are based on Microsoft’s WebView2 technology.
And for companies that don’t want to rely on tech provided by companies like Microsoft and Google, or want to be completely open source, Tauri looks like it might be a great alternative to Electron.
More in DevOps
What is Tauri?
Feb 23, 2023 | Russell Smith
How to Install and Configure Apache Web Server on Ubuntu 22.04
Dec 9, 2022 | Sagar
How to Install Git on Ubuntu 20.04
Jul 11, 2022 | Sagar
How to Combine Branches with Git Merge
Jun 17, 2022 | Robert Ralph
What is a DevOps Pipeline?
May 31, 2022 | Sukesh Mudrakola
What is Datadog – The Ultimate Guide
May 12, 2022 | Sagar
Most popular on petri