· Zen HuiFer · Learn · 需要5 分钟阅读
Tauri2.0 has been released! Not just on the desktop
Tauri 2.0 offers cross-platform development with mobile support, enhancing its appeal to developers seeking efficient, lightweight solutions for both desktop and mobile apps. Its performance and ease of use make it a strong contender in the market, potentially rivaling traditional frameworks. Ideal for projects requiring rapid development and multi-platform support.
Tauri2.0 has been released! Not just on the desktop! This “Rocket” is supported by mobile terminal
Developing desktop applications is no longer the only battlefield. With the popularity of mobile devices, cross platform development has become a trend. Recently, Tauri brought a feature that impressed developers—— Mobile support . Yes, Tauri can not only develop lightweight desktop applications, but also connect with mobile platforms. This is like its “Rocket”. While keeping lightweight and efficient, it can be directly extended to the mobile end and instantly hang many traditional frameworks.
Next, let’s take a look at Tauri’s mobile support and how it can become a new favorite among developers.
1. From desktop to mobile: the true meaning of cross platform
Firstly, we need to clarify that Tauri’s core competitiveness lies in cross platform development. In the past, its focus was mainly on the three major desktop systems of Windows, macOS, and Linux, allowing you to quickly develop lightweight desktop applications using front-end technology. Now, it has broken this boundary and begun to Supports iOS and Android mobile devices This allows developers to write applications that are compatible with both desktop and mobile devices within a unified framework.
For developers, this means higher development efficiency - you don’t need to do tedious adaptation work for different systems, nor do you have to worry about the differences in features between different platforms. With just one code repository, Tauri can help you handle both desktop and mobile applications, truly achieving “one development, multiple runs”.
Behind the support of mobile devices: still lightweight
When it comes to cross platform frameworks, people may think of Flutter or React Native, which also support mobile development but often come with larger application volumes and higher resource consumption. Tauri still maintains its consistent lightweight characteristics. By relying on the system’s built-in WebView, Tauri’s application size is much smaller compared to other frameworks.
For example, for an application that displays information, the installation package for a mobile application developed using Tauri may be much smaller than Flutter. For users, the advantages of this lightweight design are obvious: Faster download speed, less storage space occupation Especially suitable for devices with limited storage space.
3. Consistent development experience across all platforms
Another major advantage of Tauri is its developer friendly experience. If you are a front-end developer, you can continue to use your familiar front-end technology stack (such as React, Vue, Svelte, etc.) with almost no learning cost. Now, not only can you use these technologies to develop desktop applications, but you can also directly migrate to mobile devices, which greatly reduces learning and maintenance costs with consistent development.
Moreover, Tauri’s API not only supports functionality calls for desktop systems, but is also gradually supporting mobile features. This means that you can call both desktop and mobile system functions in the same codebase without having to write different code for different devices.
For example, you can access the sensors, cameras, and other functions of your phone through the API provided by Tauri, and it will further expand its support for mobile features in the future.
import { open } from '@tauri-apps/plugin-dialog';
// when using `"withGlobalTauri": true`, you may use
// const { open } = window.__TAURI__.dialog;// Open a dialog
const file = await open({
multiple: false,
directory: false,
});
console.log(file);
// Prints file path or URI
The above code can not only run in desktop applications, but also be extended to mobile devices in the future to achieve similar function calls. The uniformity of this development experience is definitely a blessing for developers who want to quickly launch cross platform applications.
4. Tauri’s performance on mobile devices
Performance issues are always the most concerning point for developers. Unlike frameworks like Flutter, Tauri did not choose to build a cross platform UI framework separately, but instead relied on the built-in WebView of the operating system. This not only ensures lightweight, but also relies on the optimization of WebView to bring better performance.
On the mobile end, Tauri also relies on the system’s WebView, which means you don’t have to worry about additional resource overhead. As long as the user’s system WebView version is sufficiently new, the startup speed and rendering performance of the application can be guaranteed. Moreover, the Tauri team is continuously optimizing the support for mobile devices, and future performance improvements are worth looking forward to.
Why choose Tauri to develop mobile applications?
To sum up, if you are a front-end developer or want to support both desktop and mobile under one framework, Tauri is undoubtedly a very attractive choice. It not only helps you quickly develop applications using familiar front-end technologies, but also solves various pain points of traditional frameworks through lightweight design and cross platform support.
Whether it’s application size, performance, or development experience, Tauri provides an efficient and lightweight solution. For projects that pursue efficient development and need to support both desktop and mobile terminals, Tauri’s mobile terminal support is its “Rocket”.
Some thoughts:
As Tauri gradually expands its support for mobile devices, it is evolving from a desktop application development framework to a truly full platform development tool. If you are looking for a lightweight cross platform solution or want your application to run on more devices, you may want to try Tauri, maybe this is the “it” you have been looking for. However, if your team is preparing to create a phenomenal product, it may not be suitable at the moment because the Tarui team itself does not seem to have finalized a perfect solution for the mobile end, and there may be adjustments in the future. While pursuing performance and security, there is also a more important thing, compatibility and stability. What do you think? Welcome to leave a message, tug, tug.