Announcing Tauri Beta - More efficient crossplatform apps with better features
Tags: tauri, opensource, rust, typescript
Published: 2021-05-12 20:26:41



Hello fellow engineers, project managers, and technocrats! Today, after exactly two years of work, we are proud to announce the Beta release of Tauri 1.0. 

----

- Github Repository: https://github.com/tauri-apps/tauri
- Website: https://tauri.studio

----

## So, what Is Tauri?

Tauri enables you to make apps using the Webview technology stack that each operating system provides. It empowers you to call into the app backend using a JS api, which gives you opt-in access to things like the filesystem. All of this is done without needing to ship a localhost server and while maintaining a secure context for your application.

Tauri apps can have custom menus and tray-type interfaces. They can be updated securely, and are managed by the user's operating system as expected. Their ultimate binaries are very small, because they not only use the system's webview, they also do not need to ship a runtime (like Node.js), since the final binary is compiled from Rust. This makes Tauri apps quite small and performant, and also turns the reversing of Tauri apps into a task that is neither trivial nor fun.

If you want to find out more, we recommend checking out the [intro on our website](https://tauri.studio/en/docs/about/intro) or diving into the [architectural design document](https://github.com/tauri-apps/tauri/tree/dev/ARCHITECTURE.md).

----


In short, Tauri is a toolkit for creating smaller, faster, and more secure desktop apps with a web frontend. Tauri's core system is written in stable Rust and currently uses that for the main process. However, you do not need to write Rust code to interact. Nevertheless, we plan on providing bindings to other languages after the full 1.0 release. 

We are finally happy enough with its shape and approach that we are marking its status as Beta. This means that over the course of the next several months a few things are going to happen:

1. We will make sure it builds properly on all the platforms we want to support. This includes the major Desktops and the Major Mobile operating systems.
2. We will employ a third-party security consultancy to perform a horizontal security audit so that we can be confident that the core libraries are safe to use.
3. We will fix bugs that arise and work on reducing final bundle sizes as much as possible.

## What's New?

So many things have changed that we can't fit the full list here. Instead, we'll just be summarising the biggest changes. If you want the gory details, visit our [Release Notes](https://tauri.studio/en/release-notes).

However, if you already started a Tauri project back in the Alpha days, check out this [migration page](https://tauri.studio/en/docs/usage/guides/migration) to get informed as to what you have to do to get back in the saddle.


### [WRY](https://github.com/tauri-apps/wry) (Webview Rendering librarY)

Tauri Alpha used bindings to [webview/webview](https://github.com/webview/webview), a C++ library. While these got the job done, they were quite buggy on Windows and were lacking a lot of features we wanted. We've replaced these with WRY, a new, pure Rust Webview library we developed for Tauri. WRY has proven to be much more stable on Windows, and adds the following features to all platforms:
- Custom window styles: frameless, transparent, invisible, always-on-top
- Height and width constraints
- Draggable regions
- Programmatic setting of: size and size constraints, window styles, minimized/maximized, title
- Custom app menus
- System tray support

### [TAO](https://github.com/tauri-apps/tao)

For the first part of its existence, WRY depended on [winit](https://github.com/rust-windowing/winit), the amazing Windowing provider for many operating systems. As time went on, however, we also need some advanced features like menubar and system tray which [contradicted](https://github.com/rust-windowing/winit/pull/1921) with [their vision](https://github.com/rust-windowing/winit/blob/v0.24.0/FEATURES.md#winit-scope), and thus we made the hard decision to fork `winit` and republish it under a different name: TAO.

This means that the TAuri Organisation controls all first-order dependencies.

### Rust CLI

We've moved almost every command to a new CLI, written in Rust. This means Node.js is no longer required for developing Tauri apps, although it is recommended for now (unless you have problems with node.js and compiling some of the libraries for imagemin). We'll be moving the final commands over soon, making the JS CLI a thing of the past. Want to test it while we are still in beta?

```
% cargo install tauri-cli --version ^1.0.0-beta
% cargo tauri --version
cargo-tauri 1.0.0-beta.0
```

### `cargo run` Support

It is now possible to run your Tauri application with `cargo run` instead of through the Tauri CLI. This is possible through a new internal codegen crate that can generate everything required from your Tauri config file. This still requires you to have a valid `tauri.conf.json` along with whatever assets inside your `distDir` already generated. For the time being, the codegen will **not** run your `beforeBuildCommand` or `beforeDevCommand` from the config.


### New Web Content Loader

We've removed both the no-server and embedded-server modes, and replaced them with a new custom protocol loader. This combines the security of the no-server mode with the stability of the embedded-server, and is more performant than both.


### Multiwindow

It's finally here! Thanks to WRY's improved interface, we've been able to add one of the most requested features to Tauri. You can now create multiple windows, either at launch through `tauri.conf.json` or programatically through Rust. We've used this in our new [Splashscreen Guide](https://tauri.studio/en/docs/usage/guides/visual/splashscreen), which allows your app's web contents to load in the background while a splashscreen is displayed.

### Improved Command Handling

We've added some macros that makes creating Rust commands as simple as writing a function:

```rust
// Defining commands is no longer a multi-file mess
#[tauri::command]
fn my_custom_command() {
  println!("I was invoked from JS!");
}

fn main() {
  tauri::Builder::default()
    // No need to write a fancy handler, either
    // Just pass in a list of all your commands
    .invoke_handler(tauri::generate_handler![my_custom_command])![generate](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gpkroh61gxeho4aq1ivk.png)
 
    .run(tauri::generate_context!())
    .expect("error while running application");
}
```

```javascript
// Calling your commands is super easy as well
import { invoke } from '@tauri-apps/api/tauri'
invoke('my_custom_command')
```

Tauri's command feature also supports passing arguments, returning values and errors, and running async functions.

### Updater

We've added a new updater feature, allowing you to easily ship updates to your Tauri apps. You can create a custom update notification and progress indicator, or use the builtin update prompts. Updates are signed on publish and verified before installing, so users can be sure they aren't getting a malicious version of your app.

### External Audit 

We are working together with [Doyensec](https://doyensec.com) to undertake a complete horizontal audit of the critical components of Tauri, Tao & Wry. Doyensec has a long history of analysing Electron apps, so they are extraordinarily qualified to investigate the issues surrounding desktop apps. Once the audit is completed and we have resolved any and all concerns raised by the auditors, we will have crossed the threshold to a stable ecosystem and the 1.0 release will follow. If you plan to use Tauri in production, please consider making a donation to our [Open Collective](https://opencollective.com/tauri) fundraising campaign to support this expensive endeavour. 

## Get Started With Tauri

If you'd like to get started making apps with Tauri, check out our [getting started guide](https://tauri.studio/en/docs/getting-started/intro). Within a few minutes, you'll have your first Tauri app up and running.

![generate](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4i4ern24qx4wldcmm37t.png)

## What Tauri does not
- Tauri does not use Internet Explorer based Webviews, so there is no outdated Internet Explorer code being shipped in your app. (Seriously, stop spreading FUD.)
- Tauri does not ship Node.js by default, and actually you don't even need to have Node.js installed on your machine to build Tauri apps. (You can in fact just use the Rust CLI, and even build your entire frontend with a WASM based system like YEW).
- Tauri does not run a devserver for your HTML/CSS/JS framework. There are just too many of them and they change all the time, so it is not worth the maintenance burden.

## Who is Tauri
The Tauri organisation aims to be a sustainable collective based on principles that guide [sustainable free and open software communities](https://sfosc.org). To this end it is currently becoming a Programme within the [Commons Conservancy](https://commonsconservancy.org/), and you can contribute financially via [Open Collective](https://opencollective.com/tauri).

## What's Next?

We've got a lot planned for Tauri, like Arm/Android/iOS support, a testing framework, and binding to other languages for the main process. See [our roadmap](https://tauri.studio/en/#roadmap) for the full list. If you'd like to help add these features to Tauri (or if you have any questions), we'd love for your to join our Discord Server at https://discord.gg/tauri . Let us know that you want to contribute, and we'll find a good task for you and guide you along.

You can also help us out by donating to our [Open Collective](https://opencollective.com/tauri), however if your company actually turns a profit using Tauri, you should really consider the benefits of becoming a platinum sponsor. And speaking of sponsoring... how many open source projects do you sponsor? We hear that Babel needs support.

---

Title Graphic: Alve Larsson