跳到內容
Tauri

Announcing Tauri 1.1.0

Tauri 1.1 Launch Hero Image

After 113 pull requests and nearly two months of work, the Tauri team is pleased to announce the 1.1.0 release. The changes were internally audited and no security issues were found.

You can update the dependencies with

npm install @tauri-apps/cli@latest @tauri-apps/api@latest

What’s New in 1.1.0

Security patch

This release includes a patch for a security vulnerability reported by @martin-ocasek. The readDir function was able to return entries outside the configured scope when a symlink is found. The patch is also available in Tauri 1.0.6. See the issue on GitHub for more details.

Icon Generation

We have been recommending to use the tauricon project to generate icons for your Tauri application using a single source PNG. Several issues have been reported, and we decided to “Rewrite It In Rust” to enhance its stability. This allowed us to move this functionality to the main Tauri CLI, so now you can use the tauri icon command.

cargo-binstall Support for Tauri CLI

The Tauri CLI can now be installed using cargo-binstall, a mechanism to download and install pre-built Rust binaries. The binaries are available for the main targets and can be installed with

$ cargo install cargo-binstall
$ cargo binstall tauri-cli
$ cargo tauri dev # run any Tauri command!

Create System Trays at Runtime

The system tray APIs (previously only available in tauri::Builder::system_tray) can now be used at runtime with tauri::SystemTray giving you control over its lifetime and even create multiple trays.

Here’s a quick example on how to use it

use tauri::{Builder, CustomMenuItem, SystemTray, SystemTrayEvent, SystemTrayMenu};
Builder::default()
.setup(|app| {
let handle = app.handle();
SystemTray::new()
.with_id("main")
.with_menu(
SystemTrayMenu::new().add_item(CustomMenuItem::new("quit", "Quit"))
)
.on_event(move |event| {
let tray_handle = handle.tray_handle_by_id("main").unwrap();
if let SystemTrayEvent::MenuItemClick { id, .. } = event {
if id == "quit" {
tray_handle.destroy().unwrap();
}
}
})
.build(&handle)
.expect("unable to create tray");
});

TOML Configuration Support

In the 1.0 releases Tauri supports the JSON configuration format by default, and JSON5 when the config-json5 Cargo feature is enabled, meaning the following configurations are valid

tauri.conf.json
{
"build": {
"devPath": "http://localhost:8000",
"distDir": "../dist"
}
}
{
build: {
// devServer URL (comments are allowed!)
devPath: 'http://localhost:8000',
distDir: '../dist',
},
}

The 1.1.0 release includes TOML support behind the config-toml Cargo feature. Now you can define your Tauri configuration in a Tauri.toml file

Tauri.toml
[build]
dev-path = "http://localhost:8000"
dist-dir = "../dist"

Dependency Updates

This release includes some dependency updates that must be handled in your app if you implement platform-specific functionalities using these crates. The most important updates are

  • windows updated to 0.39.0
  • webview2-com updated to 0.19.1
  • raw-window-handle updated to 0.5.0

Make sure you also update plugins such as window-vibrancy and window-shadows to latest.

Contributors to 1.1.0

The Tauri team thanks the following contributors for the 1.1.0 release

Other Changes

There are a lot of smaller changes and bug fixes in this release. You can see a summary of the release notes in the following sections. The complete changelog can be found on the releases page.

New

  • tauri icon 命令
  • exists API 在 fs 模組中
  • 使用 tauri dev --no-watch 選項停用開發監視器
  • 自動使用任何 .taurignore 檔案作為開發監視器和應用程式路徑尋找器的忽略規則
  • 為 Tauri CLI 新增 cargo-binstall 支援
  • TOML 設定格式 (Tauri.toml)
  • Linux 上的主題 API
  • 在執行階段建立系統 Tray
  • beforeBundleCommand 設定
  • beforeDevCommandbeforeBuildCommand 現在具有設定目前工作目錄的選項
  • api::Command::encoding 方法,用於設定 stdout/stderr 編碼
  • 新增 native-tls-vendoredreqwest-native-tls-vendored Cargo 功能,以編譯並靜態連結到 Linux 上 OpenSSL 的供應商副本
  • AppAppHandle 實作 raw_window_handle::HasRawDisplayHandle

Fixes

  • CLI 解析器忽略內部子命令。
  • 更新器破壞 Finder 中的應用程式圖示。
  • 修正使用 CodegenContext API 時,程式碼產出根目錄錯誤的問題。

Security

  • 修正 fs.readDir 遞迴選項讀取範圍不允許的符號連結目錄的問題

Improvements

  • 根據設定的公開金鑰驗證更新器簽章
  • 如果 Sidecar 設定的檔案名稱與應用程式相同,則傳回錯誤。
  • 將建立的視窗保存在 RefCell 而不是 Mutex 中,避免死鎖
  • tauri init 中提示輸入 beforeDevCommandbeforeBuildCommand
  • 使用 cargo metadata 偵測工作區根目錄和目標目錄。
  • 允許設定 before_dev_command 以強制 CLI 等待命令完成後再繼續。
  • 避免在每次建置時重新下載 AppImage 建置工具。
  • api::process::restart 中保留命令列引數
  • 透過資訊清單依賴 Microsoft.Windows.Common-Controls v6.0.0.0 增強 Windows 上的對話框樣式。
  • 如果資產或圖示變更,則重新執行程式碼產生
  • 僅在內容變更時重寫臨時圖示檔案,避免不必要的重新建置。

© 2025 Tauri Contributors。CC-BY / MIT 授權條款