Tauri 2.0: Migrate to Updater Plugin
The Rust `tauri::updater` and JavaScript `@tauri-apps/api-updater` APIs were removed. The built-in automatic update dialog was removed. Add `tauri-plugin-updater = "2"` to Cargo.toml. In JavaScript, add `@tauri-apps/plugin-updater` to package.json and use `import { check } from '@tauri-apps/plugin-updater'; const update = await check(); if (update?.available) { await update.downloadAndInstall(); }`. In Rust, add `.plugin(tauri_plugin_updater::Builder::new().build())` and use `handle.updater().check().await` in setup or a spawned task.
Tauri 2.0: Migrate Path API to Manager
The Rust `tauri::api::path` module functions and `tauri::PathResolver` moved to `tauri::Manager::path`. Use `app.path().home_dir()` to get the home directory and `app.path().resolve("path/to/something", BaseDirectory::Config)?` to resolve paths. Import `tauri::path::BaseDirectory` and `tauri::Manager`.
Tauri 2.0 Shell plugin example: execute command and capture output
Example showing how to spawn a child process and capture its output in Rust:
```rust
use tauri_plugin_shell::ShellExt;
fn main() {
tauri::Builder::default()
.plugin(tauri_plugin_shell::init())
.setup(|app| {
let output = tauri::async_runtime::block_on(async move {
app.shell().command("echo").args(["TAURI"]).output().await.unwrap()
});
assert!(output.status.success());
assert_eq!(String::from_utf8(output.stdout).unwrap(), "TAURI");
Ok(())
})
}
```
Tauri 2.0 Shell plugin example: read command output asynchronously
Example showing how to spawn a child process and read its events asynchronously in Rust:
```rust
use tauri_plugin_shell::{ShellExt, process::CommandEvent};
fn main() {
tauri::Builder::default()
.plugin(tauri_plugin_shell::init())
.setup(|app| {
let handle = app.handle().clone();
tauri::async_runtime::spawn(async move {
let (mut rx, mut child) = handle.shell().command("cargo")
.args(["tauri", "dev"])
.spawn()
.expect("Failed to spawn cargo");
let mut i = 0;
while let Some(event) = rx.recv().await {
if let CommandEvent::Stdout(line) = event {
println!("got: {}", String::from_utf8(line).unwrap());
i += 1;
if i == 4 {
child.write("message from Rust\n".as_bytes()).unwrap();
i = 0;
}
}
}
});
Ok(())
})
}
```
create-tauri-app install and run commands with --alpha flag
Commands to create a new Tauri 2.0 alpha app: pnpm create tauri-app --alpha; yarn create tauri-app --alpha; npm create tauri-app -- --alpha; cargo install create-tauri-app --locked then cargo create-tauri-app --alpha; sh <(curl https://create.tauri.app/sh) --alpha; $env:CTA_ARGS="--alpha";iwr -useb https://create.tauri.app/ps | iex
Templates removed in create-tauri-app version 3
create-tauri-app version 3 removed the following templates to improve maintainability: next, next-ts, preact, preact-ts, clojurescript, svelte-kit, and svelte-kit-ts. These were removed based on The State of JS community survey and Tauri community feedback to focus on the most popular frontend frameworks.
Supported UI templates in create-tauri-app version 3
create-tauri-app version 3 supports the following UI templates: Vanilla, Vue, Svelte, React, Solid, Angular, Next, SvelteKit, and ClojureScript. Vue, Svelte, React, Solid, and SvelteKit offer both TypeScript and JavaScript flavors.
Community templates available in awesome-tauri repository
The Tauri community can submit templates for frameworks and tools not officially supported by create-tauri-app to the templates section of the awesome-tauri GitHub repository at https://github.com/tauri-apps/awesome-tauri#templates. The Tauri team plans to create a website section to highlight community templates.
How to use create-tauri-app version 2 templates
To use the previous version 2 templates: pnpm create tauri-app@2; yarn create tauri-app@2; npm create tauri-app@2; cargo install create-tauri-app --version 2.8.0 --locked then cargo create-tauri-app; sh <(curl https://create.tauri.app/v/2.8.0/sh); iwr -useb https://create.tauri.app/v/2.8.0/ps | iex
Tauri 2.0 release phases
The path to Tauri 2.0 stable release consists of three key milestones: Beta, Release Candidate, and Stable. The project is currently in the 2.0 alpha phase.
Beta phase requirements for Tauri 2.0
To enter beta phase, Tauri 2.0 must be feature-complete and working with no known major issues. The Tauri Working Group must be satisfied with the public Tauri APIs and not anticipate any breaking changes, although these are possible as community feedback is received. Once beta is entered, the code base is locked down and no new features are targeted for Tauri 2.0.
Release Candidate phase for Tauri 2.0
After security audit findings are resolved, Tauri 2.0 moves to the release candidate phase. This phase is time-locked and community testing is requested to identify bugs and gather feedback. A documentation sprint is planned to align documentation with the actual implementation.
Tauri 2.0 stable release target timeline
The Tauri project is roughly targeting a Tauri 2.0 stable release in early 2024. However, hard timelines are not yet available as the team wants to remain flexible to accommodate security audit findings and community feedback.
Tauri 1.2.0 minimum Rust version requirement
Tauri 1.2.0 requires a minimum of Rust 1.59 to compile. This requirement was increased from earlier versions due to dependency updates.
Bundle publisher configuration option in 1.2.0
Tauri 1.2.0 adds a configuration option for the bundle publisher.
cargo-binstall support for Tauri CLI installation
The Tauri CLI can be installed using cargo-binstall with: cargo install cargo-binstall, then cargo binstall tauri-cli. Pre-built Rust binaries are available for main targets, and commands can then be run with cargo tauri dev.
tauri icon command for icon generation
Tauri 1.1.0 includes the tauri icon command to generate icons for Tauri applications using a single source PNG. This functionality was rewritten in Rust and moved to the main Tauri CLI from the separate tauricon project.
Major dependency updates in Tauri 1.1.0
Tauri 1.1.0 includes dependency updates that may require changes if implementing platform-specific functionalities: windows updated to 0.39.0, webview2-com updated to 0.19.1, raw-window-handle updated to 0.5.0. Plugins such as window-vibrancy and window-shadows should also be updated to latest.
Tauri dev command --no-watch option
Tauri 1.1.0 adds the --no-watch option to tauri dev to disable the dev watcher.
Native TLS vendored Cargo features
Tauri 1.1.0 adds native-tls-vendored and reqwest-native-tls-vendored Cargo features to compile and statically link to a vendored copy of OpenSSL on Linux.
Updater app icon fix in Finder
Tauri 1.1.0 fixes the updater breaking the app icon in Finder.
Rust 1.60 MSRV with dependency pinning
Tauri 1.4 maintains MSRV of Rust 1.60, but no longer pins patch versions of time, ignore, and winnow crates. If using Rust 1.60, these versions must be manually pinned using cargo update.
NSIS installer enhancements in 1.4.0
Tauri 1.4.0 added support for custom language files, custom installer templates (.nsi files), support for Dutch, Japanese, Korean, Persian, Swedish and Turkish languages, detection and uninstall prompts for WiX-installed applications, and improved updater install mode support.
Bun package manager support
Starting with Tauri 1.5, the Tauri CLI supports the Bun package manager.
Tauri 1.5 code signing improvements
Tauri 1.5 bundler now signs all executables including sidecars, app executables, and NSIS uninstaller. It also signs macOS frameworks and fixes the @rpath value to prevent crashes when updating the app.
macOS frameworks support and code signing
Tauri 1.5 supports code signing custom macOS frameworks that are injected via tauri.conf.json > tauri > bundle > macOS > frameworks configuration. The @rpath value is defined to fix crashes when updating the app.
notarytool migration and altool deprecation deadline
Apple deprecated altool for macOS notarization, which will stop working on 2023-11-01. Tauri 1.5 migrates to notarytool. Users must upgrade their Tauri CLI to 1.5 before this deadline.
APPLE_API_KEY_PATH environment variable for notarytool
When using notarytool with API keys for Apple notary service authentication, notarytool no longer automatically searches for the .p8 API key file. Users should define the API key file path via the APPLE_API_KEY_PATH environment variable. For backward compatibility, Tauri performs the same lookup done by altool if the environment variable is not set.
APPLE_TEAM_ID environment variable for notarization
Starting with Tauri 1.5, the APPLE_TEAM_ID environment variable can be used to properly define the team ID associated with your Apple account when you belong to multiple teams.
Update command for Tauri 1.6.0 with pnpm
To update to Tauri 1.6.0 with pnpm, run: pnpm update @tauri-apps/cli @tauri-apps/api --latest
Update command for Tauri 1.6.0 with yarn
To update to Tauri 1.6.0 with yarn, run: yarn upgrade @tauri-apps/cli @tauri-apps/api --latest
Update command for Tauri 1.6.0 with Cargo
To update Tauri 1.6.0 Cargo dependencies, run: cargo update
macOS code signing detects nested bundles in 1.6.0
In Tauri 1.6.0, the code signing process now detects and code signs nested dylib, app, xpc, and frameworks inside the macOS app bundle. This enables applications to use external libraries while remaining codesigned and notarized.
Windows auto updater preserves command line arguments in 1.6.0
In Tauri 1.6.0, the auto updater on Windows now preserves command line arguments when updating.
NSIS bundle target for Windows installers
Tauri 1.3 introduces the ability to create Windows application installers using NSIS through the Tauri CLI. This bundle target is also available as an experimental feature on macOS and Linux for cross-compiling Windows installers.
CI flag for signer generate command in Tauri 1.3
Tauri 1.3 adds a --ci flag to the signer generate command. When this flag or the CI environment variable is set, the default password is an empty string and the CLI will not prompt for a value.
TAURI_KEY_PASSWORD environment variable handling in Tauri 1.3
Tauri 1.3 skips the password prompt on the build command when the TAURI_KEY_PASSWORD environment variable is empty and either the --ci argument is provided or the CI environment variable is set.
Bundler handlebars template injection fix
Tauri 1.3 fixed a vulnerability where content passed to handlebars::Handlebars::render() in the bundler was not being escaped, which could cause unwanted code execution during the bundler phase when building applications.
Cargo workspace inheritance support in Tauri 1.3
Tauri 1.3 adds support for Cargo's workspace inheritance feature, allowing Tauri projects to inherit workspace member settings.
macOS dylib support in Tauri 1.3
Tauri 1.3 adds dylib support to tauri.bundle.macOS.frameworks configuration, allowing developers to bundle dynamic libraries as frameworks on macOS.
MSI installer Launch App checkbox behavior in Tauri 1.3
On Windows, the MSI installer's Launch App checkbox is now checked by default in Tauri 1.3.
Icon command --png option in Tauri 1.3
Tauri 1.3 adds a --png option to the icon command to generate custom icon sizes.
Update Tauri 1.3.0 dependencies via npm, yarn, pnpm, and cargo
To upgrade to Tauri 1.3.0, use one of these commands: npm install @tauri-apps/cli@latest @tauri-apps/api@latest, yarn upgrade @tauri-apps/cli @tauri-apps/api --latest, pnpm update @tauri-apps/cli @tauri-apps/api --latest, or cargo update.
MSI bundle pre-release identifiers and build numbers in Tauri 1.3
Tauri 1.3 adds support for pre-release identifiers and build numbers in MSI bundle versions. Only one of each can be used and must be numeric only. The version must still be semver compatible according to https://semver.org/.
RPM bundle support added to Tauri 1.7.0
RPM packaging support, previously available only in Tauri v2, has been backported and is now available in the v1 channel as of 1.7.0.
Update NPM and Cargo dependencies to 1.7.0
To upgrade to Tauri 1.7.0, update both NPM and Cargo dependencies. Use 'npm install @tauri-apps/cli@latest @tauri-apps/api@latest' for npm, 'yarn upgrade @tauri-apps/cli @tauri-apps/api --latest' for yarn, 'pnpm update @tauri-apps/cli @tauri-apps/api --latest' for pnpm, or 'cargo update' for Cargo.
Windows custom codesign script support in 1.7.0
Tauri 1.7.0 added support for custom Windows code signing scripts. By default Windows packaging uses SignTool which only works on Windows, but the custom sign command feature allows using alternatives like osslsigncode and relic that can run on Unix systems and support hardware tokens, Azure Key Vault and more. This is useful for cross-compilation.
DMG configuration in Tauri 1.7.0
Tauri 1.7.0 added configurability for DMG installers. You can now change the position of icons and the window size to fit better within a custom background.
Tauri 2.0 Linux uses WebKit2GTK 4.1 instead of 4.0
Tauri v2.0 migrated from WebKit2GTK 4.0 to WebKit2GTK 4.1 on the Linux port. This change was made to enable flatpak support and to fix subtle bugs that only occur in soup2 (used by WebKit2GTK 4.0). WebKit2GTK 4.1 uses soup3 instead of soup2.
WebKit2GTK 4.1 installation on Linux distributions
To install WebKit2GTK 4.1 for Tauri 2.0 development on Linux: On Arch Linux / Manjaro run `sudo pacman -S webkit2gtk-4.1`. On Debian / Ubuntu run `sudo apt install libwebkit2gtk-4.1-dev`. On Fedora run `sudo dnf install webkit2gtk4.1-devel`.
Tauri 2.0 MSRV bumped to Rust 1.64
Tauri v2.0.0-alpha.3 raised the Minimum Supported Rust Version (MSRV) to 1.64. This version is required to satisfy the latest version of windows-rs. Tauri plans to update MSRV with minor releases after 2.0.
Breaking changes from WebKit2GTK 4.0 to 4.1 upgrade
The upgrade from WebKit2GTK 4.0 to 4.1 primarily changes the underlying soup library from soup2 to soup3. Applications that do not use soup2-specific APIs should continue to work without modification.
Tauri 1.x unaffected by WebKit2GTK 4.1 migration
Users continuing with Tauri version 1.x do not need to install or change to WebKit2GTK 4.1. The upgrade only affects Tauri 2.0 alpha.3 and later.
Tauri 2.0.0-alpha.4 NPM dependencies update command
To update NPM dependencies for Tauri 2.0.0-alpha.4, use one of the following commands depending on your package manager: npm install @tauri-apps/cli@next @tauri-apps/api@next, yarn upgrade @tauri-apps/cli@next @tauri-apps/api@next, or pnpm update @tauri-apps/cli@next @tauri-apps/api@next.
Tauri 2.0.0-alpha.4 Cargo dependencies update command
To update Cargo dependencies for Tauri 2.0.0-alpha.4, run: cargo add tauri@2.0.0-alpha.4, cargo add tauri-build@2.0.0-alpha.2 --build, and cargo install tauri-cli --version "^2.0.0-alpha" --locked.
HTTP client breaking change in Tauri 2.0.0-alpha.4
The default HTTP client using attohttpc has been removed due to issues with the development server proxy on Windows. All reqwest-* feature flags have been removed because reqwest is now the client used instead.
Mobile projects recreation for Tauri 2.0.0-alpha.4
To use new mobile features in Tauri 2.0.0-alpha.4, recreate the mobile projects by running: rm -r src-tauri/gen, tauri android init, and tauri ios init.
Distribution formats supported
Tauri 2.0 has official distribution guides for Apple App Store, Google Play, Microsoft Store, CrabNebula Cloud, Flathub, Snapcraft, AUR, and other distribution formats. The GitHub action tauri-action is in progress to support automated building for mobile operating systems but does not support it yet.
Tauri migration from 1.x
Tauri 2.0 includes automated migration via the tauri-cli migrate command. A migration guide is available at https://v2.tauri.app/start/migrate/from-tauri-1/. Rust code cannot be automatically migrated and must be manually reviewed according to documentation and Rust docs of the 2.0 version.