ignore
to =0.4.18
.
ignore
to =0.4.18 on 2023-01-17recursive
option was false
.
app.exit()
from JS.
tauri::Builder::enable_macos_default_menu
to enable or disable the default menu creation on macOS.
linux-protocol-headers
Cargo feature to enhance compatibility with older Linux distributions.
impl HasRawDisplayHandle
for AppHandle
and App
.
accept_first_mouse
option for macOS windows.
BaseDirectory
enum variants AppConfig
, AppData
, AppLocalData
, AppCache
and AppLog
along with equivalent functions in path
module and deprecated ambiguous variants Log
and App
along with their equivalent functions in path
module.
asset:
protocol
tabbing_identifier
option is not defined, the window is transparent or does not have decorations.
asset
protocol without the convertFileSrc
helper, the URL must now use the asset://localhost/$filePath
format.
WebviewWindow.getByLabel
function in a tauri://window-created
event listener.
__TAURI_PATTERN__
object freeze.
focused
method. The focus
function has been deprecated.
hidden_title
option for macOS windows.
App::show()
, AppHandle::show()
, App::hide()
and AppHandle::hide()
for hiding/showing the entire application on macOS.
on_menu_event
closure.
tabbing_identifier
to the window builder on macOS.
title_bar_style
option for macOS windows.
user_agent
option when creating a window.
recursive
option was false
.
set_cursor_grab
, set_cursor_visible
, set_cursor_icon
and set_cursor_position
APIs.
api::http::ClientBuilder::max_redirections
for the default attohttpc client.
From<api::process::Command> for std::process::Command
.
SystemTray::with_icon
to accept tauri::Icon
.
fs.readDir
recursive option reading symlinked directories that are not allowed by the scope.
raw_window_handle::HasRawDisplayHandle
for App
and AppHandle
api::process::restart
.
api::Command::encoding
method to set the stdout/stderr encoding.
api::http::ClientBuilder::max_redirections
is 0
.
SystemTrayHandle::destroy
method.
native-tls-vendored
and reqwest-native-tls-vendored
Cargo features to compile and statically link to a vendored copy of OpenSSL on Linux.
exists
function to the fs module.
recursive
option was false
.
fs.readDir
recursive option reading symlinked directories that are not allowed by the scope.
tauri::Builder
will now include a default menu for macOS without explicitly using Menu::os_default
, you can still override it through tauri::Builder::menu
or remove it using tauri::Builder::enable_macos_default_menu(false)
.
toString()
on message/confirm/ask dialogs title and message values.
async_runtime::spawn
method.
fn new
constructors for PhysicalSize
, LogicalSize
, PhysicalPosition
and LogicalPosition
and missing conversion methods.
window.unminimize
API without enabling it in the allowlist.
devPath
is an external URL with path.
$HOME/.cache
or the current working directory as temp directory if the system default is in a different mount point.
emit_to
and emit_all
from Window
.
raw_window_handle::HasRawWindowHandle
on Linux.
on_drop
hook to the plugin::Builder
.
tauri-runtime-wry
plugin interface.
AppHandle::remove_plugin
.
Notification::notify
API behind the windows7-compat
Cargo feature, which includes Windows 7 support.
dialog.open
.
stable
!
Menu::os_default
which will create a menu filled with default menu items and submenus.
TrayIcon
enum has been removed and now Icon
is used instead.
This allows you to use more image formats and use embedded icons on Linux.
Content-Type
header value when sending multipart requests using the reqwest-client
feature.
shell-sidecar
feature is enabled.
https://tauri.$URL
on Windows where $URL
is not localhost/**
e.g. https://tauri.app
.
async
. The documentation now states that commands must be async
in other to prevent it until the issue is fixed in Webview2.
settings
module.
gtk-tray
and ayatana-tray
Cargo features.
preventDefault()
in the mousedown event handler for [data-tauri-drag-region]
elements.
0o700
for the tmp folder used to move the current AppImage on the updater process.
PackageInfo::version
is now a semver::Version
instead of a String
.
UpdateBuilder::should_update
now takes the current version as a semver::Version
and a RemoteRelease
struct, allowing you to check other release fields.
tauri::UpdaterEvent::UpdateEvent
date field is now an Option<time::OffsetDateTime>
.
pub_date
now must be a valid RFC 3339 string.
cannot find macro `message_dialog`
error.
title
option in the message dialog API.
tauri::App
as manager.
std::fs::canonicalize
returns a path, fallback to \\?\$PATH
.
attohttpc
client.
windows-rs
to 0.37.0
, which requires Rust 1.61.0+.
WindowBuilder
struct now has a lifetime annotation WindowBuilder<R: Runtime, 'a>
.
App::get_cli_matches
helper function.
fileDropEnabled
option not working.
is local URL?
condition.
.mjs
not being recognised as a file extension for JavaScript files (text/javascript
).
PathResolver::resolve_resource
API.
App#wry_plugin
API to inject a plugin for the wry integration.
dangerous_allow_asset_csp_modification
configuration value has been changed to allow a list of CSP directives to disable.
default_path
value is just the file name.
title
option being ignored in the dialog API endpoints.
ClientBuilder.connect_timeout
and HttpRequestBuilder.timeout
fields.
ayatana-tray
from the default features. You must select one of ayatana-tray
and gtk-tray
to use system tray on Linux.
GlobalShortcutManager
when the global-shortcut
feature is enabled.
docs.rs
documentation build.
tauri::api::file::ArchiveFormat::Plain
.
{path}.html
when {path}
is not found in the Tauri custom protocol handler.
gtk-tray
Cargo feature to use libappindicator
instead.
clipboard
Cargo feature.
\r
.
set_cursor_grab
, set_cursor_visible
, set_cursor_icon
and set_cursor_position
.
tauri::api::file::Extract#extract_file
function has been moved to tauri::api::file::Entry#extract
.
tauri::api::file::Extract#files
function has been renamed to with_files
for performance reasons.
tauri::api::fs::Extract
API.
create_tao_window
API.
WindowBuilder
export.
multipart/form-data
requests. You need to set the Content-Type
header and enable the http-multipart
Cargo feature.
global-shortcut
Cargo feature.
tauri::api::http::HttpRequestBuilder#header
method.
tauri::api::http::HttpRequestBuilder#headers
method now takes header::HeaderMap
instead of a HashMap
.
tauri::api::http::Response#headers
method now returns &header::HeaderMap
instead of &HashMap
.
api::http
timeouts are now represented as std::time::Duration
instead of a u64
.
tauri::api::http::FormPart::Bytes
enum variant has been renamed to File
with a value object { file, mime, file_name }
.
App::create_window
, AppHandle::create_window
, Builder::create_window
and Window::create_window
.
tauri::api::http::FormPart::File
.
WindowEvent::ThemeChanged(theme)
.
theme
getter on Window
.
UpdateResponse::body
and UpdateResponse::date
.
tauri::updater::Error::UnsupportedPlatform
variant and added UnsupportedLinuxPackage
, UnsupportedOs
and UnsupportedArch
for better error information.
Downloaded
status event.
AppHandle::updater().header()
.
UpdateBuilder
has a timeout
setter.
theme
setter to the WindowBuilder.
WindowEvent
type used on Window::on_window_event
.
WindowEvent::Destroyed
not firing.
Added updater_target
method to the Builder
struct.
Added an option to disable the CSP injection of distributable assets nonces and hashes.
Toggle devtools when Ctrl + Shift + I
or Command + Option + I
is pressed.
Use asynchronous file dialog on macOS and Windows to properly set the parent window.
The Error
enum is now Send + 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.
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 https://github.com/tauri-apps/tauri/pull/3773 for more information about these specific choices.
Window::hwnd
method now returns HWND from windows-rs
crate instead of c_void on Windows.
RunEvent::CloseRequested
and RunEvent::WindowClosed
and added RunEvent::WindowEvent
.
window_label
from RunEvent::ExitRequested
.
tauri://
events are no longer emitted to listeners using Window::listen
. Use the App::run
closure, Window::on_window_event
and Window::on_menu_event
instead.
App::setup
closure can now return a boxed error directly.
Debug
for tauri::State
.
Manager::manage
function now returns a bool indicating whether the type is already managed or not.
Access-Control-Allow-Origin
header on the tauri
protocol response with the initial webview URL as value.
tauri_runtime
crate is no longer exported since its API is not stable.
Temp
to the BaseDirectory
enum.
$TEMP
to the allowed variables to the filesystem and asset protocol scopes.
wry
to 0.14
and tao
to 0.7
.
updater
method to App
and AppHandle
, a builder to check for app updates.
App::updater().should_install()
.
App::run
closure.
close_devtools
and is_devtools_open
APIs to the Window
struct.
WindowEvent::FileDrop
variant.
AppHandle
cleanup code before restarting the application on the process > relaunch
API.
Builder#create_window
API now returns a Result validating the window label.
tsp
config option under tauri > bundle > windows
, which enables Time-Stamp Protocol (RFC 3161) for the timestamping
server under code signing on Windows if set to true
.
clap
usage back to the version 3.0 API.
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
).
Command::output
and Command::status
deadlock when running on async commands.
SystemTrayHandle::set_menu
is called.
tauri::api::file::Extract
API is now available when the fs-extract-api
feature is enabled.
ico
and png
parsing behind icon-ico
and icon-png
Cargo features.
bytes=0-*
on the asset protocol.
command
Cargo feature to process-command-api
.
zip
crate.
cmd
field is no longer required on the shell scope for sidecars.
unlisten
command.
AppHandle
cleanup code before restarting the application when a new update is installed.
WindowBuilder
type.
WindowBuilder::on_web_resource_request
, which allows customizing the tauri custom protocol response.
tauri::plugin::Builder
closures are no longer required to implement Sync
.
tauri > bundle > macOS > minimumSystemVersion
to 10.13
.
setup
and setup_with_config
can now be FnOnce
and on_webview_ready
, on_event
and on_page_load
can be FnMut
.
{{target}}
and {{current_version}}
variables due to percent-encoding on the Url
that is parsed from the configuration.
freezePrototype
configuration to false
.
message
, ask
and confirm
APIs.
tauri::Event
to tauri::RunEvent
tauri::Event
and tauri::EventHandler
so you can define a function and pass it to Window::listen
tauri::api
modules http
, notification
, dialog
, and process::Command
APIs are now hidden behind a feature flag, http-api
, notification
, dialog
and command
, respectively.
title
option to file open/save dialogs.
any_thread()
to the tauri::Builder
to run applications on any thread (only exposed on Linux and Windows).
asset
protocol.
asset://
custom protocol is only defined when either the api-all
, protocol-all
or protocol-asset
feature flags are enabled. These feature flags are accessible with the tauri.conf.json
allowlist.
asset_resolver
API on the App
and AppHandle
structs.
async_runtime
module.
tauri::async_runtime::set
method, allowing to share your tokio runtime with Tauri.
tauri::async_runtime::spawn_blocking
API.
callback
and error
invoke fields, along with other transformCallback
usages, are now validated to be numeric.
Error::ParseCliArguments(clap::Error)
to Error::ParseCliArguments(String)
because clap::Error
is not Send
.
api::process::Command
APIs are now hidden behind the command
feature flag.
tauri::api::path::log_dir
function to access the suggested log directory path.
process
, path
and updater
APIs now takes a tauri::Env
argument, used to force environment variables load on startup to prevent env var update attacks.
resolve()
, join()
and normalize()
from the path
module, won't throw errors if the path doesn't exist, which matches NodeJS behavior.
Window
on App
and AppHandle
's create_window
function.
nonce
to script
and style
tags and set them on the CSP
(script-src
and style-src
fetch directives).
tauri::api::process::current_binary
is now cached when loading the binary.
Builder#invoke_system
).
CSP
on data:
URLs.
tauri://*
events to Rust listeners.
tauri://window-created
event for windows created on the backend.
tauri::api::ipc::{serialize_js_with, serialize_js}
functions.
asset
protocol HTTP request instead of panicking if the file does not exist or cannot be read.
async_runtime::block_on
panics when used along another tokio runtime.
tauri://close-requested
is listened on the JS layer. Users must call appWindow.close()
manually when listening to that event.
defaultPath
usage on Linux.
WindowEvent::Focus
and WindowEvent::Blur
events not firing.
tauri://focus
and tauri://blur
events not firing.
Manager::once_global
and Window::once
allow FnOnce
callbacks.
tray_handle
can be accessed on command handlers.
remove_system_tray
on Windows to drop the SystemTray
to run its cleanup code.
tauri://window-created
event to catch it before the application triggers it.
tauri::Window#emit
function now correctly sends the event to all windows that has a registered listener.
Breaking change: Window#emit_and_trigger
and Window#emit
now requires the payload to be cloneable.
tauri > bundle > windows > webviewFixedRuntimePath
config option.
pubkey
is now a required field for security reasons. Sign your updates with the tauri signer
command.
tauri::api::HttpRequestBuilder::new
now returns a Result
to validate the url.
isolation
pattern.
abort
method to tauri::async_runtime::JoinHandle
.
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:
tauri.conf.json
exists
a. Parse it with serde_json
b. Parse it with json5
if serde_json
fails
c. Return original serde_json
error if all above steps failedtauri.conf.json5
exists
a. Parse it with json5
b. Return error if all above steps failed<a target="_blank">
element via stopImmediatePropagation()
.
run_return
API is now available on Linux.
Menu::with_items
constructor, taking an iterator of MenuEntry
.
Notification.requestPermission()
deadlock.
Notification.requestPermission()
deadlock regression on 2021-08-24Window#open_devtools
API.
plugin::Builder
struct to make plugin creation more convenient.
on_event
on the Plugin
trait, which allows a plugin to react to the event loop.
macos-private-api
feature flag, enabled via tauri.conf.json > tauri > macOSPrivateApi
.
raw_headers
to tauri::api::http::ResponseData
.
raw_window_handle::RawWindowHandle
for tauri::Window
on Windows
and macOS
. The tauri::api::dialog::window_parent
function was removed since now you can use the window directly.
create_tao_window
API to return Weak<Window>
instead of Arc<Window>
.
tauri::api::dialog::blocking
module.
WindowEvent::CloseRequested
variant now includes label
and signal_tx
fields to allow preventing closing the window.
__currentWindow
and __windows
values from window.__TAURI__
to window.__TAURI_METADATA__
.
BaseDirectory::Current
enum variant for security reasons.
BaseDirectory::Current
variant on 2022-01-26tauri.conf.json > tauri > windows
is not set.
rpc
module to ipc
.
run_on_main_thread
APIs on Window
and AppHandle
.
1.56
.
filesystem
APIs from the webview access using tauri.conf.json > tauri > allowlist > fs > scope
.
Scopes the asset
protocol access using tauri.conf.json > tauri > allowlist > protocol > assetScope
.
Scopes the http
APIs from the webview access using tauri.conf.json > tauri > allowlist > http > scope
.
Scopes the shell
execute API from the webview access using tauri.conf.json > tauri > allowlist > shell > scope
. Additionally, check the tauri.conf.json > tauri > bundle > externalBin
to prevent access to unknown sidecars.
Builder#setup
closure type changed from Fn
to FnOnce
.
tauri::api::shell::open
's with
argument is now an enum value instead of any string.
shell
allowlist now includes a sidecar
flag, which enables the use of the shell
API to execute sidecars.
asset
protocol.
set_menu
API on tauri::SystemTrayHandle
.
unlisten
function to the Window
struct.
https
on release builds.
std::env::current_exe
return value if APPDIR
or APPIMAGE
environment variables are set.
-
, /
, :
and _
.
tauri.conf.json > package > version
to specify a path to a package.json
file and pull the version from it.
clipboard
field on the WebviewAttributes
struct, which must be set to true
to enable clipboard access on the webview.
winapi
crate references with the windows
crate, and replace webview2
and webview2-sys
with webview2-com
and webview2-com-sys
built with the windows
crate. This goes along with updates to the TAO and WRY next
branches.
Ok/Cancel
buttons instead of Yes/No
when executing window.confirm
.
windows
crate to 0.25.0, which comes with pre-built libraries. WRY and Tao can both reference the same types directly from the windows
crate instead of sharing bindings in webview2-com-sys
.
https://asset.localhost/path/to/file
on Windows. Lunix and macOS
is still asset://path/to/file
.
register_uri_scheme_protocol
from the WebviewAttributes
struct and renamed register_global_uri_scheme_protocol
to register_uri_scheme_protocol
on the Builder
struct, which now takes a Fn(&AppHandle, &http::Request) -> http::Response
closure.
Partial content
streaming and Header parsing.
AppHandle#exit
.
raw-window-handle
dependency declaration.
Breaking change: The tauri::async_runtime::spawn
function now returns tauri::async_runtime::JoinHandle<T>
.
Breaking change: Added window_parent: Option<&Window>
as first argument to the ask
and message
APIs on the tauri::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
trait initialize
method now takes an AppHandle
reference instead of App
.
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 the tauri::App
struct (macOS only).
Add handle
API to tauri::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 respect resizable: false
and won't maximize.
Fix Notification.requestPermission()
throwing Unhandled 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 from tauri-utils
to individual module utils
. 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 the plugin
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 an AppHandle.exit()
function to exit the app manually.
Change App.create_window()
and AppHandle.create_window()
to accept an Into<String>
type instead of String
.
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 and file-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 in
WindowManager
, to handle edge cases and leading/trailing slashes in paths and urls.
Fixes fs-all
feature not requiring the base64
crate.
Update gtk and its related libraries to v0.14. This also remove requirements of clang
as build dependency.
Use HeaderValue::from_bytes
instead of HeaderValue::from_str
and HeaderValue#to_bytes
instead of HeaderValue#to_str
to improve compatibility.
Implement Debug
on public API structs and enums.
Adds Resumed
and MainEventsCleared
variants to the Event
enum.
Panic when a dispatcher getter method (Window
, GlobalShortcutHandle
, ClipboardManager
and MenuHandle
APIs) is called on the main thread.
Use percent_encoding::percent_decode
on the asset
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 with send_tao_window_event()
on the AppHandler.
Make ClipboardManager
and GlobalShortcutManager
public as they are exposed in the AppHandle
.
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 the run()
callback. Triggered once when the event loop is ready.
The updater expect a field named with_elevated_task
with a boolean
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 the Manager
trait.
App#run
method with callback argument (event loop event handler).
data-tauri-drag-region
not firing its events.
EXC_BAD_ACCESS
panic when app is code-signed.
gtk_window
getter.
script
tags with type="module"
.
MenuHandle
and MenuEvent
types on tauri::window
.
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 parameter Params
now use Runtime
instead. If
you use the wry
feature, then types with a Runtime
generic parameter should default to Wry
, letting you omit the
explicit type and let the compiler infer it instead.tauri
:
Params
noteParams
inside a function parameter or definition, all references to it have been replaced with a
simple runtime that defaults to Wry
. If you are not using a custom runtime, just remove Params
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.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 an Into<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
:
default_runtime
proc macro to allow us to give item definitions a custom runtime only when
the specified feature is enabled.tauri-runtime
:
Params
noteParams
, MenuId
, Tag
, TagRef
.menu::{MenuHash, MenuId, MenuIdRef}
as type aliases for the internal type that menu types now use.
MenuId
generic now use the underlying MenuId
type without a generic.Runtime
, RuntimeHandle
, and Dispatch
have no more generic parameter on create_window(...)
and instead use the
Runtime
type directlyRuntime::system_tray
has no more MenuId
generic and uses the string based SystemTray
type directly.CustomMenuItem::id_value()
is now hashed on creation and exposed as the id
field with type MenuHash
.tauri-runtime-wry
:
Params
notetauri-runtime
.tauri-utils
:
Assets::get
signature has changed to take a &AssetKey
instead of impl Into<AssetKey>
to become trait object
safe.Params
and replace with strings (#2191) on 2021-07-15data-tauri-drag-region
element will toggle the window maximized state.
asset
protocol crashing application.
api::process::Command
events not firing consistently.
Window
is now Send + Sync
on Windows.
Remove anonymous lifetimes on examples.
Moves shell
, dialog::FileDialogBuilder
and process::Command
APIs behind their allowlist feature flags.
Adds create_window
API to the AppHandle
struct.
Adds a handle
function to the App
struct, which returns a Send
handle to the app instance.
Use attohttpc
on the HTTP API by default for bundle size optimization. reqwest
is implemented behind the reqwest-client
feature flag.
Kill child processes spawned with tauri::api::process::Command
on tauri::App
drop. Can be skipped with tauri::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
and package_info
getters to the App
and AppHandle
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 the Window
struct.
Adds show
, hide
, is_visible
and toggle
APIs to the MenuHandle
.
Allow dev_path
and dist_dir
to be an array of root files and directories to embed.
Validate tauri.conf.json > build > devPath
and tauri.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 the WebviewAttributes#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 the window.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 the App
and AppHandle
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 the crate::manager::default_args!
macro to declare
the struct, so that it can automatically feature-gate DefaultArgs
behind using wry
.
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 to icon/icon.png
if a PNG icon is not configured.
Adds accelerator
method to the CustomMenuItem
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 the tauri::api::path::{app_dir, resource_dir}
APIs, accessible through the App
and AppHandle
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
internal HashMap
on close. This fixes the behavior of using [App|AppHandle|Window]#get_window
after the window is closed (now correctly returns None
).
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 the App
and return the app instance on the build
method of the Builder
. The run_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
and on_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
and WindowBuilder#center
APIs.
Adds window native handle getter (HWND on Windows).
config
getter on the Context
struct.
Breaking: api::path::resolve_path()
and api::path::app_dir()
now takes the config as first argument and the PackageInfo
as second argument.
Breaking: api::path::app_dir()
now resolves to ${configDir}/${config.tauri.bundle.identifier}
.
Adds manage
API to the Builder
struct, which manages app state.
Breaking: The assets
field on the tauri::Context
struct is now a Arc<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 to process
.
Adds options
argument to the shell command API (env
and cwd
configuration).
Improves support for commands returning Result
.
Adds status
and output
APIs to the tauri::api::process::Command
struct.
The create_window
API callback now takes two arguments: the WindowBuilder
and the WebviewAttributes
and must return a tuple containing both values.
Reintroduce csp
injection, configured on tauri.conf.json > tauri > security > csp
.
Adds the default types used with Builder::default()
to items that expose Params
in their type. This allows you to
skip specifying a generic parameter to types like Window<P>
if you use the default type.
Change draggable region element detection from drag-region
class to data-tauri-drag-region
attribute.
Emit tauri://resize
, tauri://move
, tauri://close-requested
, tauri://destroyed
, tauri://focus
, tauri://blur
and tauri://scale-change
events to the window.
The event emit
function payload type is now impl Serialize
instead of Option<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
returns false
when not allowlisted.
Refactored the Plugin
trait initialize
and extend_api
signatures.
initialize
now takes the App
as first argument, and extend_api
takes an Invoke
instead of InvokeMessage
.
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 through Context::new(...)
.
All fields previously available through Context
are now public methods.
Settings
is now serialized using bincode
.
The window management API was refactored: removed setX
, setY
, setWidth
, setHeight
APIs, renamed resize
to setSize
and the size and position APIs now allow defining both logical and physical values.
Removed the tcp
module from tauri::api
.
Removes the with_window
attribute on the command
macro. Tauri now infers it using the CommandArg
trait.
Move restart_application
API from app
module to process
module.
tauri-runtime
crate initial release.
The setup
Error type must be Send
.
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 like Window::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"
because Borrow<str>
is implemented
for the default event type String
.
Breaking: Window::emit
now accepts Borrow
for the event.
Breaking: Window::emit_others
now accepts Borrow
for the event
Breaking: Window::trigger
now accepts Borrow
for the event.
Breaking: Manager::emit_all
now accepts Borrow
for the event.
Breaking: Manager::emit_to
now accepts Borrow
for both the event and window label.
Breaking: Manager::trigger_global
now accepts Borrow
for the event.
Breaking: Manager::get_window
now accepts Borrow
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 like P::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
to WindowBuilder
.
The Window#create_window
API now has the same signature as App#create_window
.
Adds on_window_event
API to the Window
struct.
Adds window getters.
Update wry
to v0.9.
tauri-macros
and tauri-utils
to 1.0.0-beta-rc.1
.tauri::error::CreateWebview
now has the error string message attached.
defaultPath
is a file, use it as starting file path.
defaultPath
- it must exists.
async_runtime
module.
PageLoadPayload
struct.
command
name value on plugin invoke handler.
window.__TAURI__.invoke
to be moved to another variable.
package
object on tauri.conf.json
.
initialization
return type to std::result::Result<(), Box<dyn std::error::Error>>
.
sidecar
Command API.
$HOME/.local/${bundleIdentifier}
.
Tauri
for user data path on Windows.
Prevent "once" events from being able to be called multiple times.
Window::trigger(/*...*/)
is now properly pub
instead of pub(crate)
.
Manager::once_global(/*...*/)
now returns an EventHandler
.
Window::once(/*...*/)
now returns an EventHandler
.
(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.
files
property in the package.json which mean that the dist
directory was not published and used.
Params
to allow for easier usage without a private trait with only 1 implementor.
ParamsPrivate
-> ParamsBase
ManagerPrivate
-> ManagerBase
(new) Args
, crate only. Now implements Params
/ParamsBase
.
App
and Window
use WindowManager
directlywry
, fixing an issue with the draggable region.
osx
to macOS
.
tauri
create.
Also, the AppBuilder
build
function now returns a Result.
thiserror
instead of relying on anyhow
.
\
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.
message
and ask
dialogs now use tinyfiledialogs-rs
instead of tauri-dialog-rs
.
listen
API.
unlisten
and once
APIs on the Rust event system.
tauri::event
module has been moved to a Webview manager API.
{ name: string, extensions: string[] }
.
resource_dir
resolution on AppImage.
name
, version
, tauri version
from the running application. We exposed relaunch
and exit
as well to control your application state.
once
kind was moved to a dedicated function.
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
productName
and version
configs on tauri.conf.json > package
.
tauri.conf.json > "plugins" > $pluginName
object.
Plugin
trait init_script
to initialization_script
.
Send
.
ready
hook.
allowlist
configuration now has one object per module.
init
API, so it is available after page changes.
no-server
mode, the inliner
, the dev
server proxy and the loadAsset
API.
async
support to the Tauri Rust core on commit #a169b67.
README
for more details.
allowlist
to the tauri crate's manifest file.
$ rustup update
to update to the latest version.
loadAsset
API is inside a template string and not injected raw.
tauri-api
dependency on the tauri
crate so updates doesn't crash the build.
window.alert
and window.confirm
.
Since every communication with the webview is asynchronous, the window.confirm
returns a Promise resolving to a boolean value.
- 0245833 feat(tauri) make window.alert
and window.confirm
available, fix #848 (#854) on 2020-07-18
- dac0ae9 chore(changes) add tauri-api to JS dialogs changefile on 2020-07-19body
is now optional, closes #793.
created
, ready
) and extend the API adding logic to the invoke_handler
by implementing the tauri::plugin::Plugin
trait.
whitelist
to allowlist
(see #645).
edge
object on tauri.conf.json > tauri
no longer exists and you need to remove it.
webview.handle()
has been replaced with webview.as_mut()
.
- cd5b401 feature: import official webview rust binding (#846) on 2020-07-18Bumped due to dependency.