Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
169 commits
Select commit Hold shift + click to select a range
2679ddd
fix(ios): fix deadlock during Swift plugin command handling (#15101)
PrinceTumby Mar 12, 2026
c8d7003
fix(bundler): set linuxdeploy arch to i386 (#15102)
ShaunSHamilton Mar 12, 2026
812b299
ci: fix duplicated audit runs (#15104)
Legend-Master Mar 13, 2026
15b3111
chore(deps): update dependency vite to v8 and @sveltejs/vite-plugin-s…
renovate[bot] Mar 13, 2026
8db451c
fix(cli): ignore keystore.properties in Android templates (#14996)
Xu-Justin Mar 16, 2026
1fa1db5
chore: reduce cloning in `EmbeddedAssets::get` (#15112)
llogiq Mar 17, 2026
f17240b
refactor: reduce nesting in `AppManager::get_asset` (#15114)
Legend-Master Mar 17, 2026
fcb702e
fix(cli): allow `build --bundles nsis` arg in linux+macOS (#14954)
acx0 Mar 17, 2026
aabb42f
chore(deps): update wrangler & flatted to fix audit (#15116)
FabianLars Mar 18, 2026
1ef6a11
chore(deps): Update cargo-mobile2 and toml crates (#15115)
FabianLars Mar 18, 2026
80c1425
fix(cli): fix ios build when `Metal Toolchain` exist in the system (#…
setoelkahfi Mar 20, 2026
d730770
Refactors (#15117)
sftse Mar 20, 2026
f0381b4
chore(deps): update rust crate tar to v0.4.45 [security] (#15129)
renovate[bot] Mar 21, 2026
093e2b4
feat(mobile): multi-window support (#14484)
lucasfernog Mar 23, 2026
4017a7e
feat: Allow getting inner PathBuf from SafePathBuf (#14908)
joshuamegnauth54 Mar 24, 2026
d34497e
refactor(runtime-wry): remove RefCell hack (#14862)
Legend-Master Mar 24, 2026
386312c
chore(deps): update dependency rollup to v4.59.1 (#15150)
renovate[bot] Mar 24, 2026
e032c3b
refactor: replace `kuchikiki` with `dom_query` (#14959)
thomaseizinger Mar 25, 2026
3b5b2cc
chore(deps): update dependency rollup to v4.60.0 (#15154)
renovate[bot] Mar 25, 2026
5dc2cee
fea(wix): add minimum webview2 version support (#14793)
Legend-Master Mar 26, 2026
5a0ca7e
feat(bundler): support Liquid Glass icons, closes #14207 (#14671)
lucasfernog Mar 26, 2026
e5b0079
feat: cover more cases for data-tauri-drag=region="deep", add example…
amrbashir Mar 28, 2026
cdf5276
chore(deps): update ctor and napi (#15183)
FabianLars Mar 31, 2026
b27be06
feat: add `eval_with_callback` to Webview and WebviewWindow (#14925)
lanyeeee Apr 1, 2026
ec5381e
chore(deps-dev): bump vite from 8.0.0 to 8.0.5 (#15204)
dependabot[bot] Apr 7, 2026
074299c
feat: add Bring All to Front predefined menu item type (#14307)
signadou Apr 7, 2026
926a57b
feat(windows): NSIS uninstaller icon and header image support (#15201)
Kokoro2336 Apr 8, 2026
cc5c976
feat(mobile): add file association support (#14486)
lucasfernog Apr 13, 2026
25e1f51
chore(deps): bump rand from 0.9.1 to 0.9.3 (#15234)
dependabot[bot] Apr 14, 2026
1063c48
fix(macos/ios): Add handler for web content process termination (fix …
JeffTsang Apr 14, 2026
9979cde
changes(nsis): update Italian translations (#15175)
bovirus Apr 15, 2026
df3fb97
chore: fix clippy warnings
lucasfernog Apr 16, 2026
b536dce
chore(deps): update dependency typescript to v6 (#15158)
renovate[bot] Apr 18, 2026
c69d5ca
Non-breaking version of PR 15127 (#15262)
sftse Apr 19, 2026
5ec1d5a
docs: nsis default languages (#15260)
Legend-Master Apr 19, 2026
b7a0ff0
feat(windows): append .rc content support. (#15263)
Kokoro2336 Apr 20, 2026
f1d8912
chore(tauri-utils): update mime_type documentation (#15253)
lucasfernog Apr 20, 2026
fc1b52c
Audit CI fix, RUSTSEC advisories (#15282)
sftse Apr 23, 2026
6da2bad
chore(deps): bump openssl from 0.10.72 to 0.10.78 (#15284)
dependabot[bot] Apr 23, 2026
001c8fe
feat(webview2): add option to disable browser-level autofill on Windo…
aoxiangtianyu-go Apr 23, 2026
a219ede
chore(deps): update rust crate tray-icon to 0.22 (#15203)
renovate[bot] Apr 23, 2026
a30dca4
fix(tauri-build): set Windows FileVersion/ProductVersion strings from…
pascalandr Apr 23, 2026
9640f53
fix(cef): update ensure_render_target to rebind compositor surface af…
amrbashir Apr 27, 2026
b3f2d12
fix(tauri-build): preserve numeric semver build metadata in Windows F…
pascalandr Apr 27, 2026
7815ded
fix(cef): implement re-entrancy guard for user event callbacks (#15279)
amrbashir Apr 28, 2026
8010ae5
chore(deps): update dependency rollup to v4.60.2 (#15192)
renovate[bot] Apr 29, 2026
be0e4bd
feat(nsis): add Vietnamese language support for installer. (#15218)
TanNhatCMS Apr 29, 2026
d83d2d9
feat(async_runtime): enable track_caller attribute for async_runtime …
Tunglies Apr 29, 2026
a12142a
feat: Add support for setting icon & template at same time (#14357)
ykogan-discord Apr 29, 2026
373b7e6
Update Specta in lockfile to fix documentation (#15177)
oscartbeaumont Apr 29, 2026
046189b
fix: doc links (#15300)
lucasfernog Apr 29, 2026
9d2a140
fix(schema-worker): return content type json (#15301)
Legend-Master Apr 29, 2026
1ca61fd
chore(deps): update rust crate muda to 0.19 (#15259)
renovate[bot] Apr 29, 2026
687413e
chore(deps): update worker-rs crates to 0.8 (#15233)
renovate[bot] Apr 30, 2026
a622d90
fix(deps): update worker-build to 0.8 (#15304)
Legend-Master Apr 30, 2026
b240341
fix(deps): update specta in lockfile (#15303)
Legend-Master Apr 30, 2026
e55492d
feat: Add support for Android build variants (feat #14777) (#14886)
onehumandev Apr 30, 2026
173dd45
fix(ci): x86_64-apple-darwin CLI build (#15194)
dmytrodudnik-netizen Apr 30, 2026
04f7048
Revert "fix(deps): update specta in lockfile" (#15305)
Legend-Master Apr 30, 2026
1035f12
fix(windows): tauri-bundler detect arm system (#14923)
razein97 Apr 30, 2026
764b913
feat(cli): restart Android emulator if it is disconnected from adb (#…
lucasfernog Apr 30, 2026
c00a3db
feat(macros): add support for rename command macro in tauri-macros #1…
Tunglies Apr 30, 2026
110336c
fix(macOS): fix incorrect window position on multi-monitor setups (#1…
polw1 Apr 30, 2026
4ef5797
feat(ios): add --no-sign and --archive-only flags to ios build (#15061)
PixPMusic Apr 30, 2026
eb0312e
feat(mobile): Propagate tao::Event::Suspended and tao::Event::Resumed…
tremorrisdev Apr 30, 2026
9808236
fix(macOS): correct value for work_area.position.y (#14655)
jbaudanza Apr 30, 2026
13bea17
chore: fmt
lucasfernog Apr 30, 2026
df05c00
chore: minor bump for codegen crate
lucasfernog Apr 30, 2026
e60834f
Apply Version Updates From Current Changes (#15041)
github-actions[bot] Apr 30, 2026
a04d907
fix(ci): publish-cli-rs script for Powershell (#15309)
lucasfernog Apr 30, 2026
8e97fa9
Merge branch 'dev' into feat/cef
lucasfernog May 1, 2026
4ca427d
fix: pin napi for msrv and Node.js on CI (#15310)
lucasfernog May 1, 2026
0080522
fix build without macos-private-api feature
lucasfernog May 1, 2026
7beddc1
api example fix
lucasfernog May 1, 2026
e19663a
feat: dragdrop for CEF
lucasfernog May 1, 2026
ebb21a8
more clippy fixes
lucasfernog May 1, 2026
c84b064
Merge remote-tracking branch 'origin/dev' into feat/cef
lucasfernog May 1, 2026
4f548e7
chore(deps): update phf to 0.13 (#15308)
Legend-Master May 3, 2026
07ff1d0
feat: implement ipc_handler (ipc.postMessage)
lucasfernog May 3, 2026
f5223a1
properly implement init scripts for remote urls using CDP
lucasfernog May 4, 2026
5054a1c
fix linux/windows compilation
FabianLars May 4, 2026
3057eda
fix(driver): enable `eq-separator` feature for `pico-args`. (#15324)
Kokoro2336 May 4, 2026
1b26769
fix(tauri): enforce ACL for remote origins even without AppManifest (…
mtsgrd May 4, 2026
5f479c0
fix(core): requestPermission crash regression on Android, closes #153…
lucasfernog May 4, 2026
ba02558
Merge commit from fork
chippers May 4, 2026
33e9fab
refactor: actually use dev URL on dev
lucasfernog May 4, 2026
7f01af6
chore: run fmt
lucasfernog May 4, 2026
5e3126f
feat(mobile): expose monitor APIs (#15338)
lucasfernog May 4, 2026
23894c7
feat: emit ScaleFactorChanged
lucasfernog May 4, 2026
16c3da3
Merge remote-tracking branch 'origin/dev' into feat/cef
lucasfernog May 4, 2026
d035242
fix: tests
lucasfernog May 4, 2026
db699d4
feat: prepare publishing for packages/cli (@tauri-apps/cli-cef) (#15340)
lucasfernog May 4, 2026
bfb255e
fix initialization scripts - force Page.enable and CDP observer
lucasfernog May 5, 2026
a175b64
fix: IPC regression
lucasfernog May 5, 2026
217583b
fix: deep link might contain arg additions
lucasfernog May 5, 2026
4d2db70
Apply Version Updates From Current Changes (#15328)
github-actions[bot] May 6, 2026
e5ae5b9
chore: fix changelog
FabianLars May 6, 2026
d175c48
fix build error when wry and cef features are enabled
FabianLars May 6, 2026
0e8e25f
chore(deps): update dependency rollup to v4.60.3 (#15355)
renovate[bot] May 7, 2026
362b69c
fix: properly ignore change events for internal INITIAL_LOAD_URL
lucasfernog May 8, 2026
1e01423
feat: add support to user_data_directory
lucasfernog May 8, 2026
18b64ee
feat: add Builder::cef_cache_path
lucasfernog May 9, 2026
0f99d1c
fix: stuck creating new windows async
lucasfernog May 9, 2026
b87fcd3
chore: bump CEF to 148.0.0+147.0.10
lucasfernog May 9, 2026
5069447
fix(cli): sign macOS app binary after CEF helper bundles
lucasfernog May 9, 2026
c285ed7
chore: bump CEF CLI
lucasfernog May 9, 2026
3b5ccb3
Merge remote-tracking branch 'origin/dev' into feat/cef
lucasfernog May 9, 2026
08e3131
fix appimage builds
FabianLars May 12, 2026
5a2dcf4
chore: bump CEF CLI
FabianLars May 13, 2026
b15b859
refactor: make error dialog take `&'static str` (#15369)
Legend-Master May 14, 2026
32d8166
feat: add Windows VC runtime linking and bundling options (#15372)
amrbashir May 14, 2026
5bde79e
Merge branch 'dev' into feat/cef
amrbashir May 14, 2026
fa935e0
chore: bump CEF CLI 3.0.0-alpha.3
amrbashir May 14, 2026
6fd733b
fix: fix tauri-build tests
amrbashir May 14, 2026
eadd8f5
chore(deps-dev): bump svelte from 5.53.11 to 5.55.7 (#15382)
dependabot[bot] May 15, 2026
47e1b75
fix: `set_as_windows_menu_for_nsapp` command wrongly called `set_as_h…
DominikPeters May 15, 2026
67c6923
fix: Origin custom protocol header might be null on init script
lucasfernog May 16, 2026
3fd8ba2
fix: resources after empty directory not copied (#15388)
Legend-Master May 16, 2026
001ceab
feat: improve CEF shutdown flow on macOS (#15393)
lucasfernog May 16, 2026
3594e30
feat: more NSApp event implementations (#15394)
lucasfernog May 16, 2026
b5b72ce
fix(tauri-utils): preserve resource source file name when dest is emp…
Legend-Master May 16, 2026
20bb033
Revert "feat: add Windows VC runtime linking and bundling options (#1…
Legend-Master May 16, 2026
499df79
apply version updates (#15378)
github-actions[bot] May 16, 2026
58864fc
fix: macOS build
lucasfernog May 16, 2026
d9bc695
fix: actually setup app delegate
lucasfernog May 16, 2026
413f01c
enhance(bundler): add more NSIS path error contexts (#15403)
Sean-Kenneth-Doherty May 18, 2026
c8cbb82
chore(deps): bump brace-expansion from 5.0.5 to 5.0.6 (#15414)
dependabot[bot] May 19, 2026
41fdca7
chore(deps): bump ws from 8.18.0 to 8.20.1 (via audit fix) (#15417)
dependabot[bot] May 19, 2026
b5b9de2
docs: acl `Identifier` is a permission id not plugin id (#15428)
Legend-Master May 22, 2026
f603e95
fix: ensure data directory exists before passing to CEF
amrbashir May 23, 2026
2857c01
fix(nsis): embed signed copies of stock plugins, not unsigned system …
koki-develop May 23, 2026
472f6d0
fix: check makensis exit code (#15429)
Legend-Master May 23, 2026
c2b8f47
enhance: include permission identifier in ACL error messages (#15373)
MavenRain May 24, 2026
50a6671
fix(cli): respect src/bin required-features
FabianLars May 28, 2026
fb21668
chore: bump CEF CLI to 3.0.0-alpha.4
FabianLars May 28, 2026
800eade
perf(mobile): reuse dev reqwest client (#15444)
Legend-Master May 29, 2026
469a689
chore(deps): update rust crate tar to v0.4.46 [security] (#15449)
renovate[bot] May 30, 2026
fca4a31
Fix aliased plugin imports in v1 migration (#15454)
fallintoplace Jun 1, 2026
e6083a1
perf: load resources of `tauri://` protocol asynchronously (#15220)
DeTeam Jun 1, 2026
504ff3f
chore(deps): update rust crate tray-icon to 0.24 (#15364)
renovate[bot] Jun 1, 2026
25a6835
chore(deps): update dependency vitest to v4.1.0 [security] (#15462)
renovate[bot] Jun 1, 2026
f092d10
chore: remove unused http server in api example (#15466)
Legend-Master Jun 4, 2026
7c31ad6
feat(cef): add with_webview support (#15464)
amrbashir Jun 4, 2026
2783e60
fix(acl): preserve Number::Int on serde_json round-trip (#15481)
thanhtoantnt Jun 5, 2026
66f873d
fix(mobile): avoid mutex deadlocks (#15491)
bclarke123 Jun 6, 2026
4808245
feat(cef): implement some missing window / webview APIs (#15496)
lucasfernog Jun 7, 2026
1b87109
Merge branch 'dev' into feat/cef
lucasfernog Jun 7, 2026
eab045b
fix: Linux build
lucasfernog Jun 7, 2026
7372c8e
fix: clippy
lucasfernog Jun 7, 2026
1d90248
feat(windows): add support for setting window owner in CEF (#15510)
amrbashir Jun 10, 2026
f38afcf
feat(runtime-cef): apply windows parent builder (#15511)
amrbashir Jun 10, 2026
304ad49
refactor(cef): remove `.browser_window()` API (#15518)
amrbashir Jun 10, 2026
fd69d70
fix(cef): cpu on idle (#15479)
david-crabnebula Jun 12, 2026
e720165
fix(runtime-cef): panic on app relaunch without arguments (#15527)
lucasfernog Jun 13, 2026
ed5da63
feat(runtime-cef): implement run_return (#15528)
lucasfernog Jun 13, 2026
6fba4c3
feat(runtime-cef): popup features and NewWindowResponse::Create (#15529)
lucasfernog Jun 13, 2026
3a52737
feat(runtime-cef): invoke the after_window_creation hook (#15530)
lucasfernog Jun 13, 2026
7c894b1
fix(runtime-cef): avoid busy-looping the shutdown drain (#15531)
lucasfernog Jun 13, 2026
47c8b31
feat(runtime-cef): wire the web content process terminate handler (#1…
lucasfernog Jun 13, 2026
798e55f
fix(build): add $ORIGIN rpath ONLY for CEF apps on Linux builds (#15533)
lucasfernog Jun 13, 2026
f5c7530
fix(runtime-cef): multiwebview windowing and repaint on Linux/X11 (#1…
lucasfernog Jun 14, 2026
68ac86f
feat(bundler): Update rpm-rs to 0.25
FabianLars Jun 17, 2026
2162373
chore: bump CEF CLI to 3.0.0-alpha.5
FabianLars Jun 17, 2026
d4b2082
ci: test on node 20,22 instead of node 18,20
FabianLars Jun 17, 2026
9037806
refactor: async runtime authority construction
lucasfernog Jun 18, 2026
fb7bdd9
feat: reduce resolved ACL size with commands list
lucasfernog Jun 18, 2026
ba3d193
fix: prelease versions in rpm bundles
FabianLars Jun 19, 2026
5188ee3
fix: remove leftover dbg print in rpm bundler
FabianLars Jun 24, 2026
3e454aa
fix: Cmd+Q regression on macOS
lucasfernog Jun 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .cargo/audit.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,17 @@ ignore = [
"RUSTSEC-2024-0370",
# time crate can't be updated in the repo because of MSRV, users are unaffected
"RUSTSEC-2026-0009",
# rand unsoundness, fixed when we remove kuchikiki from deps in v3, currently
# remains for semver reasons but is not built in default configuration
"RUSTSEC-2026-0097",
# glib 0.18.5 unsoundness, fixed by updating to gtk4
"RUSTSEC-2024-0429",
# rustls, fixed when updating to apple-codesign 0.28.0
"RUSTSEC-2026-0049",
# rustls, fixed when updating to apple-codesign 0.28.0
"RUSTSEC-2026-0098",
# rustls, fixed when updating to apple-codesign 0.28.0
"RUSTSEC-2026-0099",
# rustls, fixed when updating to apple-codesign 0.28.0
"RUSTSEC-2026-0104",
]
12 changes: 12 additions & 0 deletions .changes/acl-command-permissions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
tauri: patch:perf
tauri-utils: patch:perf
tauri-build: patch:perf
tauri-plugin: patch:perf
tauri-macros: patch:perf
tauri-codegen: patch:perf
---

Reduce the size of the resolved ACL embedded in the app by storing the autogenerated command permissions as a `commands` list on the plugin/app manifest instead of two explicit permissions (`allow-$command` and `deny-$command`) per command. The `allow-$command`/`deny-$command` permissions are now materialized on demand when resolving the ACL.

The application manifest also gains implicit `allow-*` and `deny-*` permissions that allow or deny **all** of its commands through a single resolved entry, so capabilities no longer need to list every command individually.
9 changes: 9 additions & 0 deletions .changes/acl-identifier-error-context.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"tauri-utils": "patch:enhance"
---

Improve diagnostics for invalid plugin and permission identifiers.

The `Identifier` deserializer now wraps the inner error with the offending identifier string so the message reads `invalid plugin or permission identifier '<value>': ...`, surfacing the bad entry without requiring a grep through the file.

The previous parse failure (`failed to parse JSON: identifiers can only include lowercase ASCII, hyphens which are not leading or trailing, and a single colon if using a prefix at line 16 column 23`) now reads `failed to parse JSON: invalid plugin or permission identifier 'sqlite_proxy:allow-foo': identifiers can only include lowercase ASCII, hyphens which are not leading or trailing, and a single colon if using a prefix at line 16 column 23`.
7 changes: 7 additions & 0 deletions .changes/acl-number-int-preserved-on-serdejson-roundtrip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"tauri-utils": "patch:bug"
---

Fix `Number::Int` being silently coerced to `Number::Float` on `serde_json` round-trip.

`From<serde_json::Value> for Value` was checking `as_f64()` first, which succeeds for every integer that fits in an f64, so integer JSON numbers were always deserialized as `Number::Float`. The check order is now `as_i64()` → `as_u64()` (cast to `i64`, wrapping for values above `i64::MAX`) → `as_f64()`, matching serde_json's own visitor convention.
5 changes: 0 additions & 5 deletions .changes/base64.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changes/data-tauri-drag-region-deep.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changes/load-tauri-protocol-async.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
tauri: patch:perf
---

Load `tauri://` custom protocol handlers asynchronously to speed up load time
5 changes: 5 additions & 0 deletions .changes/mobile-run-command-deadlock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri": patch:bug
---

Adjust mutex locking in `send_channel_data_handler`, `handle_android_plugin_response`, `send_channel_data` to avoid deadlocks
5 changes: 5 additions & 0 deletions .changes/nsis-config-path-context.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri-bundler": "patch:enhance"
---

Improve NSIS configuration path errors so missing installer icons and images include the related config key and path.
5 changes: 5 additions & 0 deletions .changes/nsis-stock-plugins-embed-signed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri-bundler": "patch:bug"
---

Fix NSIS stock plugins (`NSISdl.dll`, `StartMenu.dll`, `System.dll`, `nsDialogs.dll`) being embedded in the final installer as unsigned despite the signing step succeeding. The signed local copies under `<output>/Plugins/x86-unicode/` were not on makensis' plugin search path, so makensis fell back to the unsigned DLLs from the NSIS toolset directory. The fix adds `!addplugindir` for the signed plugin directory before any plugin command is parsed in the script.
6 changes: 0 additions & 6 deletions .changes/prompt-signing-key-password-context.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changes/reuse-mobile-dev-reqwest-client.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
tauri: patch:perf
---

Reuse proxy reqwest client in mobile dev, improving the dev load speed
5 changes: 5 additions & 0 deletions .changes/tray-icon-0.24.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri": "patch:deps"
---

Updated dependency `tray-icon` to 0.24
8 changes: 8 additions & 0 deletions .changes/v1-migrate-aliased-plugin-imports.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"tauri-cli": "patch:bug"
"@tauri-apps/cli": "patch:bug"
---

Fix `tauri migrate` generating invalid namespace imports for aliased pluginified imports from `@tauri-apps/api`.

Inputs like `import { cli as superCli } from "@tauri-apps/api"` now migrate to `import * as superCli from "@tauri-apps/plugin-cli"` instead of producing invalid ESM syntax. The migration tests also reparse migrated JS, Svelte, and Vue output so syntax regressions are caught directly.
2 changes: 2 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
- '**/package.json'
- '**/pnpm-lock.yaml'
push:
branches:
- dev
paths:
- '.github/workflows/audit.yml'
- '**/Cargo.lock'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/lint-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
paths:
- '.github/workflows/lint-rust.yml'
- 'crates/**'
- 'Cargo.toml'
- 'Cargo.lock'

env:
RUST_BACKTRACE: 1
Expand Down
36 changes: 28 additions & 8 deletions .github/workflows/publish-cli-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,26 +53,34 @@ jobs:
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
build: |
npm i -g --force corepack
rustup install 1.88.0
rustup default 1.88.0
cd packages/cli
pnpm build --target x86_64-unknown-linux-gnu
strip *.node
- host: ubuntu-22.04
target: x86_64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: |
rustup install 1.88.0
rustup default 1.88.0
cd packages/cli
pnpm build
strip *.node
- host: macos-latest
target: aarch64-apple-darwin
build: |
rustup target add x86_64-apple-darwin
pnpm build --features native-tls-vendored --target=aarch64-apple-darwin
strip -x *.node
- host: ubuntu-22.04
target: aarch64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
build: |
npm i -g --force corepack
rustup install 1.88.0
rustup default 1.88.0
rustup target add aarch64-unknown-linux-gnu
cd packages/cli
pnpm build --target aarch64-unknown-linux-gnu
aarch64-unknown-linux-gnu-strip *.node
Expand All @@ -90,8 +98,10 @@ jobs:
target: aarch64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: |
cd packages/cli
rustup install 1.88.0
rustup default 1.88.0
rustup target add aarch64-unknown-linux-musl
cd packages/cli
pnpm build --target aarch64-unknown-linux-musl
/aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node
- host: ubuntu-22.04
Expand All @@ -107,6 +117,8 @@ jobs:
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v4
- name: Prepare CEF package metadata and versions
run: node ../../.scripts/ci/prepare-cli-cef-publish.js
- run: npm i -g --force corepack
- name: Setup node
uses: actions/setup-node@v4
Expand Down Expand Up @@ -136,7 +148,12 @@ jobs:
if: ${{ matrix.settings.docker }}
with:
image: ${{ matrix.settings.docker }}
options: --user 0:0 -v ${{ github.workspace }}/.cargo-cache/git/db:/root/.cargo/git/db -v ${{ github.workspace }}/.cargo/registry/cache:/root/.cargo/registry/cache -v ${{ github.workspace }}/.cargo/registry/index:/root/.cargo/registry/index -v ${{ github.workspace }}:/build -w /build
options: --user 0:0 -v ${{ github.workspace
}}/.cargo-cache/git/db:/root/.cargo/git/db -v ${{ github.workspace
}}/.cargo/registry/cache:/root/.cargo/registry/cache -v ${{
github.workspace
}}/.cargo/registry/index:/root/.cargo/registry/index -v ${{
github.workspace }}:/build -w /build
run: ${{ matrix.settings.build }}

- name: Build
Expand Down Expand Up @@ -212,8 +229,8 @@ jobs:
- host: windows-latest
target: x86_64-pc-windows-msvc
node:
- '18'
- '20'
- '22'
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -243,8 +260,8 @@ jobs:
fail-fast: false
matrix:
node:
- '18'
- '20'
- '22'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -278,8 +295,8 @@ jobs:
fail-fast: false
matrix:
node:
- '18'
- '20'
- '22'
runs-on: ubuntu-latest
container:
image: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
Expand Down Expand Up @@ -319,8 +336,8 @@ jobs:
fail-fast: false
matrix:
node:
- '18'
- '20'
- '22'
image:
- ghcr.io/napi-rs/napi-rs/nodejs:aarch64-16
runs-on: ubuntu-latest
Expand All @@ -345,7 +362,8 @@ jobs:
- uses: addnab/docker-run-action@v3
with:
image: ${{ matrix.image }}
options: '-v ${{ github.workspace }}:/build -w /build -e RUSTUP_HOME=/usr/local/rustup -e CARGO_HOME=/usr/local/cargo'
options: '-v ${{ github.workspace }}:/build -w /build -e
RUSTUP_HOME=/usr/local/rustup -e CARGO_HOME=/usr/local/cargo'
shell: bash
run: |
set -e
Expand Down Expand Up @@ -386,12 +404,14 @@ jobs:
path: packages/cli/artifacts
- name: Move artifacts
run: pnpm artifacts
- name: Rewrite package names for CEF publish
run: node ../../.scripts/ci/prepare-cli-cef-publish.js
- name: List packages
run: ls -R ./npm
shell: bash
- name: Publish
run: |
npm publish
npm publish --tag latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ''
Expand Down
21 changes: 10 additions & 11 deletions .github/workflows/publish-cli-rs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,22 +76,21 @@ jobs:

- name: Build CLI
if: ${{ !matrix.config.cross }}
run: cargo build --manifest-path ./crates/tauri-cli/Cargo.toml --profile release-size-optimized ${{ matrix.config.args }}
run: >-
cargo build --manifest-path ./crates/tauri-cli/Cargo.toml
--target ${{ matrix.config.rust_target }}
--profile release-size-optimized
${{ matrix.config.args }}

- name: Build CLI (cross)
if: ${{ matrix.config.cross }}
run: cross build --manifest-path ./crates/tauri-cli/Cargo.toml --target ${{ matrix.config.rust_target }} --profile release-size-optimized ${{ matrix.config.args }}
run: >-
cross build --manifest-path ./crates/tauri-cli/Cargo.toml
--target ${{ matrix.config.rust_target }}
--profile release-size-optimized
${{ matrix.config.args }}

- name: Upload CLI
if: ${{ !matrix.config.cross }}
uses: actions/upload-artifact@v4
with:
name: cargo-tauri-${{ matrix.config.rust_target }}${{ matrix.config.ext }}
path: target/release-size-optimized/cargo-tauri${{ matrix.config.ext }}
if-no-files-found: error

- name: Upload CLI (cross)
if: ${{ matrix.config.cross }}
uses: actions/upload-artifact@v4
with:
name: cargo-tauri-${{ matrix.config.rust_target }}${{ matrix.config.ext }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test-cli-rs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ on:
- 'crates/tauri-utils/**'
- 'crates/tauri-bundler/**'
- 'crates/tauri-cli/**'
- 'Cargo.toml'
- 'Cargo.lock'

env:
RUST_BACKTRACE: 1
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
paths:
- '.github/workflows/test-core.yml'
- 'crates/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '!crates/tauri/scripts/**'
- '!crates/tauri-cli/**'
- '!crates/tauri-bundler/**'
Expand Down
66 changes: 66 additions & 0 deletions .scripts/ci/prepare-cli-cef-publish.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/usr/bin/env node

// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT

const { readdirSync, readFileSync, writeFileSync } = require('node:fs')
const { join } = require('node:path')

const SOURCE_NAME = '@tauri-apps/cli'
const TARGET_NAME = '@tauri-apps/cli-cef'

const cliDir = process.cwd()
const npmDir = join(cliDir, 'npm')
const cefCliVersionPath = join(cliDir, '.cef-cli-version')
const tauriCliCargoTomlPath = join(cliDir, '../../crates/tauri-cli/Cargo.toml')

const cefCliVersion = readFileSync(cefCliVersionPath, 'utf8').trim()

if (!cefCliVersion) {
throw new Error(`expected a version in ${cefCliVersionPath}`)
}

function rewritePackageName(packageJsonPath, setVersion = false) {
const pkg = JSON.parse(readFileSync(packageJsonPath, 'utf8'))
if (setVersion) {
pkg.version = cefCliVersion
}
if (typeof pkg.name === 'string' && pkg.name.startsWith(SOURCE_NAME)) {
pkg.name = pkg.name.replace(SOURCE_NAME, TARGET_NAME)
}
writeFileSync(packageJsonPath, `${JSON.stringify(pkg, null, 2)}\n`)
console.log(`updated package metadata in ${packageJsonPath}`)
}

rewritePackageName(join(cliDir, 'package.json'), true)

for (const entry of readdirSync(npmDir, { withFileTypes: true })) {
if (!entry.isDirectory()) {
continue
}
rewritePackageName(join(npmDir, entry.name, 'package.json'))
}

const indexJsPath = join(cliDir, 'index.js')
const indexContents = readFileSync(indexJsPath, 'utf8')
const rewrittenIndexContents = indexContents.replace(
/@tauri-apps\/cli(?=[-/'"`])/g,
TARGET_NAME
)

if (rewrittenIndexContents !== indexContents) {
writeFileSync(indexJsPath, rewrittenIndexContents)
console.log(`rewrote native binding imports in ${indexJsPath}`)
}

const tauriCliCargoToml = readFileSync(tauriCliCargoTomlPath, 'utf8')
const tauriCliCargoTomlWithVersion = tauriCliCargoToml.replace(
/^version = ".*"$/m,
`version = "${cefCliVersion}"`
)

if (tauriCliCargoTomlWithVersion !== tauriCliCargoToml) {
writeFileSync(tauriCliCargoTomlPath, tauriCliCargoTomlWithVersion)
console.log(`updated tauri-cli version in ${tauriCliCargoTomlPath}`)
}
Loading