bcf279278
(#11354) On Windows, Add ContextMenu::hpopupmenu
method to get the HMENU
used for popups and tray icon menu.e3b09be7f
(#11362) Added Builder::channel_interceptor
to intercept messages to be sent to the frontend, complemeting the Builder::invoke_system
interface.3cb73d08c
(#11355) Mark the event commands as async so they do not block the main thread.f3f521f03
(#11348) Fix TAURI_ANDROID_PACKAGE_UNESCAPED not set
panic during compilation for Android when using an older tauri cli.tauri-runtime-wry@2.1.1
1d3f51e10
(#11228 by @amrbashir) Add tauri::Builder::on_menu_event
.d609bef9f
(#11314 by @amrbashir) Fix android invalid proguard file when using an identifier
that contains a component that is a reserved kotlin keyword, like in
, class
, etc04fd3a7db
(#11264 by @chrox) Respond with empty body for HEAD
requests to asset
protocol4731f0cf3
(#11290 by @lucasfernog) Export the ipc::Invoke
struct.2d087ee4b
(#11268 by @amrbashir) On Linux, fix commands, that use Webview
or WebviewWindow
as an argument, receiving an incorrect webview when using multi webviews.2d087ee4b
(#11268 by @amrbashir) On Linux, fix events only emitted to first webview only when using multi webviews.2d087ee4b
(#11268 by @amrbashir) On Linux, fix custom protocols receiving an incorrect webview label when using multi webviewstauri-runtime@2.1.0
tauri-runtime-wry@2.1.0
03e759042
(#11235 by @lucasfernog) Added App::invoke_key
and AppHandle::invoke_key
for custom invoke systems that rely on manual Webview::on_message
calls.0ab2b3306
(#11205 by @lucasfernog) Downgrade MSRV to 1.77.2 to support Windows 7.tauri-utils@2.0.1
tauri-runtime@2.0.1
tauri-runtime-wry@2.0.1
tauri-macros@2.0.1
tauri-build@2.0.1
tauri-utils@2.0.0
tauri-runtime@2.0.0
tauri-runtime-wry@2.0.0
tauri-macros@2.0.0
tauri-build@2.0.0
354be36d4
(#11163 by @amrbashir) Changed uri scheme protocol handler to take UriSchemeContext
as first argument instead of AppHandle
. UriSchemeContext
can be used to access an app handle or the webview label that made the request. The following methods are affected:
tauri::Builder::register_uri_scheme_protocol
tauri::Builder::register_asynchronous_uri_scheme_protocol
tauri::plugin::Builder::register_uri_scheme_protocol
tauri::plugin::Builder::register_asynchronous_uri_scheme_protocol
a247170e1
(#11056 by @SpikeHD) Expose the ability to enabled browser extensions in WebView2 on Windows.9014a3f17
(#11066 by @amrbashir) Add WebviewWindow::clear_all_browsing_data
and Webview::clear_all_browsing_data
to clear the webview browsing data.0ddfc59d6
(#11071 by @amrbashir) Add Manager::unmanage
to remove previously managed state.1d8b67b29
(#11162 by @amrbashir) Support async functions for mobile_entry_point
macro5621174b0
(#11132 by @chippers) Add ScopeObjectMatch
for easy scope validation those that can be represented by a boolean return value.95df53a2e
(#11143 by @Legend-Master) Add the ability to set theme dynamically using Window::set_theme
, App::set_theme
d9d2502b4
(#11140 by @amrbashir) Add Webview::hide
and Webview::show
methods.de7414aab
(#11154 by @amrbashir) Add Window::set_enabled
and Window::is_enabled
methods948772a65
(#11114 by @lucasfernog) Change the button_state
tray event field to camelCase buttonState
.a49fc999f
(#11161 by @amrbashir) Fix internal crash when trying to close the same window multiple times.62b3a5cd1
(#11043 by @amrbashir) Fix localStorage
not shared between webviews that use the same data directory.tauri-runtime-wry@2.0.0-rc.14
tauri-runtime@2.0.0-rc.13
tauri-utils@2.0.0-rc.13
tauri-macros@2.0.0-rc.12
tauri-build@2.0.0-rc.13
0b4495996
(#11121 by @amrbashir) Simplified emitted tray event JS value and updated TrayIconEvent
type definition to match it.ad294d274
(#11032 by @amrbashir) Add app > windows > create
option to choose whether to create this window at app startup or not.e7fd676c2
(#11025 by @lucasfernog) Inject __INVOKE_KEY__
into custom invoke systems so their implementations can properly construct tauri::webview::InvokeRequest
.tauri-utils@2.0.0-rc.12
tauri-runtime@2.0.0-rc.12
tauri-runtime-wry@2.0.0-rc.13
tauri-macros@2.0.0-rc.11
tauri-build@2.0.0-rc.12
551e0624a
(#11027 by @lucasfernog) Remove the responder
part of a custom invoke system now that the responder can be set directly in the tauri::WebviewWindow::on_message
function.e5f037277
(#11018 by @amrbashir) Fix compilation error on macOS due to a missing feature for NSImage
.bc4804d48
(#10924 by @madsmtm) Use objc2
internally and in examples, leading to better memory safety.tauri-runtime-wry@2.0.0-rc.12
bc4804d48
(#10924 by @madsmtm) Change the pointer type of PlatformWebview
's inner
, controller
, ns_window
and view_controller
to c_void
, to avoid publically depending on objc
.35bd9dd3d
(#10977 by @amrbashir) Add mainBinaryName
config option to set the file name for the main binary.5eb036f33
(#11002 by @lucasfernog) Handle macOS binary name change on the process::restart
function.63649d82d
(#10971 by @amrbashir) Fix schema generation for core:default
set.be18ed50d
(#10982 by @lucasfernog) Add a Proguard rule to prevent custom JSON deserializer and serializer classes from being optimized away.00182ebf8
(#10988 by @lucasfernog) Fix requestPermissions
not resolving on Android.tauri-build@2.0.0-rc.11
tauri-utils@2.0.0-rc.11
tauri-runtime@2.0.0-rc.11
tauri-runtime-wry@2.0.0-rc.11
tauri-macros@2.0.0-rc.10
fe5ff1228
(#10978 by @lucasfernog) Rename PermissionState::Unknown
to PermissionState::Prompt
.fafceec30
(#10943 by @lucasfernog) Fixes mobile dev server proxy request URL with trailing slashes.tauri-utils@2.0.0-rc.10
tauri-runtime@2.0.0-rc.10
tauri-runtime-wry@2.0.0-rc.10
tauri-macros@2.0.0-rc.9
tauri-build@2.0.0-rc.10
tauri-utils@2.0.0-rc.9
tauri-runtime@2.0.0-rc.9
tauri-runtime-wry@2.0.0-rc.9
tauri-macros@2.0.0-rc.8
tauri-build@2.0.0-rc.9
d9c8d3cc8
(#10902 by @Legend-Master) Update infer to 0.16, tray icon to 0.17, urlpattern to 0.3, image to 0.25faa259bac
(#10907 by @lucasfernog) The Assets::iter
function now must return a iterator with Item = (Cow<'_, str>, Cow<'_, [u8]>)
to be more flexible on contexts where the assets are not 'static
.0899e5083
(#10884 by @amrbashir) Derive serde Serialize
for SafePathBuf
431ca2c77
(#10870 by @Legend-Master) Add FromStr
impl for SafePathBuf
79de4332b
(#10841 by @lucasfernog) Fixes IPC postMessage raw body processing when using the isolation pattern.6696e4880
(#10842 by @lucasfernog) Fixes a warning when using a null value on the invoke.resolve()
iOS plugin API.27d018343
(#10844 by @lucasfernog) Changes how the Info.plist is embedded on macOS development to avoid a clippy warning.tauri-runtime-wry@2.0.0-rc.8
tauri-utils@2.0.0-rc.8
tauri-runtime@2.0.0-rc.8
tauri-macros@2.0.0-rc.7
tauri-build@2.0.0-rc.8
5048a7293
(#10840 by @lucasfernog) The linux-ipc-protocol
feature is now always enabled, so the Cargo feature flag was removed.
This increases the minimum webkit2gtk version to a release that does not affect the minimum target Linux distros for Tauri apps.d7e5c00e9
(#10817 by @lucasfernog) Added plugin:::PermissionState
enum.1e441811e
(#10786 by @amrbashir) On Windows, Add and emit DoubleClick
variant for TrayIconEvent
.f86a8146a
(#10761 by @rdlabo) Added getArgs
and getRawArgs
methods to the plugin Invoke
class (Kotlin and Swift),
which lets you parse the arguments manually instead of through the parseArgs
method.03f2a5098
(#10718 by @rdlabo) Update swift-rs fixing a plugin build when native dependencies are used.22d2afa89
(#10800 by @lucasfernog) Change the Android Proguard rules to keep custom JSON deserializers.fbe76a955
(#10797 by @lucasfernog) Uint8Arrays and ArrayBuffers are now properly serialized as an array of numbers.tauri-utils@2.0.0-rc.7
tauri-build@2.0.0-rc.7
tauri-runtime@2.0.0-rc.7
tauri-runtime-wry@2.0.0-rc.7
tauri-macros@2.0.0-rc.6
f4d5241b3
(#10731 by @amrbashir) Update documentation icon path.tauri-utils@2.0.0-rc.6
tauri-build@2.0.0-rc.6
tauri-runtime-wry@2.0.0-rc.6
tauri-runtime@2.0.0-rc.6
tauri-macros@2.0.0-rc.5
tauri-utils@2.0.0-rc.5
tauri-runtime@2.0.0-rc.5
tauri-runtime-wry@2.0.0-rc.5
tauri-macros@2.0.0-rc.5
tauri-build@2.0.0-rc.5
30c7685eb
(#10295 by @liesauer) Added Builder::append_invoke_initialization_script
.ed04cc3d3
(#10664 by @lucasfernog) Include more information in the IPC permission error message.5c335ae9a
(#10648 by @Flakebi) Prevent build script from rerunning unnecessarily by only writing files when the content changes.tauri-build@2.0.0-rc.4
tauri-utils@2.0.0-rc.4
tauri-runtime@2.0.0-rc.4
tauri-runtime-wry@2.0.0-rc.4
tauri-macros@2.0.0-rc.4
b1d9ffa1a
(#10582 by @lucasfernog) Fix IPC fallback (postMessage implementation when custom protocol fails) hanging when sending responses.bfc49cc7a
(#10558 by @ahqsoftwares) Remove targetSdk from gradle filesfedf93eb7
(#10585 by @lucasfernog) Change how IPC handles errors to simplify what's logged in the console.tauri-build@2.0.0-rc.3
tauri-utils@2.0.0-rc.3
tauri-runtime@2.0.0-rc.3
tauri-runtime-wry@2.0.0-rc.3
tauri-macros@2.0.0-rc.3
d39c392b7
(#10655 by @lucasfernog) Update tao
to 0.29 and wry
to 0.42.d0510f52e
(#10641 by @lucasfernog) Added a dedicated type for IPC response body InvokeResponseBody
for performance reasons.
This is only a breaking change if you are directly using types from tauri::ipc
.tauri-utils@2.0.0-rc.2
tauri-runtime@2.0.0-rc.2
tauri-runtime-wry@2.0.0-rc.2
tauri-macros@2.0.0-rc.2
tauri-build@2.0.0-rc.2
tauri-utils@2.0.0-rc.1
tauri-runtime@2.0.0-rc.1
tauri-runtime-wry@2.0.0-rc.1
tauri-macros@2.0.0-rc.1
tauri-build@2.0.0-rc.1
6755af230
(#10435) Fix Specta remote implementation target for Channel
.24445d71d
(#10432) Fixes asset resolving when not using the compression
feature.1e0793b68
(#10357) Enhance AssetResolver::get
in development mode by reading distDir directly as a fallback to the embedded assets.7aeac39e7
(#10397) Make the set of gtk application id optional, to allow more then one instance of the app running at the same time.cf994a6bb
(#10405) Add tauri::plugin::Builder::try_build
to allow plugins to check if their TauriPlugin
initialization is valid.426d14bb4
(#10423) Explicitly check that the main frame's origin is the sender of Isolation Payloads289ae5555
(#10386) Re-enable TLS checks that were previously disabled to support an insecure HTTPS custom protocol on Android which is no longer used.tauri-utils@2.0.0-rc.0
tauri-macros@2.0.0-rc.0
tauri-build@2.0.0-rc.0
tauri-runtime@2.0.0-rc.0
tauri-runtime-wry@2.0.0-rc.0
758d28c8a
(#10390) Core plugin permissions are now prefixed with core:
, the core:default
permission set can now be used and the core
plugin name is reserved.
The tauri migrate
tool will automate the migration process, which involves prefixing all app
, event
, image
, menu
, path
, resources
, tray
, webview
and window
permissions with core:
.da25f7353
(#10242 by @amrbashir) Add APIs to enable setting window size constraints separately:
WindowBuilder::inner_size_constraints
and WebviewWindowBuilder::inner_size_constraints
which can be used for setting granular constraints.WindowSizeConstraints
structWindow::set_size_constraints
and WebviewWindow::set_size_constraints
e1776946a
(#10362 by @Brendonovich) Use specta rc.15's
derive` feature which fixes build issues in docs.rs.da25f7353
(#10242 by @amrbashir) Apply minWidth
, minHieght
, maxWidth
and maxHeight
constraints separately, which fixes a long standing bug where these constraints were never applied unless width and height were constrained together.9546548ec
(#10297 by @pewsheen) On macOS, set default titlebar style to Visible
to prevent webview move out of the view.tauri-runtime-wry@2.0.0-beta.21
tauri-runtime@2.0.0-beta.21
a7354f9a8
(#10171 by @amrbashir) Mark AppHandle::restart
and process::restart
as diverging functions.4c239729c
(#10167 by @amrbashir) Fix deserialization of raw invoke requests when using isolation
pattern.55733aba9
(#10176 by @lucasfernog) Move PluginApi::register_ios_plugin
behind the wry
Cargo feature as Webview::with_webview
is only available when that feature is enabled.tauri-macros@2.0.0-beta.19
tauri-build@2.0.0-beta.19
tauri-runtime-wry@2.0.0-beta.20
tauri-utils@2.0.0-beta.19
tauri-runtime@2.0.0-beta.20
ba9590aa9
(#9640 by @amrbashir) Added Emitter
and Listener
traits that defines what an emitter or a listener can do, this however comes with a few breaking changes:
Manager::listen_any
, use Listener::listen_any
instead.Manager::once_any
, use Listener::once_any
instead.Manager::unlisten
, use Listener::unlisten
instead.Manager::emit
, use Emitter::emit
instead.Manager::emit_to
, use Emitter::emit_to
instead.Manager::emit_filter
, use Emitter::emit_filter
instead.App/AppHandle::listen
, WebviewWindow::listen
, Window::listen
and Webview::listen
, use Listener::listen
instead.App/AppHandle::once
, WebviewWindow::once
, Window::once
and Webview::once
, use Listener::once
instead.App/AppHandle::unlisten
, WebviewWindow::unlisten
, Window::unlisten
and Webview::unlisten
, use Listener::unlisten
instead.261c9f942
(#10170 by @amrbashir) Renamed DragDropEvent
enum variants to better convey when they are triggered:
DragDropEvent::Dragged
-> DragDropEvent::Enter
DragDropEvent::DragOver
-> DragDropEvent::Over
DragDropEvent::Dropped
-> DragDropEvent::Drop
DragDropEvent::Cancelled
-> DragDropEvent::Leave
This also comes with a change in the events being emitted to JS and Rust event listeners:
tauri://drag
-> tauri://drag-enter
tauri://drop-over
-> tauri://drag-over
tauri://drop
-> tauri://drag-drop
tauri://drag-cancelled
-> tauri://drag-leave
2b1ceb40d
(#10229 by @amrbashir) Renamed the JS getCurrent
and getAll
functions to a clearer name to avoid ambiguity:
getCurrent
in window
module has been renamed to getCurrentWindow
getCurrent
in webview
module has been renamed to getCurrentWebview
getCurrent
in webviewWindow
module has been renamed to getCurrentWebviewWindow
getAll
in window
module has been renamed to getAllWindows
getAll
in webview
module has been renamed to getAllWebviews
getAll
in webviewWindow
module has been renamed to getAllWebviewWindows
57612ab24
(#10139 by @Brendonovich) Add TSend
generic to ipc::Channel
for typesafe send
calls and type inspection in tauri-specta
148f04887
(#9979) Add defaultWindowIcon
to the JS app
module to retrieve the default window icon in JS.5b769948a
(#9959) Add include_image
macro to help embedding instances of Image
struct at compile-time in rust to be used with window, menu or tray icons.ddaabda36
(#9922) Add WebviewWindowBuilder::on_download
.e93ca1df3
(#10138) Fix InvokeBody::deserialize
method deserialization for InvokeBody::Raw
variante6e17ad1c
(#9954) Add std
feature to raw-window-handle
crate so that using default-features = false
on tauri
crate can workf29b78811
(#9862) On Windows, handle resizing undecorated windows natively which improves performance and fixes a couple of annoyances with previous JS implementation:
data-tauri-drag-region
element exists there.669b9c6b5
(#9621) Set the gtk application to the identifier defined in tauri.conf.json
to ensure the app uniqueness.tauri-utils@2.0.0-beta.18
tauri-build@2.0.0-beta.18
tauri-macros@2.0.0-beta.18
tauri-runtime-wry@2.0.0-beta.19
tauri-runtime@2.0.0-beta.19
f955f7b49
(#9929) Switch from dirs_next
to dirs
as dirs_next
is now unmaintained while dirs
isd4c908cfb
(#10048) Update windows
crate to version 0.57
and webview2-com
crate to version 0.31
3afe82894
(#10134) Changed WebviewWindow::navigate
and Webview::navigate
method signature to return a Result
dfd05441c
(#9860) Revert adding app-region: drag
to HTML elements with data-tauri-drag-region
on Windows as it has a few issues:
data-tauri-drag-region
works only if the click was on an element that has it, this allows buttons in the custom titlebar to work, however app-region: drag
will treat the whole area as a titlebar won't even allow clicks on buttons.8a1ae2dea
(#9843) Added an option to use a Xcode project for the iOS plugin instead of a plain SwiftPM project.276c4b143
(#9832) On Windows, fix wrong menubar theme when window is using an explicit theme.ccc3ea729
(#9646) Parse the correct platform tauri.<platform>.conf.json
config file when building or developing for mobile.aa55e0335
(#9899) Set default window origin to null
. Prevent window crash when loading about:blank
.9ac930380
(#9850) Emit cargo:rustc-check-cfg
instruction so Cargo validates custom cfg attributes on Rust 1.80 (or nightly-2024-05-05).80aa50498
(#9870) Updated Android target SDK to 34.tauri-build@2.0.0-beta.17
tauri-macros@2.0.0-beta.17
tauri-utils@2.0.0-beta.17
tauri-runtime@2.0.0-beta.18
tauri-runtime-wry@2.0.0-beta.18
e8f6eb59a
(#9552) Include binary path in Env.args_os
, previously it was skipped.1df5cdeb0
(#9858) Use tauri.conf.json > identifier
to set the PackageName
in Android and BundleId
in iOS.aaecb6a72
(#9890) Renamed dev
function to is_dev
and marked it as const fn
c4410daa8
(#9777) This release contains breaking changes to the tray event structure because of newly added events:
TrayIconEvent
to be an enum instead of a struct.MouseButtonState
and MouseButton
enums.ClickType
enum and replaced it with MouseButton
enum.MouseButtonState
enum.ae6b13dfc
(#9789) Add app-region: drag
to HTML elements with data-tauri-drag-region
on Windows, only WebView2 123+, which should fix dragging using touch.ec0e092ec
(#9770) Add App/AppHandle/Window/Webview/WebviewWindow::monitor_from_point(x, y)
getter to get the monitor from a given point.d950ac123
Only process IPC commands from the main frame.tauri-utils@2.0.0-beta.16
tauri-runtime-wry@2.0.0-beta.17
tauri-runtime@2.0.0-beta.17
tauri-macros@2.0.0-beta.16
tauri-build@2.0.0-beta.16
fedca7386
(#9720) Fix IPC tracing format incompatible between the custom protocol and the postMessage implementations.tauri-runtime@2.0.0-beta.16
tauri-runtime-wry@2.0.0-beta.16
tauri-utils@2.0.0-beta.15
tauri-macros@2.0.0-beta.15
tauri-build@2.0.0-beta.15
7f6d2698c
(#9631) Improve the error message that is shown when deserializing the Tauri plugin config.8a71858eb
(#9630) Provide a default for the runtime generic on Menu
, MenuItem
, Submenu
, PredefinedMenuItem
, CheckMenuItem
and IconMenuItem
.8a71858eb
(#9630) Provide a default for the runtime generic on TrayIcon
.tauri-utils@2.0.0-beta.14
tauri-runtime@2.0.0-beta.15
tauri-runtime-wry@2.0.0-beta.15
tauri-macros@2.0.0-beta.14
tauri-build@2.0.0-beta.14
12b4159bd
(#9392) Add specta
feature flag which adds specta
support for AppHandle
, State
, Window
, Webview
and WebviewWindow
types.477bb8cd4
(#9297) Add App/AppHandle/Window/Webview/WebviewWindow::cursor_position
getter to get the current cursor position.eff778b8f
(#9571) Run each plugin initialization script on its own context so they do not interfere with each other or the Tauri init script.6c047aee1
(#9612) Fix window white flashing on exit on Windows98101cb17
(#9561) Allow any headers on the IPC custom protocol.tauri-runtime@2.0.0-beta.14
tauri-runtime-wry@2.0.0-beta.14
daf018e4f
(#9505) Fix resource tables not cleaned up on exit which causes tray icon inside resource tables not cleaned up on exita07b51320
(#9490) Add missing permission for window.start_resize_dragging
35b25f7e5
(#9530) Do not use JS optional chaining to prevent script errors on older webviews such as macOS 10.14.005fe8ce1
(#9410) Fix closable
, maximizable
and minimizable
options not taking effect when used in tauri.conf.json or from JS APIs.tauri-runtime-wry@2.0.0-beta.13
tauri-build@2.0.0-beta.13
tauri-utils@2.0.0-beta.13
tauri-runtime@2.0.0-beta.13
tauri-macros@2.0.0-beta.13
58a7a552d
(#9378) Added the set_zoom
function to the webview API.58a7a552d
(#9378) Add zoom_hotkeys_enabled
to enable browser native zoom controls on creating webviews.4973d73a2
(#9386) Provide a basic zoom hotkey polyfill for non-Windows platformsf1674fce6
(#9420) Tauri's built-in commands for the JS api will now return simplified paths on Windows, removing the \\?\
prefix.c8a82ad22
(#9379) Fix deadlock when using the menu/tray/image JS APIs.6251645ac
(#9360) Fixes an issue causing getAll()
to list webviews that were already destroyed.tauri-utils@2.0.0-beta.12
tauri-runtime-wry@2.0.0-beta.12
tauri-runtime@2.0.0-beta.12
tauri-macros@2.0.0-beta.12
tauri-build@2.0.0-beta.12
c8a82ad22
(#9379) Changed JsImage::into_img
to take a reference to a ResourceTable
instead of a Manager
.06833f4fa
(#9100) Added Rect
struct.06833f4fa
(#9100) Add Webview::bounds
and Webview::set_bounds
APIs.06833f4fa
(#9100) Enhance the IPC URL check by using the Origin header on the custom protocol IPC and the new request URI field on the postMessage IPC instead of using Webview::url()
which only returns the URL of the main frame and is not suitable for iframes (iframe URL fetch is still not supported on Android and on Linux when using the postMessage IPC).c33f6e6cf
(#9211) Fixed an issue preventing webview/window creation events to not be emitted. This also fixed the getByLabel
and getAll
JavaScript functions.tauri-utils@2.0.0-beta.11
tauri-runtime-wry@2.0.0-beta.11
tauri-runtime@2.0.0-beta.11
tauri-macros@2.0.0-beta.11
tauri-build@2.0.0-beta.11
06833f4fa
(#9100) Rename FileDrop
to DragDrop
on structs, enums and enum variants. Also renamed file_drop
to drag_drop
on fields and function names.284eca9ef
(#9272) Manager::resources_table
is now scoped so each App/AppHandle/Window/Webview/WebviewWindow
has its own resource collection.06833f4fa
(#9100) Refactored the tray icon event struct:
TrayIconEvent.icon_rect
type to use the new tauri::Rect
type.TrayIconEvent.x
and TrayIconEvent.y
fields and combined them into TrayIconEvent.position
field.tauri::tray::Rectangle
struct.75f5cb401
(#9214) tauri::Window
and tauri::WebviewWindow
now implement raw_window_handle::HasDisplayHandle
.81b853bc8
(#9213) Fixed an issue where errors where returned as strings instead of objects from commands.43230cb6b
(#9219) Fixes the menu plugin remove
command signature.e227fe02f
(#9156) Allow plugins to define (at compile time) JavaScript that are initialized when withGlobalTauri
is true.379cc2b35
(#9165) Fix basename(path, 'ext')
JS API when removing all occurances of ext
where it should only remove the last one.tauri-build@2.0.0-beta.10
tauri-utils@2.0.0-beta.10
tauri-runtime@2.0.0-beta.10
tauri-runtime-wry@2.0.0-beta.10
tauri-macros@2.0.0-beta.10
acdd76833
(#9155) Removed App/AppHandle::tray
and App/AppHandle::remove_tray
, use App/AppHandle::tray_by_id
and App/AppHandle::remove_tray_by_id
instead. If these APIs were used to access tray icon configured in tauri.conf.json
, you can use App/AppHandle::tray_by_id
with ID main
or the configured value.ea0242db4
(#9179) Removed width
and height
methods on the JS Image
class, use size
instead.490a6b424
(#9147) The Assets
trait now include a setup
method that lets you run initialization code for your custom asset provider.85de230f3
(#9144) Fix old JS listeners being dropped on page load after it was possible to create new listeners.e673854c8
(#9133) Fixes capability remote domain not allowing subpaths, query parameters and hash when those values are empty.tauri-macros@2.0.0-beta.9
tauri-utils@2.0.0-beta.9
tauri-build@2.0.0-beta.9
tauri-runtime@2.0.0-beta.9
tauri-runtime-wry@2.0.0-beta.9
490a6b424
(#9147) The Context
struct and the Assets
trait now takes a R: Runtime
generic.ba0206d8a
(#9141) Context::assets
now returns &dyn Assets
instead of &A
generic.ba0206d8a
(#9141) The Context
type no longer uses the <A: Assets>
generic so the assets implementation can be swapped with Context::assets_mut
.490a6b424
(#9147) Removed Context::assets_mut
and added Context::set_assets
.db0a24a97
(#9132) Use the image crate for tauri::image::Image
and remove the from_png_bytes
and from_ico_bytes
APIs.3e472d0af
(#9115) Added CapabilityBuilder::platform
to link the runtime capability with a specific platform.3e472d0af
(#9115) Changed the permission and capability platforms to be optional.9dc9ca6e3
(#9113) Added tauri::dev()
to determine whether we are running in development mode or not.5541aafef
(#9107) Fix emit
and emit_to
(when used with EventTarget::Any
) always skipping the webview listeners.80c12ead4
(#9121) Fix regression on IPC response when using a channel to return objects.tauri-utils@2.0.0-beta.8
tauri-runtime@2.0.0-beta.8
tauri-runtime-wry@2.0.0-beta.8
tauri-macros@2.0.0-beta.8
tauri-build@2.0.0-beta.8
4ef17d083
(#9116) The ACL configuration for remote URLs now uses the URLPattern standard instead of glob patterns.ed48e2b3c
(#9122) Expose tauri::image
module to export the JsImage
type and removed the Image
root re-export.46de49aaa
(#9059) Added set_auto_resize
method for the webview.d1e77acd8
(#9011) Add a new Image
type in Rust and JS.a77be9747
(#9038) Fallback to the postMessage IPC interface if we cannot reach the IPC custom protocol.e62ca4ee9
(#9070) Added a mechanism to preserve channel message order.03098b531
(#9036) Manager::add_capability
now allows adding a dynamically defined capability instead of only relying on static strings.b5c743276
(#9086) Use a strict content security policy on the isolation pattern iframe.46de49aaa
(#9059) When using the unstable
feature flag, WebviewWindow
will internally use the child webview interface for flexibility.86fa339de
(#9071) Fix compile time error in context generation when using app.windows.windowEffects.color
947a50b8e
(#9049) Fix tauri migrate
for http plugin ACL.fe18012d3
(#9072) Resolve symlinks on the filesystem scope check.6c0683224
(#9068) Fixes scope resolution grouping scopes for all windows.tauri-build@2.0.0-beta.7
tauri-utils@2.0.0-beta.7
tauri-runtime@2.0.0-beta.7
tauri-runtime-wry@2.0.0-beta.7
tauri-macros@2.0.0-beta.7
d1e77acd8
(#9011) Renamed icon-ico
and icon-png
feature flags to image-ico
and image-png
respectively720357fd5
(#9104) Removed tauri::path::Result
and tauri::path::Error
which were merely an unintentional re-export of tauri::Result
and tauri::Error
so use those instead.6c0683224
(#9068) The allows
and denies
methods from ipc::ScopeValue
, ipc::CommandScope
and ipc::GlobalScope
now returns &Vec<Arc<T>>
instead of &Vec<T>
.d1e77acd8
(#9011) Removed Context::default_window_icon_mut
and Context::tray_icon_mut
, use Context::set_default_window_icon
and Context::set_tray_icon
instead. Also changed Context::set_tray_icon
to accept Option<T>
.d1e77acd8
(#9011) Removed Icon
enum, use the new Image
type instead. All APIs that previously accepted Icon
have changed to accept Image
instead.d7f56fef
(#9014) Allow defining a permission that only applies to a set of target platforms via the platforms
configuration option.e1d5b790
(#8995) Fixes capability webview label check.222a96b7
(#8999) Fixes Window::add_child
deadlock.e4463f08
(#8930) Clear JS event listeneres on page load, which fixes zombie listeners when the page reloads.222a96b7
(#8999) Fixes Webview::reparent
not updating the webview parent window reference.tauri-build@2.0.0-beta.6
tauri-utils@2.0.0-beta.6
tauri-runtime-wry@2.0.0-beta.6
tauri-runtime@2.0.0-beta.6
tauri-macros@2.0.0-beta.6
3657ad82
(#9008) Allow defining permissions for the application commands via tauri_build::Attributes::app_manifest
.b9e6a018
(#8937) The custom-protocol
Cargo feature is no longer required on your application and is now ignored. To check if running on production, use #[cfg(not(dev))]
instead of #[cfg(feature = "custom-protocol")]
.bc5b5e67
(#8984) Do not include a CSP tag in the application HTML and rely on the custom protocol response header instead.6cb601d4
(#8983) Convert the command name to camelCase when executing a mobile plugin command.60bf11ab
(#8986) Export ProgressBarStatus
, regression introduced in 2.0.0-beta.4
tauri-utils@2.0.0-beta.5
tauri-runtime@2.0.0-beta.5
tauri-runtime-wry@2.0.0-beta.5
tauri-macros@2.0.0-beta.5
tauri-build@2.0.0-beta.5
tauri-utils@2.0.0-beta.4
tauri-runtime-wry@2.0.0-beta.4
tauri-build@2.0.0-beta.4
tauri-runtime@2.0.0-beta.4
tauri-macros@2.0.0-beta.4
3fb414b6
(#8914) Return an id when using from Manager::once_any
, App::once
, Window::once
, Webview::once
, WebviewWindow::once
and fs::Scope::once
.tauri-utils@2.0.0-beta.3
tauri-runtime@2.0.0-beta.3
tauri-runtime-wry@2.0.0-beta.3
tauri-macros@2.0.0-beta.3
tauri-build@2.0.0-beta.3
361ec37f
(#8932) Moved ProgressBarState
from tauri-utils
to the tauri::window
module and removed the unity_uri
field.16e550ec
(#8844) Add webview-specific events for multi-webview windows:
WebviewEvent
enumRunEvent::WebviewEvent
variant.Builder::on_webview_event
and Webview::on_webview_event
methods.11a5816b
(#8864) A file-drop now allows sub-directories recursively when the path is a directory.0cb0a15c
(#8789) Add webviews
array on the capability for usage on multiwebview contexts.258494bd
(#8806) Added Manager::add_capability
to add a capability file at runtime.5618f6d2
(#8856) Relax requirements on plugin's identifiers to be alphanumeric and -
instead of only lower alpha and -
.16e550ec
(#8844) Fix JS event listeners registered using JS listen
api with EventTarget::Any
never fired.8751c329
(#8793) Fix invoking toggle devtools by hotkey.bd73ab0a
(#8766) When using the multiwebview mode, properly remove the webview from memory on Webview::close
.46b6598a
(#8826) Fix JS onCloseRequested
catching close event from other windows.2e6db908
(#8777) Fix regression in tauri::Error
not being Sync
.76ce9f61
(#3002) Enhance centering a newly created window, it will no longer jump to center after being visible.tauri-utils@2.0.0-beta.2
tauri-build@2.0.0-beta.2
tauri-macros@2.0.0-beta.2
tauri-runtime-wry@2.0.0-beta.2
tauri-runtime@2.0.0-beta.2
258494bd
(#8806) Removed the lifetime parameter from ipc::GlobalScope
and ipc::CommandScope
.f284f9c5
(#8898) Changed the capability remote
configuration to take a list of urls
instead of domains
for more flexibility.2f55bfec
(#8795) Update raw-window-handle to 0.6.2e6db908
(#8777) Require ScopeObject::Error
to be Sync
as well.tauri-build@2.0.0-beta.1
tauri-utils@2.0.0-beta.1
tauri-runtime@2.0.0-beta.1
tauri-runtime-wry@2.0.0-beta.1
tauri-macros@2.0.0-beta.1
74a2a603
(#8661) Implement access control list for IPC usage.a2fc3a63
(#8657) Add visibleOnAllWorkspaces
option when creating the window in JS and Window.setVisibleOnAllWorkspaces
method.af610232
(#8710) Added Window::destroy
to force close a window.c77b4032
(#8280) Add multiwebview support behind the unstable
feature flag. See WindowBuilder
and WebviewBuilder
for more information.9eaeb5a8
(#8622) Add WindowBuilder::parent
which is a convenient wrapper around parent functionality for Windows, Linux and macOS. Also added WindowBuilder::owner
on Windows only. Also added WindowBuilder::transient_for
and WindowBuilder::transient_for_raw
on Linux only.e8d3793c
(#8732) Add common-controls-v6
cargo feature flag (enabled by default).58fe2e81
(#8670) Allow IPC calls when window origin is a defined custom protocol.95da1a27
(#8713) Fix calling set_activation_policy
when the event loop is running.e1eb911f
(#8582) Ensure initalize logic and dropping of menu item is done on the main thread, this fixes the crash when a menu item is dropped on another thread.a093682d
(#8621) Fix can not prevent closing a window from another webview.7f033f6d
(#8537) Fix undecorated window resizing on Windows and Linux.9f8037c2
(#8633) On Windows, fix decorated window not transparent initially until resized.7f033f6d
(#8537) Add Window::start_resize_dragging
and ResizeDirection
enum.6639a579
(#8441) Added the WindowConfig::proxy_url
WebviewBuilder::proxy_url() / WebviewWindowBuilder::proxy_url()
options when creating a webview.tauri-build@22.0.0-beta.0
tauri-utils@2.0.0-beta.0
tauri-macros@2.0.0-beta.0
tauri-runtime@2.0.0-beta.0
tauri-runtime-wry@2.0.0-beta.0
8de308d1
(#8723) Restructured Tauri config per RFC#5:
package.productName
, package.version
and tauri.bundle.identifier
fields to the top-level.package
object.tauri
object to app
.tauri.bundle
object to the top-level.build.distDir
field to frontendDist
.build.devPath
field to devUrl
and will no longer accepts paths, it will only accept URLs.tauri.pattern
to app.security.pattern
.tauri.bundle.updater
object, and its fields have been moved to the updater plugin under plugins.updater
object.build.withGlobalTauri
to app.withGlobalTauri
.tauri.bundle.dmg
object to bundle.macOS.dmg
.tauri.bundle.deb
object to bundle.linux.deb
.tauri.bundle.appimage
object to bundle.linux.appimage
.bundle.license
and bundle.licenseFile
.AppUrl
to FrontendDist
and refactored its variants to be more explicit.c77b4032
(#8280) The invoke_system
, on_page_load
hooks now gives you a Webview
argument instead of a Window
.
e1eb911f
(#8582) All menu item constructors accelerator
argument have been changed to Option<impl AsRef<str>>
so when providing None
you need to specify the generic argument like None::<&str>
.
e1eb911f
(#8582) All menu item constructors have been changed to return a Result<Self>
aa758a85
(#8716) Moved the command
module items to the ipc
module so its import name does not clash with the command
macro.
00e15675
(#8708) AppHandle::exit
and AppHandle::restart
now go triggers RunEvent::ExitRequested
and RunEvent::Exit
and cannot be executed on the event loop handler.
ec9818ac
(#8696) Added a callback to the App::run_iteration
and removed its return value.
a093682d
(#8621) Refactored the event system to better accommodate the new window types:
EventTarget
enum.App/AppHandle::listen
, App/AppHandle::once
and App/AppHandle::unlisten
to listen to events targeting App/AppHandle
App/AppHandle/Window/Webview/WebviewWindow::emit
will now emit to all event listeners.App/AppHandle/Window/Webview/WebviewWindow::emit_to
will emit to event targets that match the given label, see EventTarget
enum.App/AppHandle/Window/Webview/WebviewWindow::emit_filter
will emit to event targets based on a filter callback which now takes &EventTarget
instead of &Window
.Manager::listen_global
and Manager::once_global
to listen_any
and once_any
respectively to be consistent with EventTarget::Any
, it will now also listen to any event to any target (aka event sniffer).9eaeb5a8
(#8622) Renamed WindowBuilder::owner_window
to WindowBuilder::owner_raw
and WindowBuilder::parent_window
to WindowBuilder::parent_raw
.
9eaeb5a8
(#8622) Changed WindowBuilder::from_config
to return a Result<Self>
.
c77b4032
(#8280) Renamed Window
to WebviewWindow
, WindowBuilder
to WebviewWindowBuilder
, Manager::windows
to Manager::webview_windows
and Manager::get_window
to Manager::get_webview_window
.
af610232
(#8710) Window::close
now triggers a close requested event instead of forcing the window to be closed.
c77b4032
(#8280) Renamed the window-data-url
feature flag to webview-data-url
.
d621d343
(#8607) Added tracing for window startup, plugins, Window::eval
, events, IPC, updater and custom protocol request handlers behind the tracing
feature flag.cb640c8e
(#8393) Fix RunEvent::WindowEvent(event: WindowEvent::FileDrop(FileDropEvent))
never triggered and always prevent default OS behavior when disable_file_drop_handler
is not used.tauri-runtime-wry@1.0.0-alpha.9
tauri-utils@2.0.0-alpha.13
tauri-runtime@1.0.0-alpha.8
tauri-macros@2.0.0-alpha.13
tauri-build@2.0.0-alpha.14
2032228c
(#8430) Removed GlobalWindowEvent
struct, and unpacked its field to be passed directly to tauri::Builder::on_window_event
.tauri-utils@2.0.0-alpha.12
tauri-runtime@1.0.0-alpha.7
tauri-runtime-wry@1.0.0-alpha.8
tauri-macros@2.0.0-alpha.12
tauri-build@2.0.0-alpha.13
b59f2f54
(#8432) Expose scope::fs::Scope::new
.bf095df5
(#8276) Exposed Manager::resources_table
to access the resources table used by tauri, which could be used by plugins or app authors to store their resources and retrieve it later using an id and can be used to create Rust-backed resources in JS.5848b4e8
(#8386) Fixed the deserialisation of a Channel
in iOS.11a1529d
(#8419) Include CORS header on custom protocol response errors to ensure frontend can read the error message.db127777
(#8380) Added test::get_ipc_response
.effe5871
(#8420) Fixes file scope checks on Android.f98ce5aa
(#8328) Fix incorrect menu item for PredefinedMenuItem::close_window
tauri-macros@2.0.0-alpha.11
tauri-build@2.0.0-alpha.12
tauri-utils@2.0.0-alpha.11
tauri-runtime@1.0.0-alpha.5
tauri-runtime-wry@1.0.0-alpha.6
b89de9fa
(#8092) Add support for onResume and onPause events in android plugins.c6c59cf2
Pull changes from Tauri 1.5 release.198abe3c
(#8076) Mobile plugins can now resolve using an arbitrary object instead of using the JSObject
class via Invoke.resolve
on iOS and Invoke.resolveObject
on Android.tauri-build@2.0.0-alpha.11
tauri-macros@2.0.0-alpha.10
tauri-utils@2.0.0-alpha.10
tauri-runtime@1.0.0-alpha.4
tauri-runtime-wry@1.0.0-alpha.5
9580df1d
(#8084) Upgrade gtk
to 0.18.c7c2507d
(#8035) Update windows
to version 0.51
and webview2-com
to version 0.27
9580df1d
(#8084) Updated to wry@0.34, removing the dox
feature flag.198abe3c
(#8076) The Android PluginManager.loadConfig
now takes a third parameter to define the class type of the config object.198abe3c
(#8076) Mobile plugins now have access to a parser for the invoke arguments instead of relying on the Invoke#get${TYPE}
methods.74d2464d
(#8116) Added WindowBuilder::on_page_load
and refactored the Builder::on_page_load
handler to take references.
The page load hook is now triggered for load started and finished events, to determine what triggered it see PageLoadPayload::event
.93c8a77b
(#7996) The event system APIS on Rust is recieving a few changes for consistency and quality of life improvements:
Manager::emit_all
to just Manager::emit
and will now both trigger the events on JS side as well as Rust.Manager::trigger_global
, use Manager::emit
Manager::emit_filter
.Window::emit
, and moved the implementation to Manager::emit
.Window::emit_and_trigger
and Window::trigger
, use Window::emit
instead.Window::emit_to
to only trigger the target window listeners so it won't be catched by Manager::listen_global
c085adda
(#8009) Added set_progress_bar
to Window
.c1ec0f15
(#7933) Added Window::set_always_on_bottom
and the always_on_bottom
option when creating a window.880266a7
(#8031) Bump the MSRV to 1.70.ed32257d
(#7794) On Windows, add Effect::Tabbed
,Effect::TabbedDark
and Effect::TabbedLight
effects.fb10b879
(#8039) Added the app
plugin back into core.c9a9246c
(#8007) Added the window
plugin back into core.tauri-runtime@1.0.0-alpha.3
tauri-runtime-wry@1.0.0-alpha.4
tauri-utils@2.0.0-alpha.9
tauri-build@2.0.0-alpha.10
tauri-macros@2.0.0-alpha.9
a63e71f9
(#7942) The initialization script for Builder::invoke_system
now must initialize the window.__TAURI_INTERNALS__.postMessage
function instead of window.__TAURI_POST_MESSAGE__
.12b8d18b
(#7875) - Removed tauri::path::Error
and added its variants to tauri::Error
tauri::path::Result
and tauri::plugin::Result
aliases, you should use tauri::Result
or your own Result
type.8b166e9b
(#7949) Changed TAURI_AUTOMATION
to TAURI_WEBVIEW_AUTOMATION
2558fab8
(#7939) This release contains a number of breaking changes to improve the consistency of tauri internals and the public facing APIs
and simplifying the types where applicable:
EventHandler
type.EventId
typeManager::listen_global
and Window::listen
to return the new EventId
type instead of EventHandler
.Manager::once_global
and Window::once
Manager::unlisten
and Window::unlisten
to take he new EventId
type.tauri::scope::ScopeEventId
FsScope::listen
to return the new ScopeEventId
instead of Uuid
.FsScope::unlisten
b597aa5f
(#7871) Set main
as the default id
for the tray icon registered from the configuration file, so if the id
is not specified, it can be retrieved using app.tray_by_id("main")
.a2021c30
(#7866) Changed IconMenuItem::set_native_icon
signature to take &self
instead of &mut self
to fix compilation error on macos.a68ccaf5
(#7822) Fix asset
protocol failing to fetch files.6fbd6dba
(#17) Fix the validation of std::env::current_exe
warn the user if AppImage is not mounted instead of panickingtauri-macros@2.0.0-alpha.8
tauri-utils@2.0.0-alpha.8
tauri-build@2.0.0-alpha.9
tauri-runtime@1.0.0-alpha.2
tauri-runtime-wry@1.0.0-alpha.3
092a561c
(#7874) Removed tauri::api
module as most apis have been moved to either a plugin or we recommend using other crates.deea9436
(#7876) Changed Env.args
to Env.args_os
and now uses OsString
instead of String
b7fd88e1
(#7944) tauri::scope
module is recieving a couple of consistency changes:
tauri::scope::fs
module.scope::IpcScope
re-export, use scope::ipc::Scope
.FsScope
, GlobPattern
and FsScopeEvent
, use scope::fs::Scope
, scope::fs::Pattern
and scope::fs::Event
respectively.c0d03af4
(#7943) Changed TrayIconBuilder/TrayIcon::on_tray_event
to TrayIconBuilder/TrayIcon::on_tray_icon_event
for consistency of naming.
tauri-runtime-wry@1.0.0-alpha.2
8a676617
(#7618) Ensure Builder is Send by requiring the menu closure to be Send.0d63732b
(#7754) Added Builder::register_asynchronous_uri_scheme_protocol
to allow resolving a custom URI scheme protocol request asynchronously to prevent blocking the main thread.0d63732b
(#7754) Fixes invalid header value type when requesting IPC body through a channel.e98393e4
(#7673) No longer unpacking and flattening the payload
over the IPC so that commands with arguments called cmd
, callback
, error
, options
or payload
aren't breaking the IPC.29818de6
(#7662) Fixes IPC failing to communicate for remote URLs on macOS and iOS.tauri-runtime@1.0.0-alpha.1
tauri-runtime-wry@1.0.0-alpha.1
0d63732b
(#7754) Changed Builder::register_uri_scheme_protocol
to return a http::Response
instead of Result<http::Response>
. To return an error response, manually create a response with status code >= 400.0d63732b
(#7754) tauri-runtime
no longer implements its own HTTP types and relies on the http
crate instead.0d63732b
(#7754) Changed Builder::invoke_system
to take references instead of owned values.5c95152c
(#7621) Changed MenuBuilder\SubmenuBuilder::text
, MenuBuilder\SubmenuBuilder::check
, MenuBuilder\SubmenuBuilder::icon
and MenuBuilder\SubmenuBuilder::native_icon
to take an id
as the first argument.0d63732b
(#7754) Changed Window::on_message
signature to take a responder closure instead of returning the response object in order to asynchronously process the request.4db363a0
(#6589) Added visible_on_all_workspaces
configuration option to WindowBuilder
, Window
, and WindowConfig
.84c41597
(#6394) Add App::primary_monitor
, App::available_monitors
, AppHandle::primary_monitor
, and AppHandle::available_monitors
2a000e15
(#7235) Added Window::navigate
.3b98141a
(#3736) Added support to file associations.3a2c3e74
(#7306) Added PluginBuilder::on_navigation
.
Added Plugin::on_navigation
.753900dd
(#7440) Expose RunEvent::Opened
on macOS and iOS for deep link support.7fb419c3
(#7535) Add App::cleanup_before_exit
and AppHandle::cleanup_before_exit
to manually call the cleanup logic. You should always exit the tauri app immediately after this function returns and not use any tauri-related APIs.7fb419c3
(#7535) On Linux, add Window::default_vbox
to get a reference to the gtk::Box
that contains the menu bar and the webview.7fb419c3
(#7535) Add linux-libxdo
feature flag (disabled by default) to enable linking to libxdo
which is used to make Cut
, Copy
, Paste
and SelectAll
native menu items work on Linux.7fb419c3
(#7535) On macOS, add Window::ns_view
to get a pointer to the NSWindow content view.7fb419c3
(#7535) Expose run_on_main_thread
method on App
that is similar to AppHandle::run_on_main_thread
.a5752db9
(#7436) Listen to onNewIntent
and forward it to registered plugins.fbeb5b91
(#7170) Added Channel::new
allowing communication from a mobile plugin with Rust.fbeb5b91
(#7170) Use custom protocols on the IPC implementation to enhance performance.tauri-runtime@1.0.0-alpha.0
tauri-utils@2.0.0-alpha.7
tauri-macros@2.0.0-alpha.7
tauri-runtime-wry@1.0.0-alpha.0
tauri-build@2.0.0-alpha.7
d1a6e2f3
(#7252) Update state
to v0.6.fd5dc788
(#7352) - Removed tauri::api::file
and tauri::api::dir
modules, use std::fs
instead.
tauri::api::version
module, use semver
crate instead.fbeb5b91
(#7170) Moved tauri::api::ipc
to tauri::ipc
and refactored all types.fbeb5b91
(#7170) Removed the linux-protocol-headers
feature (now always enabled) and added linux-ipc-protocol
.7fb419c3
(#7535) Changed App::handle
and Manager::app_handle
to return a reference to an AppHandle
instead of an owned value.7fb419c3
(#7535) The tray icon and menu have received a huge refactor with a lot of breaking changes in order to add new functionalities and improve the DX around using them and here is an overview of the changes:
tauri::menu
and tauri::tray
modules with new names so make sure to check the new types.tauri::Builder::system_tray
, instead you should use tauri::tray::TrayIconBuilder
inside tauri::Builder::setup
hook to create your tray icons.tauri::Builder::menu
to be a function to accommodate for new menu changes, you can passe tauri::menu::Menu::default
to it to create a default menu.tauri::Context
methods system_tray_icon
, tauri::Context::system_tray_icon_mut
and tauri::Context::set_system_tray_icon
to tauri::Context::tray_icon
, tauri::Context::tray_icon_mut
and tauri::Context::set_tray_icon
to be consistent with new type names.RunEvent::MenuEvent
and RunEvent::TrayIconEvent
.App/AppHandle::set_menu
, App/AppHandle::remove_menu
, App/AppHandle::show_menu
, App/AppHandle::hide_menu
and App/AppHandle::menu
to access, remove, hide or show the app-wide menu that is used as the global menu on macOS and on all windows that don't have a specific menu set for it on Windows and Linux.Window::set_menu
, Window::remove_menu
, Window::show_menu
, Window::hide_menu
, Window::is_menu_visible
and Window::menu
to access, remove, hide or show the menu on this window.Window::popup_menu
and Window::popup_menu_at
to show a context menu on the window at the cursor position or at a specific position. You can also popup a context menu using popup
and popup_at
methods from ContextMenu
trait which is implemented for Menu
and Submenu
types.App/AppHandle::tray
, App/AppHandle::tray_by_id
, App/AppHandle::remove_tray
and App/AppHandle::remove_tray_by_id
to access or remove a registered tray.WindowBuilder/App/AppHandle::on_menu_event
to register a new menu event handler.App/AppHandle::on_tray_icon_event
to register a new tray event handler.7fb419c3
(#7535) Renamed system-tray
feature flag to tray-icon
.
3a2c3e74
(#7306) The Window#on_navigation
closure now receives a &Url
argument instead of Url
.
f2d68cf7
(#6767) Add incognito
option to the window configuration object.f2d68cf7
(#6767) Add WindowBuilder::incognito
e0f0dce2
(#6442) Added the window_effects
option when creating a window and Window::set_effects
to change it at runtime.2d2fd6ab
(#7191) Use correct HTTP method when making requests to the proxied server on mobile.b66e7d60
(#7174) Implement Clone
for Channel
8124145d
(#7171) Fixes path commands not being added.4652c446
(#7144) Add temp_dir
method to PathResolver
256c30c7
(#6863) Enhance parsing of annotated Android plugin methods to support private functions.73c803a5
(#6837) Added static function loadConfig
on the Android PluginManager
class.edb16d13
(#6831) Adjust Android plugin exception error.0ab5f40d
(#6813) Add channel API for sending data across the IPC.31444ac1
(#6725) On Android, update proguard rules.8ce32e74
(#6986) Add default_window_icon
getter on App
and AppHandle
.2a5175a8
(#6779) Enhance Android's JSObject
return types.bb2a8ccf
(#6830) Use actual iOS plugin instance to run command with throws
.94224906
(#6783) Generate TauriActivity
Kotlin class on the build script.7a4b1fb9
(#6839) Added support to attibutes for each command path in the generate_handler
macro.9a79dc08
(#6947) Remove enable_tauri_api
from the IPC scope.dfa407ff
(#6763) Expose plugin configuration on the Android and iOS plugin classes.3245d14b
(#6895) Moved the app
feature to its own plugin in the plugins-workspace repository.09376af5
(#6704) Moved the cli
feature to its own plugin in the plugins-workspace repository.2d5378bf
(#6717) Moved the dialog APIs to its own plugin in the plugins-workspace repository.39f1b04f
(#6943) Moved the event
JS APIs to a plugin.fc4d687e
(#6716) Moved the file system APIs to its own plugin in the plugins-workspace repository.f78a3783
(#6742) Moved the http
feature to its own plugin in the plugins-workspace repository.29ce9ce2
(#6902) Moved the os
feature to its own plugin in the plugins-workspace repository.60cf9ed2
(#6905) Moved the process
feature to its own plugin in the plugins-workspace repository.e1e85dc2
(#6925) Moved the protocol
scope configuration to the asset_protocol
field in SecurityConfig
.96639ca2
(#6749) Moved the shell
functionality to its own plugin in the plugins-workspace repository.e1e85dc2
(#6925) Moved the updater configuration to the BundleConfig
.b072daa3
(#6919) Moved the updater
feature to its own plugin in the plugins-workspace repository.3188f376
(#6883) Bump the MSRV to 1.65.d693e526
(#6780) Added the onNewIntent
Plugin hook on Android.34b8f339
(#6705) Add app
method for the PluginApi
struct.96639ca2
(#6749) Moved the tauri::api::process
module to tauri::process
.cdad6e08
(#6774) Changed how the tauri-android
dependency is injected. This requires the gen/android
project to be recreated.e1e85dc2
(#6925) Removed the allowlist configuration.cebd7526
(#6728) Moved the clipboard
feature to its own plugin in the plugins-workspace repository.e1e85dc2
(#6925) Removed extract and move APIs from tauri::api::file
.3f17ee82
(#6737) Moved the global-shortcut
feature to its own plugin in the plugins-workspace repository.ae102980
(#6719) Refactor the Context
conditional fields and only parse the tray icon on desktop.2d5378bf
(#6717) Remove the updater's dialog option.e1e85dc2
(#6925) Removed UpdaterEvent
. See tauri-plugin-updater
for new usage.9a79dc08
(#6947) Moved the window
JS APIs to its own plugin in the plugins-workspace repository.22a76338
(#6713) Expose SafePathBuf
type in tauri::path
.c4171152
(#6909) Enable shadows by default.dfa407ff
(#6763) Change iOS plugin init function signature to func init_plugin() -> Plugin
.run_mobile_plugin
function error handling.
Clone
for plugin::PluginHandle
.
raw
encoding option to read stdout and stderr raw bytes.
default-tls
feature to native-tls
and added rustls-tls
feature.
proguard-tauri.pro
file in the Android project.
bool
in the invoke handler.
initialize_android_plugin
and initialize_ios_plugin
APIs on AppHandle
.
PluginApi
.
mobile_entry_point
macro.
reqwest-*
Cargo features were also removed.
App::run_mobile_plugin
and AppHandle::run_mobile_plugin
.
shadow
option when creating a window and Window::set_shadow
.
with_webview
on Android and iOS.
tauri-plugin-log
.
recursive
option was false
.
default-tls
and reqwest-default-tls
Cargo features for enabling TLS suppport to connect over HTTPS.
with_webview
for Android platform alowing execution of JNI code in context.
mobile_entry_point
macro.
8ce51cec
(#7718) On Windows, retain command line args when relaunching the app after an update. Supports NSIS and WiX (without elevated update task).cc3d8e77
(#8539) Fixes a deadlock when reading a stdout or stderr line returns an error.b546b42d
(#8577) Preserve the order of JS object/map keys in IPC calls. This also fixes issues with the JS http
module when calling to servers that required a specific order of FormBody
contents.8f8729d9
(#8312) On macOS, allow cancelling maximization when doubleclick happens on data-tauri-drag-region
by simply keeping the left moust button pressed and then moving the mouse away of the starting position of the click, which is consistent with the native behavior of macOS.tauri-runtime-wry@0.14.4
50a3d170
(#8408) On Windows, fix open
dialog defaultPath
, when invoked from JS, not working if the path uses forward slash (/
)645e1dcc
(#8404) Fix NSIS updater failing to launch when using basicUi
mode.tauri-runtime-wry@0.14.3
tauri-utils@1.5.2
tauri-runtime@0.14.2
tauri-macros@1.4.3
b3e53e72
(#8288) Added AssetResolver::iter
to iterate on all embedded assets.5e05236b
(#8289) Added tracing for window startup, plugins, Window::eval
, events, IPC, updater and custom protocol request handlers behind the tracing
feature flag.2ba88563
(#8095) Fix docs.rs build for x86_64-apple-darwin
.4b6a602a
(#8234) Escape path of the updater msi to avoid crashing on installers with spaces.tauri-runtime-wry@0.14.2
tauri-macros@1.4.2
21cdbb41
(#7982) Set the correct truncate
option on OpenOptions
so that write_file
can completely overwrite existing files.eeb6be54
(#7512) Add tauri::Manager::emit_filter
and only serialize once when emitting to multiple windows.6c408b73
(#7269) Add option to specify notification sound.fdaee9a5
(#7350) Add tauri::plugin::Builder::register_uri_scheme_protocol
10e362d0
(#7432) Added UpdateBuilder::endpoints
to add request endpoints at runtime.10e362d0
(#7432) Added UpdateResponse::header
and UpdateResponse::remove_header
to modify the update download request headers.757e959e
(#7344) Open links externally when <base target="_blank" />
existsc9827338
(#7416) Enhance readDir
API error with path information.58d6b899
(#7636) Add append
option to FsOptions
in the fs
JS module, used in writeTextFile
and writeBinaryFile
, to be able to append to existing files instead of overwriting it.9aa34ada
(#7645) Add setting to switch to http://<scheme>.localhost/
for custom protocols on Windows.4bf1e85e
(#7722) Properly respect the focused
option when creating the webview.0797a002
(#7746) On macOS, fixed tapping on custom title bar doesn't maximize the window.1a3dcdb8
(#7185) On Windows, fix NSIS installers requiring administrator rights failing to be launched by updater.fa7f9b77
(#7341) Fix updater not following endpoint redirects.6fbd6dba
(#17) Fix the validation of std::env::current_exe
warn the user if AppImage is not mounted instead of panickingtauri-utils@1.5.0
tauri-runtime-wry@0.14.1
tauri-runtime@0.14.1
tauri-macros@1.4.1
6afd3472
(#6680) Revert #6680 which added a default sound for notifications on Windows. This introduced inconsistency with other platforms that has silent notifications by default. In the upcoming releases, we will add support for modifying the notification sound across all platforms.066c09a6
(#7227) Fix regression in 1.4
where the default behavior of the file system scope was changed to allow reading hidden files and directories by default.7c237209
(#6546) Added tauri::VERSION
const to get Tauri's version from Rust.4c39e46a
(#7026) Added tauri::webview_version
, to get webview version.359058ce
(#5939) Add tauri::api::os::locale
function to get the system locale.c4d6fb4b
(#2353) Added the maximizable
, minimizable
and closable
options to the window builder.c4d6fb4b
(#2353) Added the set_maximizable
, set_minimizable
, set_closable
, is_maximizable
, is_minimizable
and is_closable
methods on Window
.1d99f8a3
(#4752) Expose the test
module behind the test
Cargo feature.000104bc
(#6472) Add Window::is_focused
and Manager::get_focused_window
getters.441f9646
(#5491) Add MenuHandle::try_get_item
and SystemTrayHandle::try_get_item
which returns a Option
instead of panicking.45330e38
(#6375) Enhance the asset
protocol to support streaming of large files.df89ccc1
(#6955) Support passive
mode for NSIS updater.cd3846c8
(#6955) Restart the app after the NSIS updater is finished.db7c5fbf
(#7143) Remove attohttpc
in favor of reqwest
.d2710e9d
(#6944) Unpin time
, ignore
, and winnow
crate versions. Developers now have to pin crates if needed themselves. A list of crates that need pinning to adhere to Tauri's MSRV will be visible in Tauri's GitHub workflow: https://github.com/tauri-apps/tauri/blob/dev/.github/workflows/test-core.yml#L85.5d85d099
(#7128) Send updater status events even if default dialog is enabled.82169e69
(#5208) Fix parsing allowlist > http > scope
urls that added a trailing slash which broke matching the incoming requests url.b41b57eb
(#7105) Fix panics when registering an invalid global shortcuts or checking it is registered and return proper errors instead.aecf1469
(#6889) Fix IPC failing after a failed navigation to an external URL.076e1a81
(#7119) Fix unlistening to window events failing sometimes.3f35b452
(#4080) Fix WindowBuilder::on_navigation
handler not registered properly.0503eb69
(#7078) On macOS and Linux, fix app crashing when creating a window with data:
uri.3700793a
(#6934) Emit UPTODATE
update status to javascript when the updater server returns status code 204
ff5e4dbb
(#6794) Fix some configurations not applied when creating the window through Javascript.65fd674f
(#6652) Play a sound when showing a notification on Windows.696d77c3
(#4493) Fixes global events not being received on window-specific event listeners.additional_browser_args
option when creating a window.
--profile
to cargo in tauri build
causing conflict with --release
passed by the CLI.
content_protected
option when creating a window and Window::set_content_protected
to change it at runtime.
Map
when used in invoke
.
Window::on_navigation
.
__TAURI_METADATA__.__windows
across all windows.
UpdaterBuilder::check
returning a parsing error when 204
is sent from server where it should instead return a UpToDate
error.
OkWithLabel
and OkCancelWithLabels
variants to the api::dialog::MessageDialogButtons
enum to set the text of the dialog buttons.
Builder::device_event_filter
and App::set_device_event_filter
methods.
recursive
option was false
.
is_minimized()
window method.
open
crate to v3.2 to fix an URL encoding bug on Windows.
mailto:
and tel:
links on the shell API.
os_info
to =3.5
.
time
to 0.3.15
.
title
getter on window.
SystemTray::with_tooltip
and SystemTrayHandle::set_tooltip
for Windows and macOS.
url()
getter.
prefers-color-scheme
support.
WindowBuilder
struct to recreate windows from tauri.conf.json configurations.
WindowEvent::Focused
in App::run
callback.
winnow
crate to 0.4.1 to keep the 1.60 MSRV.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.