- Fix the filesystem scope allowing sub-directories of the directory picked by the dialog when
recursive
option wasfalse
.- f0602e7c Merge pull request from GHSA-6mv3-wm7j-h4w5 on 2022-12-22
- Escape glob special characters in files/directories when dropping files or using the open/save dialogs.
- Fix
fs.readDir
recursive option reading symlinked directories that are not allowed by the scope.
- Escape the MSI file path when running msiexec via powershell.
- Reduce the amount of allocations when converting cases.
tauri::Builder
will now include a default menu for macOS without explicitly usingMenu::os_default
, you can still override it throughtauri::Builder::menu
or remove it usingtauri::Builder::enable_macos_default_menu(false)
.- Use
toString()
on message/confirm/ask dialogs title and message values. - Fix stack overflow on Windows on commands by changing the implementation of the
async_runtime::spawn
method. - Emits RunEvent::Exit prior to killing child processes managed by Tauri, allowing graceful shutdown of sidecar binaries.
- Added option to disable tray menu on left click on macOS.
- Only run the updater default dialog mode in supported platforms or development mode.
- Configure the updater to relaunch after installing the update on Windows.
- Fixes check for local URL when an external URL is provided to the window and it is based on the configured devPath.
- Added
fn new
constructors forPhysicalSize
,LogicalSize
,PhysicalPosition
andLogicalPosition
and missing conversion methods. - Set the bundle name and app metadata in the Info.plist file in development mode.
- 38f5db6e feat(codegen): fill app metadata in development Info.plist on 2022-06-21
- Set the application icon in development mode on macOS.
- Fixes the error message when using the
window.unminimize
API without enabling it in the allowlist. - Initialize Tauri script when
devPath
is an external URL with path. - Fixes deadlock when a plugin window ready event needs to block the thread waiting on the event loop.
- Adjust the updater to fallback to
$HOME/.cache
or the current working directory as temp directory if the system default is in a different mount point. - Properly fill the origin window when using
emit_to
andemit_all
fromWindow
. - Implement
raw_window_handle::HasRawWindowHandle
on Linux. - Added
on_drop
hook to theplugin::Builder
. - Refactored the
tauri-runtime-wry
plugin interface. - Added
AppHandle::remove_plugin
. - The theme API is now implemented on macOS 10.14+.
- Suppress unused variable warning in release builds.
- Update tao to 0.12 and wry to 0.19.
- Added
Notification::notify
API behind thewindows7-compat
Cargo feature, which includes Windows 7 support.
- Allow choosing multiple folders in
dialog.open
. - Upgrade to
stable
!
- Add
Menu::os_default
which will create a menu filled with default menu items and submenus.
- Breaking change: The
TrayIcon
enum has been removed and nowIcon
is used instead. This allows you to use more image formats and use embedded icons on Linux.
- Fixes filesystem scope check when using the HTTP API to upload files.
- Fixes a memory leak in the command system.
- Fixes the
Content-Type
header value when sending multipart requests using thereqwest-client
feature. - Kill sidecar processes on app exit even when only the
shell-sidecar
feature is enabled. - Fixes a crash when a request is made to
https://tauri.$URL
on Windows where$URL
is notlocalhost/**
e.g.https://tauri.app
. - Set notification icon to app icon on Linux.
- Breaking change: Revert the window creation to be blocking in the main thread. This ensures the window is created before using other methods, but has an issue on Windows where the program deadlocks when creating a window in a Tauri command if it is not
async
. The documentation now states that commands must beasync
in other to prevent it until the issue is fixed in Webview2. - No longer ask for permission to send notifications and always allow it.
- Breaking change: Removed the
settings
module. - Breaking change: Removed the
gtk-tray
andayatana-tray
Cargo features. - Call
preventDefault()
in the mousedown event handler for[data-tauri-drag-region]
elements. - Set permission to
0o700
for the tmp folder used to move the current AppImage on the updater process.
- Breaking change:
PackageInfo::version
is now asemver::Version
instead of aString
. - Breaking change:
UpdateBuilder::should_update
now takes the current version as asemver::Version
and aRemoteRelease
struct, allowing you to check other release fields. - Breaking change: The
tauri::UpdaterEvent::UpdateEvent
date field is now anOption<time::OffsetDateTime>
. - Breaking change: The updater response
pub_date
now must be a valid RFC 3339 string.
- Fix
cannot find macro `message_dialog`
error.
- Expose option to set the dialog type.
- Expose
title
option in the message dialog API. - Immediately create windows when using
tauri::App
as manager. - Account the monitor position when centering a window.
- Allow the canonical, absolute form of a path for the filesystem scope on Windows if
std::fs::canonicalize
returns a path, fallback to\\?\$PATH
. - Fixes updater documentation not showing on docs.rs.
- Fixes HTTP timeout not working on Windows when using the
attohttpc
client. - Update
windows-rs
to0.37.0
, which requires Rust 1.61.0+. - Breaking change: The
WindowBuilder
struct now has a lifetime annotationWindowBuilder<R: Runtime, 'a>
.
- Added the
App::get_cli_matches
helper function. - Fixes
fileDropEnabled
option not working. - Prepare window icon and menu even when loading remote URLs. Previously it was behind a
is local URL?
condition. - Fix
.mjs
not being recognised as a file extension for JavaScript files (text/javascript
). - Added
PathResolver::resolve_resource
API. - Allow configuring the display options for the MSI execution allowing quieter updates.
- Update wry to 0.16.2 and webkit2gtk to 0.18.0.
- Adds the
App#wry_plugin
API to inject a plugin for the wry integration.
- The
dangerous_allow_asset_csp_modification
configuration value has been changed to allow a list of CSP directives to disable. - The file drop event payloads are now percent-decoded.
- Fix dialog crash on macOS when the
default_path
value is just the file name. - Fixes the
title
option being ignored in the dialog API endpoints. - Fixes nested isolation iframe injection.
- Deserialize numeric values (seconds) in the http API
ClientBuilder.connect_timeout
andHttpRequestBuilder.timeout
fields. - Fix updater dialog removing single and double quotes from the release notes
- Expose methods to access the underlying native handles of the webview.
- Breaking change: Removed the
ayatana-tray
from the default features. You must select one ofayatana-tray
andgtk-tray
to use system tray on Linux. - Re-export the
GlobalShortcutManager
when theglobal-shortcut
feature is enabled. - Fixes
docs.rs
documentation build.
- Breaking change: Removed
tauri::api::file::ArchiveFormat::Plain
. - Fallback to
{path}.html
when{path}
is not found in the Tauri custom protocol handler. - Breaking change: Use ayatana-appindicator for Linux system tray by default. Use the
gtk-tray
Cargo feature to uselibappindicator
instead. - Reduce the amount of generated code for the API endpoints.
- *Breaking change:: Added the
clipboard
Cargo feature. - Breaking change: The process Command API stdio lines now includes the trailing
\r
. - Expose Window cursor APIs
set_cursor_grab
,set_cursor_visible
,set_cursor_icon
andset_cursor_position
. - Breaking change: The
tauri::api::file::Extract#extract_file
function has been moved totauri::api::file::Entry#extract
. - Breaking change: The
tauri::api::file::Extract#files
function has been renamed towith_files
for performance reasons. - Improved the performance of the
tauri::api::fs::Extract
API. - Fixes a panic when using the
create_tao_window
API. - Fixes the HTTP API form text fields.
- Set the application bundle identifier for the notifications on macOS.
- Fixes a panic when a menu event is triggered when all windows are minimized on macOS.
- Fixes a rendering issue when resizing the window with the devtools open.
- Fixes the
WindowBuilder
export. - The HTTP API now supports
multipart/form-data
requests. You need to set theContent-Type
header and enable thehttp-multipart
Cargo feature. - *Breaking change:: Added the
global-shortcut
Cargo feature. - Added
tauri::api::http::HttpRequestBuilder#header
method. - Breaking change: The
tauri::api::http::HttpRequestBuilder#headers
method now takesheader::HeaderMap
instead of aHashMap
. - Breaking change: The
tauri::api::http::Response#headers
method now returns&header::HeaderMap
instead of&HashMap
. - Breaking change: The
api::http
timeouts are now represented asstd::time::Duration
instead of au64
. - Breaking change: The
tauri::api::http::FormPart::Bytes
enum variant has been renamed toFile
with a value object{ file, mime, file_name }
. - Breaking change: Removed
App::create_window
,AppHandle::create_window
,Builder::create_window
andWindow::create_window
. - Breaking change: Removed
tauri::api::http::FormPart::File
. - Added
WindowEvent::ThemeChanged(theme)
. - Added
theme
getter onWindow
. - Added
UpdateResponse::body
andUpdateResponse::date
. - Breaking change: Removed the
tauri::updater::Error::UnsupportedPlatform
variant and addedUnsupportedLinuxPackage
,UnsupportedOs
andUnsupportedArch
for better error information. - Add updater
Downloaded
status event. - Allow setting app updater request headers via
AppHandle::updater().header()
. - The updater default timeout is now unset, and the
UpdateBuilder
has atimeout
setter. - Added
theme
setter to the WindowBuilder.
- Fixes the
WindowEvent
type used onWindow::on_window_event
. - Fixes
WindowEvent::Destroyed
not firing.
-
Added
updater_target
method to theBuilder
struct. -
Added an option to disable the CSP injection of distributable assets nonces and hashes.
-
Toggle devtools when
Ctrl + Shift + I
orCommand + Option + I
is pressed. -
Use asynchronous file dialog on macOS and Windows to properly set the parent window.
-
The
Error
enum is nowSend + Sync
. -
Do not allow path traversal on the asset protocol.
-
Properly apply the CSP when loading a route that fallbacks to index.html.
-
Fix CSP usage on Linux when changing it via the
on_web_resource_request
handler.- f5efc248 fix(core): runtime CSP changes on Linux on 2022-03-07
-
Improved the updater response validation and error messages.
-
Breaking change: The
MenuItem::About
variant is now associated with a tuple value(String, AboutMetadata)
. -
Replace multiple dependencies who's C code compiled concurrently and caused the other ones to bloat compile time significantly.
-
zstd
->brotli
-
blake3
-> a vendored version of the blake3 reference -
ring
->getrandom
See #3773 for more information about these specific choices.
- 8661e3e2 replace dependencies with long build times when used together (closes #3571) (#3773) on 2022-03-27
- Breaking change: The
Window::hwnd
method now returns HWND fromwindows-rs
crate instead of c_void on Windows. - Support window parenting on macOS
- Breaking change: The updater default targets have been renamed to include better support for different architectures.
- Breaking change: Removed
RunEvent::CloseRequested
andRunEvent::WindowClosed
and addedRunEvent::WindowEvent
. - Breaking change: Removed
window_label
fromRunEvent::ExitRequested
. - Breaking change: The
tauri://
events are no longer emitted to listeners usingWindow::listen
. Use theApp::run
closure,Window::on_window_event
andWindow::on_menu_event
instead. - The
App::setup
closure can now return a boxed error directly. - Implement
Debug
fortauri::State
. - Breaking change: The
Manager::manage
function now returns a bool indicating whether the type is already managed or not. - Set the
Access-Control-Allow-Origin
header on thetauri
protocol response with the initial webview URL as value. - Breaking change: The
tauri_runtime
crate is no longer exported since its API is not stable. - Added
Temp
to theBaseDirectory
enum. - Added
$TEMP
to the allowed variables to the filesystem and asset protocol scopes. - Update
wry
to0.14
andtao
to0.7
. - Added
updater
method toApp
andAppHandle
, a builder to check for app updates. - Allow using a custom updater version checker via
App::updater().should_install()
. - Added download progress events to the updater.
- Send updater events to the
App::run
closure. - Run the updater on startup even if no window was created.
- Properly fire the window destroyed event.
- Added
close_devtools
andis_devtools_open
APIs to theWindow
struct. - Added the
WindowEvent::FileDrop
variant. - Added a configuration flag for disallowing install downgrades on Windows. Breaking change: The default behavior on Windows is now to allow downgrades.
- Run
AppHandle
cleanup code before restarting the application on theprocess > relaunch
API. - Breaking change: The
Builder#create_window
API now returns a Result validating the window label. - Added
tsp
config option undertauri > bundle > windows
, which enables Time-Stamp Protocol (RFC 3161) for the timestamping server under code signing on Windows if set totrue
. - Revert the
clap
usage back to the version 3.0 API. - The
tauri::api::process::Command
API now properly reads stdout and stderr messages that ends with a carriage return (\r
) instead of just a newline (\n
). - Fixes filesystem and asset scope stripping the first component of the allowed path.
- Ignore trailing slashes on path scope validation.
- Fixes
Command::output
andCommand::status
deadlock when running on async commands. - Update tray menu id map when
SystemTrayHandle::set_menu
is called. - Allow absolute paths on the filesystem APIs as long as it does not include parent directory components.
- Breaking change: The
tauri::api::file::Extract
API is now available when thefs-extract-api
feature is enabled. - Allow listening to events on the filesystem and asset scopes.
- Allow configuring forbidden paths on the asset and filesystem scopes.
- Extend the allowed patterns for the filesystem and asset protocol when the user selects a path (dialog open and save commands and file drop on the window).
- The HTTP scope now matches the entire URL using a glob pattern instead of only its path.
- Parse window icons at compile time.
- Breaking change: Move
ico
andpng
parsing behindicon-ico
andicon-png
Cargo features. - Return an error when creating a window with an invalid label instead of panicking.
- Allows the configuration CSP to be an object mapping a directive name to its source list.
- Allow range in the form of
bytes=0-*
on the asset protocol. - Reimplement endpoint to read file as string for performance.
- Breaking change: Renamed the
command
Cargo feature toprocess-command-api
. - Disabled the default features for the
zip
crate. - The
cmd
field is no longer required on the shell scope for sidecars. - Fixes a regression on the
unlisten
command. - Run
AppHandle
cleanup code before restarting the application when a new update is installed. - Added a
WindowBuilder
type. - Added
WindowBuilder::on_web_resource_request
, which allows customizing the tauri custom protocol response.
tauri::plugin::Builder
closures are no longer required to implementSync
.- Added context to the file system endpoint errors.
- Changed the default value for
tauri > bundle > macOS > minimumSystemVersion
to10.13
.
- Ease the requirements for plugin hooks.
setup
andsetup_with_config
can now beFnOnce
andon_webview_ready
,on_event
andon_page_load
can beFnMut
. - Fixes an issue with the updater when replacing the
{{target}}
and{{current_version}}
variables due to percent-encoding on theUrl
that is parsed from the configuration.
- Change default value for the
freezePrototype
configuration tofalse
.
- The dialog allowlist now includes flags for the
message
,ask
andconfirm
APIs. -
- Breaking change: Renamed
tauri::Event
totauri::RunEvent
- Breaking change: Renamed
- Exported
tauri::Event
andtauri::EventHandler
so you can define a function and pass it toWindow::listen
- 15358b18 Expose event interface. fixes #2733 (#3321) on 2022-02-04
- The
tauri::api
moduleshttp
,notification
,dialog
, andprocess::Command
APIs are now hidden behind a feature flag,http-api
,notification
,dialog
andcommand
, respectively. - Add
title
option to file open/save dialogs. - Added
any_thread()
to thetauri::Builder
to run applications on any thread (only exposed on Linux and Windows). - Enable CORS on the
asset
protocol. - The
asset://
custom protocol is only defined when either theapi-all
,protocol-all
orprotocol-asset
feature flags are enabled. These feature flags are accessible with thetauri.conf.json
allowlist. - Expose the
asset_resolver
API on theApp
andAppHandle
structs. - Breaking change: Refactored the types returned from the
async_runtime
module. - Added
tauri::async_runtime::set
method, allowing to share your tokio runtime with Tauri. - Added
tauri::async_runtime::spawn_blocking
API. - The
callback
anderror
invoke fields, along with othertransformCallback
usages, are now validated to be numeric. - Change
Error::ParseCliArguments(clap::Error)
toError::ParseCliArguments(String)
becauseclap::Error
is notSend
. - The
api::process::Command
APIs are now hidden behind thecommand
feature flag. - Add
tauri::api::path::log_dir
function to access the suggested log directory path. - The
process
,path
andupdater
APIs now takes atauri::Env
argument, used to force environment variables load on startup to prevent env var update attacks.- 7209fdf7 refactor(core): load APPIMAGE and APPDIR env vars on startup [TRI-007] [TRI-041] on 2022-01-09
- Now
resolve()
,join()
andnormalize()
from thepath
module, won't throw errors if the path doesn't exist, which matches NodeJS behavior. - Breaking change: Return
Window
onApp
andAppHandle
'screate_window
function. - Apply
nonce
toscript
andstyle
tags and set them on theCSP
(script-src
andstyle-src
fetch directives). - The path returned from
tauri::api::process::current_binary
is now cached when loading the binary. - Added an API to use a custom invoke system to receive and respond to commands (
Builder#invoke_system
). - Inject configured
CSP
ondata:
URLs. - Emit
tauri://*
events to Rust listeners. - Emit
tauri://window-created
event for windows created on the backend. - Enable non-session cookie persistence on Linux.
- Expose
tauri::api::ipc::{serialize_js_with, serialize_js}
functions. - Resolve
asset
protocol HTTP request instead of panicking if the file does not exist or cannot be read. - Avoid
async_runtime::block_on
panics when used along another tokio runtime. - Prevent window closing if
tauri://close-requested
is listened on the JS layer. Users must callappWindow.close()
manually when listening to that event. - Fixes a deadlock when creating a window from a menu event handler.
- Fixes the dialog
defaultPath
usage on Linux. - Fixes
WindowEvent::Focus
andWindowEvent::Blur
events not firing. - Fixes
tauri://focus
andtauri://blur
events not firing. - Use webview's inner_size instead of window's value to get the correct size on macOS.
- Fixes resource directory resolution on Linux.
- Fixes the menu id mapping not reflecting the current window.
Manager::once_global
andWindow::once
allowFnOnce
callbacks.- Properly check if document is loaded before invoking commands.
- Initialize system tray before windows so
tray_handle
can be accessed on command handlers.- dbe0d21b fix(core): initialize system tray before app windows on 2021-08-31
- Reimplement
remove_system_tray
on Windows to drop theSystemTray
to run its cleanup code. - Immediately listen to
tauri://window-created
event to catch it before the application triggers it. - The
tauri::Window#emit
function now correctly sends the event to all windows that has a registered listener. Breaking change:Window#emit_and_trigger
andWindow#emit
now requires the payload to be cloneable. - Allow using a fixed version for the Webview2 runtime via the
tauri > bundle > windows > webviewFixedRuntimePath
config option. - The updater
pubkey
is now a required field for security reasons. Sign your updates with thetauri signer
command. tauri::api::HttpRequestBuilder::new
now returns aResult
to validate the url.- Added the
isolation
pattern.- d5d6d2ab Isolation Pattern (#43) Co-authored-by: Ngo Iok Ui (Wu Yu Wei) wusyong9104@gmail.com Co-authored-by: Lucas Fernandes Nogueira lucas@tauri.app on 2022-01-17
- Added
abort
method totauri::async_runtime::JoinHandle
. - Adds support for using JSON5 format for the
tauri.conf.json
file, along with also supporting the.json5
extension.
Here is the logic flow that determines if JSON or JSON5 will be used to parse the config:
- Check if
tauri.conf.json
exists a. Parse it withserde_json
b. Parse it withjson5
ifserde_json
fails c. Return originalserde_json
error if all above steps failed - Check if
tauri.conf.json5
exists a. Parse it withjson5
b. Return error if all above steps failed - Return error if all above steps failed
- 995de57a Add seamless support for using JSON5 in the config file (#47) on 2022-02-03
- Allow preventing opening the default browser on a click on an
<a target="_blank">
element viastopImmediatePropagation()
. - The
run_return
API is now available on Linux. - Allow window, global shortcut and clipboard APIs to be called on the main thread.
- Add
Menu::with_items
constructor, taking an iterator ofMenuEntry
. - The updater now expects signatures created with the latest CLI release.
- Change event loop callbacks definition to allow callers to move in mutable values.
- Fixes
Notification.requestPermission()
deadlock.- 48f3768c fix(core):
Notification.requestPermission()
deadlock regression on 2021-08-24
- 48f3768c fix(core):
- Added
Window#open_devtools
API. - Add a
plugin::Builder
struct to make plugin creation more convenient. - Added
on_event
on thePlugin
trait, which allows a plugin to react to the event loop. - Prevent path traversal on the file system APIs.
- Breaking change: Add
macos-private-api
feature flag, enabled viatauri.conf.json > tauri > macOSPrivateApi
. - Add
raw_headers
totauri::api::http::ResponseData
. - Implement
raw_window_handle::RawWindowHandle
fortauri::Window
onWindows
andmacOS
. Thetauri::api::dialog::window_parent
function was removed since now you can use the window directly. - Refactor
create_tao_window
API to returnWeak<Window>
instead ofArc<Window>
.- c1494b35 refactor: return Weak on create_tao_window on 2021-08-31
- Added the
tauri::api::dialog::blocking
module. - The notification endpoint now checks for the permission flag and requests if the value is not set.
- Breaking change: The
WindowEvent::CloseRequested
variant now includeslabel
andsignal_tx
fields to allow preventing closing the window. - Breaking change: Move
__currentWindow
and__windows
values fromwindow.__TAURI__
towindow.__TAURI_METADATA__
. - Remove the
BaseDirectory::Current
enum variant for security reasons.- 696dca58 refactor(core): remove
BaseDirectory::Current
variant on 2022-01-26
- 696dca58 refactor(core): remove
- Breaking change: Remove default webview window when
tauri.conf.json > tauri > windows
is not set. - Breaking change: Renamed the
rpc
module toipc
. - Expose
run_on_main_thread
APIs onWindow
andAppHandle
. - The minimum Rust version is now
1.56
. - The minimum Rust version is now 1.57.
- d5d6d2ab Isolation Pattern (#43) Co-authored-by: Ngo Iok Ui (Wu Yu Wei) wusyong9104@gmail.com Co-authored-by: Lucas Fernandes Nogueira lucas@tauri.app on 2022-01-17
- Scopes the
filesystem
APIs from the webview access usingtauri.conf.json > tauri > allowlist > fs > scope
. Scopes theasset
protocol access usingtauri.conf.json > tauri > allowlist > protocol > assetScope
. Scopes thehttp
APIs from the webview access usingtauri.conf.json > tauri > allowlist > http > scope
. Scopes theshell
execute API from the webview access usingtauri.conf.json > tauri > allowlist > shell > scope
. Additionally, check thetauri.conf.json > tauri > bundle > externalBin
to prevent access to unknown sidecars. Builder#setup
closure type changed fromFn
toFnOnce
.- The
tauri::api::shell::open
'swith
argument is now an enum value instead of any string. - The
shell
allowlist now includes asidecar
flag, which enables the use of theshell
API to execute sidecars. - Breaking change: The sidecar's target triple suffix is now removed at build time.
- Fix streaming of small files using the
asset
protocol. - Add
set_menu
API ontauri::SystemTrayHandle
. - Adds
unlisten
function to theWindow
struct. - Force updater endpoint URL to use
https
on release builds. - Validate the
std::env::current_exe
return value ifAPPDIR
orAPPIMAGE
environment variables are set. - The event name is now validated. On a IPC message, it returns an error if it fails validation; on the Rust side, it panics.
It must include only alphanumeric characters,
-
,/
,:
and_
. - The window label is now validated and must be alphanumeric, resulting in a panic if it isn't.
- Allow
tauri.conf.json > package > version
to specify a path to apackage.json
file and pull the version from it. - Added
clipboard
field on theWebviewAttributes
struct, which must be set totrue
to enable clipboard access on the webview. - Replace all of the
winapi
crate references with thewindows
crate, and replacewebview2
andwebview2-sys
withwebview2-com
andwebview2-com-sys
built with thewindows
crate. This goes along with updates to the TAO and WRYnext
branches. - Show
Ok/Cancel
buttons instead ofYes/No
when executingwindow.confirm
. - Update the
windows
crate to 0.25.0, which comes with pre-built libraries. WRY and Tao can both reference the same types directly from thewindows
crate instead of sharing bindings inwebview2-com-sys
.
- Fix missing asset protocol path.Now the protocol is
https://asset.localhost/path/to/file
on Windows. Lunix and macOS is stillasset://path/to/file
. - Breaking change: Removed
register_uri_scheme_protocol
from theWebviewAttributes
struct and renamedregister_global_uri_scheme_protocol
toregister_uri_scheme_protocol
on theBuilder
struct, which now takes aFn(&AppHandle, &http::Request) -> http::Response
closure. - Migrate to latest custom protocol allowing
Partial content
streaming and Header parsing.
- Cleanup application on
AppHandle#exit
. - Fix
raw-window-handle
dependency declaration.
-
Breaking change: The
tauri::async_runtime::spawn
function now returnstauri::async_runtime::JoinHandle<T>
. -
Breaking change: Added
window_parent: Option<&Window>
as first argument to theask
andmessage
APIs on thetauri::api::dialog
module. -
Allow the
tauri::api::dialog
APIs to be executed on any secondary thread. Breaking change: All dialog APIs now takes a closure instead of returning the response on the function call. -
Breaking change: The
Plugin
traitinitialize
method now takes anAppHandle
reference instead ofApp
. -
Breaking change: Remove menu feature flag since there's no package dependency need to be installed on any platform anymore.
-
Adds
set_activation_policy
API to thetauri::App
struct (macOS only). -
Add
handle
API totauri::async_runtime
. -
Assets will now fallback to
<uri>/index.html
before/index.html
, allowing anchor links to work as expected. -
Fix
data-tauri-drag-region
double-click, will now respectresizable: false
and won't maximize. -
Fix
Notification.requestPermission()
throwingUnhandled Promise Rejection: TypeError: undefined is not a function (near '...window.__TAURI__.invoke...')
-
Fix blur/focus events being incorrect on Windows.
-
Move items which
tauri::api
re-exports fromtauri-utils
to individual moduleutils
. Because these items has their own Error/Result types which are not related to api module at all. -
Allow registering a plugin through an
AppHandle
instance using theplugin
method. -
Embed Info.plist file contents on binary on dev.
-
Add
ExitRequested
event that allows preventing the app from exiting when all windows are closed, and anAppHandle.exit()
function to exit the app manually. -
Change
App.create_window()
andAppHandle.create_window()
to accept anInto<String>
type instead ofString
. -
Fixes
defaultPath
option on dialog API not setting the file name if it doesn't exist on Linux. -
Fix ES Module detection for default imports with relative paths or scoped packages and exporting of async functions.
-
Fix
listen
calls receiving past events. -
Fixes file drop events being swapped (
file-drop-hover
on drop andfile-drop
on hover). -
Fixes
app.listen_global
not receiving events emitted in javascript. -
Fixes minimum window height being used as maximum height.
-
Fixes
unlisten
calls from JavaScript removing every registered event listener. -
Use
Url.join()
when building webview URLs inWindowManager
, to handle edge cases and leading/trailing slashes in paths and urls. -
Fixes
fs-all
feature not requiring thebase64
crate. -
Update gtk and its related libraries to v0.14. This also remove requirements of
clang
as build dependency. -
Use
HeaderValue::from_bytes
instead ofHeaderValue::from_str
andHeaderValue#to_bytes
instead ofHeaderValue#to_str
to improve compatibility. -
Implement
Debug
on public API structs and enums. -
Adds
Resumed
andMainEventsCleared
variants to theEvent
enum. -
Panic when a dispatcher getter method (
Window
,GlobalShortcutHandle
,ClipboardManager
andMenuHandle
APIs) is called on the main thread. -
Use
percent_encoding::percent_decode
on theasset
custom protocol URL before reading the file. -
Keep original value on
config > package > productName
on Linux (previously converted to kebab-case). -
Inject the invoke key on regular
<script></script>
tags. -
Remove salt-related APIs (no longer needed after the
__TAURI_INVOKE_KEY__
implementation). -
Update minimum Rust version to 1.54.0.
-
Run the setup callback after preparing the system tray.
-
Fixes a consistency issue on the order of
tauri::process::Command
emitted events. -
Force data directory even on non-local window.
-
Allow creation of empty Window with
create_tao_window()
and management withsend_tao_window_event()
on the AppHandler. -
Make
ClipboardManager
andGlobalShortcutManager
public as they are exposed in theAppHandle
. -
- Support macOS tray icon template to adjust automatically based on taskbar color.
-
Images you mark as template images should consist of only black and clear colors. You can use the alpha channel in the image to adjust the opacity of black content, however.
-
426a6b49 feat(macOS): Implement tray icon template (#2322) on 2021-07-29
-
Add
Event::Ready
on therun()
callback. Triggered once when the event loop is ready. -
- Do not run the updater with UAC task if server don't tell us. (Allow toggling server-side)
-
The updater expect a field named
with_elevated_task
with aboolean
and will not run if the task is not installed first. (windows only) -
c5761190 fix(updater): Run elevated task only if server tell us (#2357) on 2021-08-08
-
Add
try_state
API to theManager
trait.
- Allow preventing window close when the user requests it.
- Add
App#run
method with callback argument (event loop event handler). - Fixes
data-tauri-drag-region
not firing its events. - Fix macOS
EXC_BAD_ACCESS
panic when app is code-signed. - Fixes SVG loading on custom protocol.
- Expose
gtk_window
getter. - Inject invoke key on
script
tags withtype="module"
. - Fix macOS high CPU usage.
- Export
MenuHandle
andMenuEvent
types ontauri::window
. - Use glib context for linux updater to prevent GTK panic.
- Bump
wry
0.11 and fix focus integration to make it compatible with tao 0.4. Params
has been removed, along with all the associated types on it. Functions that previously accepted those associated types now accept strings instead. Type that used a generic parameterParams
now useRuntime
instead. If you use thewry
feature, then types with aRuntime
generic parameter should default toWry
, letting you omit the explicit type and let the compiler infer it instead.
tauri
:
- See
Params
note - If you were using
Params
inside a function parameter or definition, all references to it have been replaced with a simple runtime that defaults toWry
. If you are not using a custom runtime, just removeParams
from the definition of functions/items that previously took it. If you are using a custom runtime, you may need to pass the runtime type to these functions. - If you were using custom types for
Params
(uncommon and if you don't understand you probably were not using it), all methods that were previously taking the custom type now takes anInto<String>
or a&str
. The types were already required to be string-able, so just make sure to convert it into a string before passing it in if this breaking change affects you.
tauri-macros
:
- (internal) Added private
default_runtime
proc macro to allow us to give item definitions a custom runtime only when the specified feature is enabled.
tauri-runtime
:
- See
Params
note - Removed
Params
,MenuId
,Tag
,TagRef
. - Added
menu::{MenuHash, MenuId, MenuIdRef}
as type aliases for the internal type that menu types now use.- All previous menu items that had a
MenuId
generic now use the underlyingMenuId
type without a generic.
- All previous menu items that had a
Runtime
,RuntimeHandle
, andDispatch
have no more generic parameter oncreate_window(...)
and instead use theRuntime
type directlyRuntime::system_tray
has no moreMenuId
generic and uses the string basedSystemTray
type directly.- (internal)
CustomMenuItem::id_value()
is now hashed on creation and exposed as theid
field with typeMenuHash
.
tauri-runtime-wry
:
- See
Params
note - update menu and runtime related types to the ones changed in
tauri-runtime
.
tauri-utils
:
Assets::get
signature has changed to take a&AssetKey
instead ofimpl Into<AssetKey>
to become trait object safe.- fd8fab50 refactor(core): remove
Params
and replace with strings (#2191) on 2021-07-15
- Double clicking a
data-tauri-drag-region
element will toggle the window maximized state. - Fixes
asset
protocol crashing application.
- Fixes
api::process::Command
events not firing consistently. - Detect ESM scripts and inject the invoke key directly instead of using an IIFE.
- Improve invoke key code injection performance time rewriting code at compile time.
- Enforce uniqueness of window label.
Window
is nowSend + Sync
on Windows.
-
Remove anonymous lifetimes on examples.
-
Moves
shell
,dialog::FileDialogBuilder
andprocess::Command
APIs behind their allowlist feature flags. -
Adds
create_window
API to theAppHandle
struct. -
Adds a
handle
function to theApp
struct, which returns aSend
handle to the app instance. -
Use
attohttpc
on the HTTP API by default for bundle size optimization.reqwest
is implemented behind thereqwest-client
feature flag. -
Kill child processes spawned with
tauri::api::process::Command
ontauri::App
drop. Can be skipped withtauri::Builder#skip_cleanup_on_drop
. -
Adds
clipboard
APIs (write and read text). -
Allow accessing an
AppHandle
instance on a command through dependency injection. -
Fixes child processes messages not arriving until the subprocess is terminated.
-
Adds
config
andpackage_info
getters to theApp
andAppHandle
structs. -
Expose mutable getters for the rest of the public
Context
getters. -
pub fn assets_mut(&mut self) -> &mut Arc<A>
-
pub fn default_window_icon_mut(&mut self) -> &mut Option<Vec<u8>>
-
pub fn system_tray_icon_mut(&mut self) -> &mut Option<Icon>
-
pub fn package_info_mut(&mut self) -> &mut tauri::api::PackageInfo
-
754c2e76 feat(core): finish mutable getters for
Context
(#1814) on 2021-05-13 -
Adds
request_user_attention
API to theWindow
struct. -
Adds
show
,hide
,is_visible
andtoggle
APIs to theMenuHandle
. -
Allow
dev_path
anddist_dir
to be an array of root files and directories to embed. -
Validate
tauri.conf.json > build > devPath
andtauri.conf.json > build > distDir
values. -
Set the Tauri window as parent for dialogs.
-
Fallback to
index.html
on asset loading so router with history mode works. -
Fixes custom protocol asset loader not decoding the percent-encoded path.
-
As some frameworks automatically add "true" as the value of the attribute, we need to check if it exists instead.
-
Fixes build without the dialog Cargo features.
-
Allow disabling the webview file drop handler (required to use drag and drop on the frontend on Windows) using the
tauri.conf.json > tauri > windows > fileDropEnabled
flag or theWebviewAttributes#disable_file_drop_handler
method. -
Fixes the HTTP API binary response serialization.
-
The
http
APIs now resolve the returned promise when the API call finishes with an error status code. -
Run the
notification.show()
method on a dedicated async task to prevent a panic on Windows. -
Fixes HTTP API headers being overwritten when using the
reqwest
client. -
Remove closed window from the
window.__TAURI__.__windows
array, used by thewindow.getAll
API from@tauri-apps/api
. -
Panic on window getters usage on the main thread when the event loop is not running and document it.
-
Adds
focus
API to the WindowBuilder. -
Breaking change: The global shortcut API is now managed by
tao
so it cannot be accessed globally, the manager is now exposed on theApp
andAppHandle
structs. -
Hide
phf
crate export (not public API). -
(internal): allow
wry
dependency to be optional again while keeping default args. code that wishes to expose a struct with a default arg should use thecrate::manager::default_args!
macro to declare the struct, so that it can automatically feature-gateDefaultArgs
behind usingwry
. -
Adds
is_decorated
getter on Window. -
Adds
is_resizable
getter on Window. -
Adds
is_visible
getter on Window. -
Read
tauri.conf.json > tauri > bundle > icons
and use the first.png
icon as window icon on Linux. Defaults toicon/icon.png
if a PNG icon is not configured. -
Adds
accelerator
method to theCustomMenuItem
struct to define a keyboard shortcut for the menu item. -
Breaking change: The
menu
API was not designed to have all the new features: submenus, item updates, disabled state... so we broke it before going to stable. -
Adds a
PathResolver
struct to simplify the usage of thetauri::api::path::{app_dir, resource_dir}
APIs, accessible through theApp
andAppHandle
path_resolver
methods. -
Removes
image
dependency. For now only.ico
icons on Windows are supported, and we'll implement other types on demand to optimize bundle size. -
Remove window object from the
Manager
internalHashMap
on close. This fixes the behavior of using[App|AppHandle|Window]#get_window
after the window is closed (now correctly returnsNone
). -
Improve RPC security by requiring a numeric code to invoke commands. The codes are generated by the Rust side and injected into the app's code using a closure, so external scripts can't access the backend. This change doesn't protect
withGlobalTauri
(window.__TAURI__
) usage. -
Adds
run_iteration
API to theApp
and return the app instance on thebuild
method of theBuilder
. Therun_iteration
method runs the window event loop step by step, allowing Tauri to be run along other applications. -
The
run_on_main_thread
API now uses WRY's UserEvent, so it wakes the event loop. -
Adds
set_focus
API on Window. -
Adds
set_skip_taskbar
API on Window. -
Adds
skip_taskbar
API to the WindowBuilder. -
Breaking change: The
system_tray
andon_system_tray_event
APIs were not designed to have all the new features: submenus, item updates, click events, positioning... so we broke it before going to stable. -
Fix loading url containing URI fragment
-
Adds
Window#center
andWindowBuilder#center
APIs. -
Adds window native handle getter (HWND on Windows).
- Adds a mutable
config
getter on theContext
struct.
-
Breaking:
api::path::resolve_path()
andapi::path::app_dir()
now takes the config as first argument and thePackageInfo
as second argument. Breaking:api::path::app_dir()
now resolves to${configDir}/${config.tauri.bundle.identifier}
. -
Adds
manage
API to theBuilder
struct, which manages app state. -
Breaking: The
assets
field on thetauri::Context
struct is now aArc<impl Assets>
. -
Only commands with a
async fn
are executed on a separate task.#[command] fn command_name
runs on the main thread. -
Renamed the
command
API module toprocess
. -
Adds
options
argument to the shell command API (env
andcwd
configuration). -
Improves support for commands returning
Result
. -
Adds
status
andoutput
APIs to thetauri::api::process::Command
struct. -
The
create_window
API callback now takes two arguments: theWindowBuilder
and theWebviewAttributes
and must return a tuple containing both values. -
Reintroduce
csp
injection, configured ontauri.conf.json > tauri > security > csp
. -
Adds the default types used with
Builder::default()
to items that exposeParams
in their type. This allows you to skip specifying a generic parameter to types likeWindow<P>
if you use the default type. -
Change draggable region element detection from
drag-region
class todata-tauri-drag-region
attribute. -
Emit
tauri://resize
,tauri://move
,tauri://close-requested
,tauri://destroyed
,tauri://focus
,tauri://blur
andtauri://scale-change
events to the window. -
The event
emit
function payload type is nowimpl Serialize
instead ofOption<impl Serialize>
. -
Update
tauri-hotkey
to v0.1.2, fixing a compilation issue on 32-bit platforms. -
Implemented window menus APIs.
-
Added the `#[non_exhaustive] attribute where appropriate.
-
Notification.requestPermission()
now returns"denied"
when not allowlisted.IsNotificationPermissionGranted
returnsfalse
when not allowlisted. -
Refactored the
Plugin
traitinitialize
andextend_api
signatures.initialize
now takes theApp
as first argument, andextend_api
takes anInvoke
instead ofInvokeMessage
. This adds support to managed state on plugins. -
window.print()
now works on all platforms. -
Breaking:
Context
fields are now private, and is expected to be created throughContext::new(...)
. All fields previously available throughContext
are now public methods. -
Settings
is now serialized usingbincode
. -
The window management API was refactored: removed
setX
,setY
,setWidth
,setHeight
APIs, renamedresize
tosetSize
and the size and position APIs now allow defining both logical and physical values. -
Removed the
tcp
module fromtauri::api
. -
Removes the
with_window
attribute on thecommand
macro. Tauri now infers it using theCommandArg
trait. -
Move
restart_application
API fromapp
module toprocess
module. -
tauri-runtime
crate initial release. -
The
setup
Error type must beSend
. -
Simplify usage of app event and window label types. The following functions now accept references the
Tag
can be borrowed as. This means an&str
can now be accepted for functions likeWindow::emit
. This is a breaking change for the following items, which now need to take a reference. Additionally, type inference for&"event".into()
will no longer work, but&"event".to_string()
will. The solution for this is to now just pass"event"
becauseBorrow<str>
is implemented for the default event typeString
. -
Breaking:
Window::emit
now acceptsBorrow
for the event. -
Breaking:
Window::emit_others
now acceptsBorrow
for the event -
Breaking:
Window::trigger
now acceptsBorrow
for the event. -
Breaking:
Manager::emit_all
now acceptsBorrow
for the event. -
Breaking:
Manager::emit_to
now acceptsBorrow
for both the event and window label. -
Breaking:
Manager::trigger_global
now acceptsBorrow
for the event. -
Breaking:
Manager::get_window
now acceptsBorrow
for the window label. -
(internal):
trait tauri::runtime::tag::TagRef
helper for accepting tag references. Any time you want to accept a tag reference, that trait will handle requiring the reference to have all the necessary bounds, and generate errors when the exposed function doesn't set a bound likeP::Event: Borrow<E>
. -
181e132 refactor(core): simplify usage of app event and window label types (#1623) on 2021-04-27
-
a755d23 refactor(core): more bounds for better errors from #1623 (#1632) on 2021-04-27
-
tauri-runtime-wry
initial release. -
Adds system tray support.
-
Rename
Attributes
toWindowBuilder
. -
The
Window#create_window
API now has the same signature asApp#create_window
. -
Adds
on_window_event
API to theWindow
struct. -
Adds window getters.
-
Update
wry
to v0.9.
- Update
tauri-macros
andtauri-utils
to1.0.0-beta-rc.1
.
tauri::error::CreateWebview
now has the error string message attached.- If the dialog
defaultPath
is a file, use it as starting file path. - Validate dialog option
defaultPath
- it must exists. - Expose
async_runtime
module. - Expose
PageLoadPayload
struct. - Fixes the Message
command
name value on plugin invoke handler. - Allow
window.__TAURI__.invoke
to be moved to another variable. - Make sure custom protocol is treated as secure content on macOS.
- Fixes macOS shortcut modifiers keycodes.
- Adds APIs to determine global and webview-specific URI scheme handlers.
- The package info APIs now checks the
package
object ontauri.conf.json
. - Change plugin trait
initialization
return type tostd::result::Result<(), Box<dyn std::error::Error>>
. - Fixes
sidecar
Command API. - Set LocalStorage and IndexedDB files path on Linux to
$HOME/.local/${bundleIdentifier}
. - Use bundle identifier instead of
Tauri
for user data path on Windows.
-
Prevent "once" events from being able to be called multiple times.
-
Window::trigger(/*...*/)
is now properlypub
instead ofpub(crate)
. -
Manager::once_global(/*...*/)
now returns anEventHandler
. -
Window::once(/*...*/)
now returns anEventHandler
. -
(internal)
event::Listeners::trigger(/*...*/)
now handles removing "once" events. -
ece243d don't remove once listener on new thread (#1506) on 2021-04-14
-
Window and global events can now be nested inside event handlers. They will run as soon as the event handler closure is finished in the order they were called. Previously, calling events inside an event handler would produce a deadlock.
Note: The order that event handlers are called when triggered is still non-deterministic.
- Missing the
files
property in the package.json which mean that thedist
directory was not published and used.
- internal refactoring of
Params
to allow for easier usage without a private trait with only 1 implementor.ParamsPrivate
->ParamsBase
ManagerPrivate
->ManagerBase
(new)Args
, crate only. Now implementsParams
/ParamsBase
.App
andWindow
useWindowManager
directly - ec27ca8 refactor(tauri): remove private params trait methods (#1484) on 2021-04-14
- Updated
wry
, fixing an issue with the draggable region. - Now Tauri commands always returns Promise.
- Rename macOS bundle settings from
osx
tomacOS
. - The shell process spawning API was rewritten and now includes stream access.
- The Tauri files are now read on the app space instead of the
tauri
create. Also, theAppBuilder
build
function now returns a Result. - Tauri now uses explicit Error variants with
thiserror
instead of relying onanyhow
. - Align HTTP API types with the documentation.
- Replace
\
with\\
in css assets that are lazy loaded. Since these are injected in a template literal, backslashes must be escaped. Backslashes are sometimes used for octal sequences in CSS. - Replaces the embedded-server mode with Wry's custom protocol feature. This allows assets to be transferred to the webview directly, instead of through a localhost server.
- The
message
andask
dialogs now usetinyfiledialogs-rs
instead oftauri-dialog-rs
. - Refactor the event callback payload and return an unlisten function on the
listen
API. - Adds
unlisten
andonce
APIs on the Rust event system. - The
tauri::event
module has been moved to a Webview manager API. - The file dialog API now uses rfd. The filter option is now an array of
{ name: string, extensions: string[] }
. - Tauri now emits events on file drops on the webview window.
- Fixes
resource_dir
resolution on AppImage. - Fixed missing 'App' variant & string promise instead of void promise.
- The HTTP API was improved with client caching and better payload and response types.
- Added new Javascript API to extract
name
,version
,tauri version
from the running application. We exposedrelaunch
andexit
as well to control your application state. - The event listener
once
kind was moved to a dedicated function. - Use
JSON.parse(String.raw`{arg}`)
for communicating serialized JSON objects and arrays < 1 GB to the Webview from Rust.
https://github.com/GoogleChromeLabs/json-parse-benchmark
- eeb2030 Use JSON.parse instead of literal JS for callback formatting (#1370) on 2021-04-07
- a6def70 Refactor(tauri): move tauri-api and tauri-updater to tauri (#1455) on 2021-04-11
- Update all code files to have our license header.
- Added support to multiple windows.
- Adds
productName
andversion
configs ontauri.conf.json > package
. - Plugins are now configurable through a
tauri.conf.json > "plugins" > $pluginName
object. - Renamed the
Plugin
traitinit_script
toinitialization_script
. - The plugin instance is now mutable and must be
Send
. - Fixes the event system usage on the plugin
ready
hook. - The
allowlist
configuration now has one object per module. - The Tauri script is now injected with the webview
init
API, so it is available after page changes. - Removed the
no-server
mode, theinliner
, thedev
server proxy and theloadAsset
API. - Adds a global shortcut API.
- Added
async
support to the Tauri Rust core on commit #a169b67. - Alpha version of tauri-updater. Please refer to the
README
for more details. - The Tauri integration with Webview was refactored to use traits, which allows custom implementations by developers and simplifies changes on the webview implementation.
- Added window management and window creation APIs.
- Use WRY as Webview interface, thanks to @wusyong.
- Update webview-official dependency which fix compatibility on macOS.
- Match writeBinaryFile command name between js and rust
- Adds missing APIs features from
allowlist
to the tauri crate's manifest file. - Adds a path resolution API (e.g. getting the download directory or resolving a path to the home directory).
- Update minimum Rust version to 1.42.0 due to a dependency update.
- Minimum Rust version updated to 1.47.0. Run
$ rustup update
to update to the latest version.
- Bump all deps as noted in #975, #976, #977, #978, and #979.
- Adjust payload formatting to handle multibyte characters in front-end message payloads. - df70ca5 Fix #912 multibyte character breaks message (#914) on 2020-08-01
- Make sure CSS content loaded with the
loadAsset
API is inside a template string and not injected raw. - Pin the
tauri-api
dependency on thetauri
crate so updates doesn't crash the build. - Fixes the Webview initialization on Windows.
- Use native dialog on
window.alert
andwindow.confirm
. Since every communication with the webview is asynchronous, thewindow.confirm
returns a Promise resolving to a boolean value. - 0245833 feat(tauri) makewindow.alert
andwindow.confirm
available, fix #848 (#854) on 2020-07-18 - dac0ae9 chore(changes) add tauri-api to JS dialogs changefile on 2020-07-19 - The notification's
body
is now optional, closes #793. - Fixes a regression on the storage of requestPermission response. ß - dac1db3 fix(tauri) notification body optional, requestPermission() regression, closes #793 (#844) on 2020-07-16
- Plugin system added. You can hook into the webview lifecycle (
created
,ready
) and extend the API adding logic to theinvoke_handler
by implementing thetauri::plugin::Plugin
trait. - Renaming
whitelist
toallowlist
(see #645). - Moving the webview implementation to webview, with the official Rust binding.
This is a breaking change.
IE support has been dropped, so the
edge
object ontauri.conf.json > tauri
no longer exists and you need to remove it.webview.handle()
has been replaced withwebview.as_mut()
. - cd5b401 feature: import official webview rust binding (#846) on 2020-07-18
- Fixes Edge blank screen on Windows when running tauri dev (Tauri crashing window due to Edge reloading app because of missing Content-Type header).
- Ignoring non UTF-8 characters on the loopback command output.
- f340b29 fix(tauri) addition to the previous commit on 2020-07-10
- Properly run the loopback command on Windows.
- Properly ignore the
${distDir}/index.html asset from the asset embedding. Previously every asset with name matching /(.+)index.html$ /g were ignored.
Bumped due to dependency.
- Fixes the assets embedding into the binary.
- The execute_promise and execute_promise_sync helpers now accepts any tauri::Result where T: impl Serialize. This means that you do not need to serialize your response manually or deal with String quotes anymore. As part of this refactor, the event::emit function also supports impl Serialize instead of String.
- Fixes the Windows build with the latest Windows SDK.
- Adds a command line interface option to tauri apps, configurable under tauri.conf.json > tauri > cli.
- Fixes no-server mode not running on another machine due to fs::read_to_string usage instead of the include_str macro. Build no longer fails when compiling without environment variables, now the app will show an error.
- Adds desktop notifications API.
- Properly reflect tauri.conf.json changes on app when running tauri dev.