Skip to content

[pull] dev from tauri-apps:dev - #19

Open
pull[bot] wants to merge 4081 commits into
ebfork:devfrom
tauri-apps:dev
Open

pull[bot] wants to merge 4081 commits into
ebfork:devfrom
tauri-apps:dev

Conversation

@pull

@pull pull Bot commented Mar 17, 2022 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

lucasfernog and others added 27 commits September 21, 2026 05:55
…16073)

* fix(cli): install Android SDK platform 37 to match the app template

The SDK bootstrap installed `platforms;android-36` while the generated project uses `compileSdk`/`targetSdk` 37.

* delete change file [skip ci]
…#16068)

* chore(cli): align plugin templates with the app template SDK versions

Newly generated plugins now use `compileSdk = 37` on Android and an iOS deployment target of 15.0 (requires swift-tools-version 5.5 for `.v15`), matching the app template defaults.

* delete change (already covered) [skip ci]
* fix(utils): accept additional-watch-folders as a config alias

The camelCase key is `additionalWatchFolders` but the only kebab-case alias was `additional-watch-directories`, so the idiomatic TOML spelling was rejected as an unknown field.

* remove test
…#16071)

* fix(utils): emit the Permissions-Policy header under its correct name

The `Permissions-Policy` entry of `app > security > headers` was written as the invalid header `Permission-Policy`, so the policy never reached the browser.

* remove stupid test
* chore(deps): update rust crate brotli to v9

* Add change file

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tony <legendmastertony@gmail.com>
* fix(cli): remove doubled braces in tauri init path dependency

A raw string literal was used where `format!` escaping was intended, producing `{{ version = "2" }}` in the generated Cargo.toml dependency.

* cleanup, add tests
* feat(tests): add mobile e2e tests

* fix pnpm usage

* fix ios test

* chore: bump automation deps

* fix audit

* remove silly tests
…text (#16072)

* fix(core): scope ACL deny permissions to the capability execution context

`RuntimeAuthority::resolve_access` checked `denied_commands.get(command).map(..).is_some()`, which is true whenever the command has any deny entry regardless of whether the origin matched. A deny scoped to a remote capability therefore also denied the local app. Only deny when an entry's execution context matches the origin, and make the debug message consistent.

* cleanup
* feat: add liquid glass effects

* update objc2

* Enhance Liquid Glass effects and update objc2

Added new Liquid Glass window effects and updated dependencies.

* revert cargo toml changes

* wrong version number in ts comment

* gremlin

* put behind feature flag (untested)

* Revert "put behind feature flag (untested)"

This reverts commit e6a4eee.

* cr, docs

* update example

* non_exhaustive

* interactive

* NSEnumerator

* window-vibrancy 0.8

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* perf: reduce redundant clones and allocations

- tray: Arc::unwrap_or_clone for icon updates, skip 4MiB RGBA clone when uniquely owned
- asset protocol: keep decoded path as Cow, build SafePathBuf once, borrow Range header, write multi-range bodies directly into the response buffer
- menu builders: move MenuId into the main-thread closure instead of cloning
- tauri-utils: AssetKey::from borrows rooted paths via Cow

Signed-off-by: Tunglies <77394545+Tunglies@users.noreply.github.com>

* fix clippy

* fix fmt while rebase

---------

Signed-off-by: Tunglies <77394545+Tunglies@users.noreply.github.com>
* fix(acl): rebase runtime-resolved scope ids past baked ACL

* cr

* address review: assign scope ids after base id, use entry api

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* feat(core): allow config app dir override

* Fix mock context

* Fix ToTokens impl

* Use `current_binary` instead of `current_exe`

* Allow resolving variables like `$DESKTOP`

* Clippy

* fix(core): harden app directory override resolution

- resolve overrides through a single helper instead of repeating the
  guard in every `app_*_dir` getter
- keep `..` components in `$VAR` overrides by using `resolve` instead of
  `parse`, and normalize the result so `./` does not leak into the path
- resolve relative overrides beside the `.app` bundle on macOS instead of
  inside `Contents/MacOS`
- reject Windows root-relative and drive-relative paths, unknown
  variables and `$APP*` variables with a descriptive error
- ignore the override on iOS, where the app is sandboxed
- log when the default webview data directory cannot be resolved

* feat(utils): allow overriding app directories individually

`app > appDirectoriesOverride` is now either a single root path or an
object that overrides `config`, `data`, `localData`, `cache` and `log`
individually. Paths are validated when the config is parsed, so an
unsupported base directory variable or a Windows root-relative path is
reported at build time instead of failing every `app_*_dir` call.

The change file now also bumps `tauri-utils`, which holds the new field.

* docs: document the app directories override

Mention `app > appDirectoriesOverride` in the `app_*_dir` resolver docs,
the `BaseDirectory::App*` variants and the JS path API, state that a
window's `dataDirectory` is not affected by it, and correct the log and
data directory locations in the existing docs.

* test: cover the app directories override

Config parsing (string and object forms, aliases, unknown keys, rejected
variables, root-relative paths) and codegen in tauri-utils, and path
resolution (defaults, relative/absolute/variable roots, per-directory
overrides, `..` handling, normalization, rejected variables, macOS bundle
detection) in tauri.

* docs: address review feedback on the app directories override

Per the discussion on #14620: warn that executable-relative paths only
work where the executable's directory is writable (portable builds,
AppImages, per-user installers, `tauri dev`) and not for system-wide
installs, recommend applying the option to a portable build flavor via
`--config`, point installed apps at base directory variables or absolute
paths, and frame the option around portable apps rather than testing,
noting that a distinct dev `identifier` covers the testing case.

* docs: warn that executable-relative overrides do not work for bundled Linux and macOS apps

Spell out per platform why a path relative to the executable fails for
deb/rpm packages, `.app` bundles in `/Applications` and translocated
bundles, that AppImages only work while kept in a writable directory,
and repeat it in the platform-specific section.

* docs: broaden the app directories override use case and show a runtime example

The option is not only for portable apps but for any app that wants its
app directories in a location it chooses. Add an example that sets the
override at runtime by mutating the context returned by
`tauri::generate_context!()` through `config_mut`, both in the config
docs and as a compiled doctest on `Context::config_mut`.

* docs: tighten the app directories override docs

State each point once: fold the warning into the platform-specific
section, mention the writability requirement a single time, drop the
repeated bundled Linux/macOS remarks and the duplicated single-root
semantics under the first example.

* feat(core): support the app directories override on Android and iOS

Move the override resolution into the shared path module so the Android
resolver honors it too, and stop ignoring it on iOS. Base directory
variables and absolute paths work on both mobile platforms; relative
paths are rejected with a descriptive error since there is no writable
directory next to the executable there.

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* fix(cli): authenticate the mobile options server

The dev/build commands expose the CLI options (including forwarded env vars) to the Xcode and Android Studio build scripts over a local WebSocket server. Require a per-session random token, reject requests with an Origin header, stop sending secret-looking env vars, store the address file owner-only in the generated project instead of the shared temp dir, remove it on exit, and return clear errors from the IDE scripts.

* cleanup
renovate Bot and others added 30 commits November 18, 2026 19:27
* chore(deps): update dependency rollup to v4.68.3

* ignore audit

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tony <legendmastertony@gmail.com>
)

* feat(tauri): add specta::Type for ipc::Request and ipc::Response

* drop tests

* docs: mention specta support for ipc channel
* chore(deps): update worker-rs crates to 0.9

* bump worker-build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tony <legendmastertony@gmail.com>
* feat(bundler): add SRCTAURIDIR NSIS define (fix #14048)

NSIS installer hooks had no way to refer to files kept next to
tauri.conf.json: every path the bundler passes to the template is one it
resolves itself, and the project directory was not among them, because
the bundler's Settings never carried it.

Settings gains an optional project_dir, which the CLI fills with the
tauri dir it already has in hand, and the NSIS bundler turns into a
SRCTAURIDIR define. It is optional so that bundling driven by something
other than the CLI keeps working, and the define is simply absent then.

The define is emitted above the installer hooks include rather than with
the other defines below it. A hook is plain NSIS source, so it can only
use what is already defined by the time it is included, and pointing at a
file next to the config is what the hook needs it for:

  !define MUI_UNICON "${SRCTAURIDIR}\nsis\uninstall.ico"

* refactor(bundler): rename the NSIS project dir define to TAURIDIR

One directory arrived under three names: a `project_dir` field on
`Settings`, a `src_tauri_dir` template key, and a `SRCTAURIDIR` define.
`project_dir` also collides with `config.project_dir()` in the CLI,
which is the mobile gen directory, not this one.

Settle on `tauri_dir`, which is what this repo already calls the
directory holding `tauri.conf.json`, through the `Settings` field, the
builder, the getter and the template key, and shorten the define to
`TAURIDIR` to match.

* fix(bundler): let NSIS hooks override MUI_ICON and MUI_UNICON

installer.nsi defined MUI_ICON and MUI_UNICON from the installerIcon and
uninstallerIcon config options without checking whether they were already
defined. Installer hooks are included before those lines, so a hook that
sets either icon (e.g. `!define MUI_UNICON "${TAURIDIR}\nsis\uninstall.ico"`,
the example in the TAURIDIR change file) failed to compile with
`!define: "MUI_UNICON" already defined` when the matching config option
was also set.

Guard both defines with !ifndef so a hook's value takes precedence.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: zakuma1 <47258376+zakuma1@users.noreply.github.com>
Co-authored-by: amrbashir <github@amrbashir.me>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
)

* fix(nsis): respect `/D=` install dir when install mode is `both`

`MULTIUSER_INIT` (and the install mode page) reset `$INSTDIR` to the
default location, discarding the directory passed with `/D=`. Remember
it in `.onInit` and re-apply it in `RestorePreviousInstallLocation`,
which MultiUser.nsh calls after every install mode change.

Fixes #16006

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(nsis): merge /D= capture into placeholder check, rename to CmdLineInstallDir

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
Inserted right before the finish page is created, so installer hooks
can `!undef` or redefine its `MUI_FINISHPAGE_*` defines, e.g. to remove
the "Run" or "Create desktop shortcut" checkboxes. Previously this was
only possible by copying the whole `installer.nsi` template, since
redefining those in a hook fails with "already defined".

Closes #15267

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): preserve iOS prerelease numbers with build metadata

Signed-off-by: cuishuang <imcusg@gmail.com>

* fix(cli): put prerelease number before build metadata in iOS version

Keeps CFBundleVersion ordering consistent with SemVer precedence, e.g.
1.2.3-rc.1+20 -> 1.2.3.1.20 sorts below 1.2.3-rc.2+5 -> 1.2.3.2.5.

---------

Signed-off-by: cuishuang <imcusg@gmail.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* chore(deps): update rust crate dom_query to 0.29

* bump wry and change file

* minor bump

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tony <legendmastertony@gmail.com>
…loses #15663 (#16312)

Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
)

* fix(api): round toPhysical results to whole pixels

* feat(api): add PhysicalSize.round and PhysicalPosition.round

* feat(api): add LogicalSize.round and LogicalPosition.round

* docs(api): note that roundToPixel matches Rust's f64::round

* docs(api): note that round() returns a new instance

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* feat(ios): pass the calling view controller to plugin invokes

* feat(android): pass the calling activity to plugin invokes

* feat(core): run mobile plugin commands on behalf of a webview

* feat(android): launch contextual activity results from the calling activity

* refactor(android): derive invoke context from its weak origin

* fix(mobile): preserve native callback safety and iOS exports

* chore(android): add TODO for merging result launchers

* update docs

* update presentingViewController impl

* rename to run_mobile_plugin_with_webview_async

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Reapply "Reland "feat(bundler): add compression option for deb bundles, closes #9846 (#16198)" (#16258)" (#16295)

This reverts commit 0db4b7e.

* use liblzma, matching rpm

---------

Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* feat(tauri-build): option to link the Windows resource into all targets

The resource file (and with it the application manifest) is only linked
into binaries, so on Windows any test binary that links Tauri fails to
start with STATUS_ENTRYPOINT_NOT_FOUND, because Tauri imports
`TaskDialogIndirect`, which needs Common Controls v6 from the manifest.

Add `WindowsAttributes::link_resource_into_all_targets`, which uses
`tauri_winres::WindowsResource::compile_for_everything` so the resource is
also linked into the library's unit tests, integration tests, examples,
benchmarks and cdylibs. It is opt-in, so the default output is unchanged.

Closes #13419

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: update lockfile

* use link_resource_into_all_targets on examples/api

* default to true

* actually remove option - force true

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
…`data_store_identifier` (#16054)

* feat(runtime-wry): apply data_store_identifier as WebView2 profile name on Windows

`data_store_identifier` was only consumed on macOS/iOS (WKWebsiteDataStore)
and silently ignored on Windows. WebView2 multi-profile support enables the
same mapping: each webview that sets an identifier now gets its own named
profile (with_profile_name, wry >= 0.56), so apps sharing one data directory
across webviews get fully isolated cookies and storage per identifier while
still sharing a single browser process.

The 16 identifier bytes are rendered as 32-char lowercase hex, which
satisfies WebView2 profile naming rules and is collision-free.

* add profile identifier, deprecate data-store-identifier

---------

Co-authored-by: jhasheng <jhasheng@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* IPC Introspection

* Add changeset

* Fix changeset

* Fix changeset again?

* definition -> metadata

* drop `#[non_exhaustive]`

* fix change file

* keep emitting the command when metadata parsing fails

* compute argument keys without parsing the arguments again

* do not guess the plugin prefix in the command metadata name

* keep docs from macros like include_str!

* keep the metadata structs non_exhaustive

* document that arguments includes injected parameters

* add a public command_metadata! macro

* add test

* update example

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
…bles (#16328)

* refactor(nsis): split installer.nsi into includes and use named variables

* chore: add change file

* chore: trim change file

* chore: note FindWixInstall is also called from .onInit

* refactor(nsis): flatten the utils folder into includes

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* test(bundler): compile the NSIS template with makensis

`installer.nsi` and the files it includes share one flat, case-insensitive
variable namespace, so a name declared twice or one that collides with an NSIS
builtin aborts the build. Declarations behind `!if` and the language files only
reach the compiler when a configuration pulls them in, so one build cannot see
all of them, and nothing in CI ran makensis at all.

Compile the template in four configurations picked to take every `!if` arm at
least once, with `!pragma warning error 6000` and `6001` prepended through the
existing `nsis.template` setting so that reading a variable nothing declares or
declaring one nothing uses is an error too. An 11-byte stub binary is enough to
bundle, so the whole matrix runs in a few seconds.

Add test-bundler.yml to run the crate's tests, which no workflow did before.

* test(bundler): take the NSIS icon and image branches, report every failure

The five icon and image settings were the one part of the template no
configuration reached, so the six `!define MUI_*` blocks behind them went
uncompiled, including the `!if` chain that turns header images on when
either side of the install sets one. `full` now takes the installer side
of it and `current-user` the uninstaller header image on its own, which
is the arm `full` cannot reach, without adding a fifth compile.

A failing configuration also used to abort the loop, hiding whether the
rest compile. Every configuration is compiled now and the failure names
all of the broken ones, and the temporary directory of each carries its
name so that the makensis output, which goes straight to the terminal,
says which configuration it belongs to.

* test(bundler): keep the mirror tests from leaking their env var

`TAURI_BUNDLER_TOOLS_GITHUB_MIRROR_TEMPLATE` belongs to the whole
process, and the two tests that set it never unset it, so every download
after them went to `mirror.example.com`. Nothing noticed until the NSIS
template test, which downloads the toolset on a cold cache and failed in
CI with `No such host is known`. A guard now unsets it when the test
ends, and the template test is serial so that it cannot read the
variable while one of them holds it.

* test(bundler): use a relative resource path in the template test

`bundle > resources` is globbed from the working directory, and
`resources::normalize` drops the drive letter of an absolute path on
Windows, so the temporary file the test passed landed on whichever drive
the working directory was on. That is the same drive locally and a
different one on a GitHub runner, where both configurations with
resources failed with `resource path
/Users\RUNNER~1\...\resource.txt doesn't exist`.

The crate manifest is the one file a relative path always finds, since
cargo runs the test from the crate root.

* test(bundler): take every remaining branch of the NSIS template

An audit of the template and its includes turned up seven compile time
branches no configuration reached: the `arm64` arm of the `both`
MultiUser setup, the `x64` and `x86` arms of the `perMachine` default
install directory, the `offlineInstaller` WebView2 arm, the
`!addplugindir` of the signed plugins copy, the `!uninstfinalize` of the
uninstaller signing command, and the directories the uninstaller removes
for a resource that is not at the root of the install directory.

Three configurations take the install mode and architecture arms, since
those nest and so only compile for the one pair that has them. The rest
costs nothing extra: a signing command that does nothing but succeed
makes the bundler copy the NSIS plugins and hand the command to makensis
to run over the uninstaller, and a resource map puts the resource in a
directory of its own. `offlineInstaller` gets a stand-in for the 130 MB
runtime in a tools directory of its own, so that the shared cache cannot
end up holding a file a later build would ship.

Two things stay out of reach of any configuration, and are now written
down as such: the two `!ifdef` guards of `FileAssociation.nsh`, which
only take their branch if something defined those names first, and
`languages/Persian.nsh`, which cannot compile at all.

* test(bundler): compile the Farsi translation too
… back (#16548)

* feat(android): enable the back callback only while the webview can go back

* wry 0.57.3 is our minimum

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* Init adding Pacman support

* Progress adding pacman support

* Add compression and extension support

* Bundling pacman

* Work on PKGBUILD

* Generate SHA512, add package()

* Update Sources Section

* Removing extra blanklines

* Add changes file

* Update pkgname in tauri as well

* Improve docs

* cleanup, fixes

* feat(bundler): default the pacman pkgname to `<name>-bin`, add `pkgname` option

* feat(bundler): add pacman `pkgrel` and `epoch` options

* feat(bundler): add pacman `optdepends` option

* feat(bundler): add pacman `maintainer` option

* feat(bundler): add pacman `install` script option

* feat(bundler): use architecture specific pacman sources so PKGBUILDs can be merged

* feat(bundler): add pacman `files` and `desktopTemplate` options instead of reusing the deb ones

* feat(bundler): add pacman `changelog` option, stop shipping the deb changelog

* feat(bundler): add pacman `license` option, install `bundle > licenseFile`

* fix(bundler): only expand whole variable names in pacman .SRCINFO sources

* fix(bundler): replace every character pacman rejects in pkgver

* docs: describe the pacman options and the new `all` target in the change file

* refactor(bundler): use `bundle > license` for pacman instead of a pacman-specific option

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* feat(tray): add native icon support

* Merge remote-tracking branch 'origin/dev' into amr/tray-native-icon

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* fix(bundler): isolate cached platform tools and plugins

- Keep AppImage tools and NSIS plugins in versioned cache directories, copying them into build-local paths as needed
- Use system NSIS on macOS and Linux while preserving plugin signing support

* fix(bundler): resolve NSIS clippy warnings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.