I've always liked GUI, both desktop-based and browser-based, before you needed five years of training on the latter. That's the reason I loved and still love Vaadin: you can develop web UIs without writing a single line of HTML, JavaScript, and CSS. I'm still interested in the subject; a couple of years ago, I analyzed the state of JVM desktop frameworks.

I also like the Rust programming language a lot.

Tauri is a Rust-based framework for building desktop applications. Here's my view.

Overview

Build an optimized, secure, and frontend-independent application for multi-platform deployment.

-- Tauri website

A Tauri app is composed of two modules: the client-side module in standard Web technologies (HTML, Javascript, and CSS) and the backend module in Rust. Tauri runs the UI in a dedicated Chrome browser instance.

Users interact with the UI as usual. Tauri offers a binding between the client-side JavaScript and the backend Rust via a specific JS module, i.e, window.__TAURI__.tauri. It also offers other modules for interacting with the local system, such as the filesystem, OS, clipboard, window management, etc.

Binding is based on strings. Here's the client-side code:

const { invoke } = window.__TAURI__.tauri;

let greetInputEl;
let greetMsgEl;

greetMsgEl.textContent = await invoke("greet", { name: greetInputEl.value });  //1
  1. Invoke the Tauri command named greet

Here's the corresponding Rust code:

#[tauri::command]                                                              //1
fn greet(name: &str) -> String {                                               //1
    format!("Hello, {}! You've been greeted from Rust!", name)
}
  1. Define a Tauri command named greet

In the following sections, I'll list Tauri's good, meh, and bad points. Remember that it's my subjective opinion based on my previous experiences.

The good

The meh

At first, I wanted to create my usual showcase for desktop applications, a file renamer app. However, I soon hit an issue when I wanted to select a directory using the file browser button. First, Tauri doesn't allow the use of the regular JavaScript file-related API; Instead, it provides a more limited API. Worse, you need to explicitly configure which file system paths are available at build time, and they are part of an enumeration.

I understand that security is a growing concern in modern software. Yet, I fail to understand this limitation on a desktop app, where every other app can access any directory.

The bad

However, Tauri's biggest problem is its design, more precisely, its separation between the front and the back end. What I love in Vaadin is its management of all things frontend, leaving you to learn the framework only. It allows your backend developers to build web apps without dealing with HTML, CSS, and JavaScript.

Tauri, though a desktop framework, made precisely the opposite choice. Your developers will need to know frontend technologies.

Worse, the separation reproduces the request-response model created using browser technologies to create UIs. Reminder: early desktop apps use the Observer model, which better fits user interactions. We designed apps around the request-response model only after we ported them on the web. Using this model in a desktop app is a regression, in my opinion.

Conclusion

Tauri has many things to like, mainly everything that revolves around the developer experience. If you or your organization uses and likes web technologies, try Tauri.

However, it's a no-go for me: to create a simple desktop app, I don't want to learn how to center a div or about the flexbox layout, etc.

To go further: