Compare commits

...

82 Commits

Author SHA1 Message Date
github-actions[bot]
ffa33cd28a apply version updates (#10903)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-09-05 14:06:28 -03:00
Lucas Fernandes Nogueira
faa259bacf refactor(core)!: change Assets::iter item to use Cow (#10907)
* refactor(core): change `Assets::iter` item to use `Cow`

make the iterator more flexible to support Assets implementations that do not rely on static assets

* fix test?

* lint

* lint

* clippy again
2024-09-05 13:42:22 -03:00
Tony
d9c8d3cc8d chore(deps): update infer, tray icon, urlpattern, image (#10902) 2024-09-05 14:10:08 +02:00
Lucas Nogueira
e568956e48 fix(ci): pin artifact actions 2024-09-04 19:48:48 -03:00
github-actions[bot]
a655d9c6ce Apply Version Updates From Current Changes (#10865)
* apply version updates

* fix audit

---------

Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-09-04 17:29:03 -03:00
dependabot[bot]
bdfa9534ab build(deps): bump quinn-proto from 0.11.6 to 0.11.8 (#10882)
Bumps [quinn-proto](https://github.com/quinn-rs/quinn) from 0.11.6 to 0.11.8.
- [Release notes](https://github.com/quinn-rs/quinn/releases)
- [Commits](https://github.com/quinn-rs/quinn/compare/quinn-proto-0.11.6...quinn-proto-0.11.8)

---
updated-dependencies:
- dependency-name: quinn-proto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-04 17:09:04 -03:00
dependabot[bot]
e885c17ab6 build(deps): bump actions/download-artifact in /.github/workflows (#10883)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.1.7.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4.1.7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-04 17:08:39 -03:00
Lucas Fernandes Nogueira
77056b194a chore(tauri-runtime-wry): update tao to 0.30 and wry to 0.43 (#10895) 2024-09-04 09:51:42 -03:00
Amr Bashir
0c46e48860 chore: remove unneeded prettier config (#10885) 2024-09-04 09:59:41 +08:00
Amr Bashir
0899e50831 feat: derive serde::Serialize for SafePathBuf (#10884) 2024-09-04 09:55:19 +08:00
Amr Bashir
976cad97c1 fix(resources): enhance error messages for globs (#10879)
* fix(resources): enhance error messages for globs

ref: https://github.com/tauri-apps/tauri/pull/10293#issuecomment-2326435392

* fmt
2024-09-04 00:58:08 +03:00
Hamir Mahal
11b3ab1468 ci: update setup-python action to v5 to fix deprecated node version (#10881) 2024-09-04 00:57:16 +03:00
Tony
431ca2c776 enhance(core): add FromStr impl for SafePathBuf (#10870) 2024-09-03 05:20:31 +03:00
Lucas Fernandes Nogueira
27d0183431 fix(core): clippy warnings, simplify embed_plist usage (#10844)
* fix(core): clippy warnings

* fix test

* chore: simplify example
2024-09-03 01:09:27 +03:00
Lucas Fernandes Nogueira
9c9644d155 feat(cli): always validate iOS lib (#10845) 2024-09-02 13:13:34 -03:00
Lucas Fernandes Nogueira
b42683592d fix(cli): iOS build targetting the simulator (#10847) 2024-09-02 13:13:22 -03:00
Lucas Fernandes Nogueira
79de4332b6 fix(core): isolation pattern breaks raw postMessage payload (#10841) 2024-09-02 13:12:59 -03:00
Lucas Fernandes Nogueira
5048a7293b feat(core): always use the custom protocol IPC on Linux (#10840) 2024-09-02 13:12:29 -03:00
Lucas Fernandes Nogueira
f0acf504a2 feat(core): validate duplicated capability identifier (#10858)
having duplicate capability identifier lead to unexpected behavior because one of the capabilities gets ignored.
With this change the build script now fails when this happens.
2024-09-02 17:13:13 +03:00
Fabian-Lars
ecc5362c1c docs: Add scope handling in file association example (#10864) 2024-09-02 17:11:55 +03:00
Lucas Fernandes Nogueira
6696e48800 fix(core): Swift warning for null invoke.resolve() iOS plugin values (#10842)
`Any` does allow `nil`,  but must be explicitly set to avoid the Swift warning
2024-09-02 16:51:30 +03:00
github-actions[bot]
c55474f21d apply version updates (#10855)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-09-01 09:50:31 -03:00
Lucas Fernandes Nogueira
6faa032766 fix(cli): iOS code signing failing on CI (#10854)
Looks like Apple cannot handle development profile automatic provisioning well

With this change we now skip code signing for build() and archive(), and let the export() function handle signing

see https://github.com/fastlane/fastlane/discussions/19973#discussioncomment-2688720 for more information
2024-09-01 09:29:48 -03:00
github-actions[bot]
82b084e65c apply version updates (#10828) 2024-08-31 18:19:34 -03:00
Lucas Fernandes Nogueira
5af1f5dec1 fix(cli): automatic signing for iOS on CI (#10851)
ref https://github.com/tauri-apps/cargo-mobile2/pull/381
2024-08-31 17:58:58 -03:00
Lucas Fernandes Nogueira
5ec74456b9 feat(bundler): fallback to publisher for deb maintainer, closes #10777 (#10825) 2024-08-29 15:41:40 -03:00
github-actions[bot]
0d2efd9ff4 apply version updates (#10820)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-08-28 23:03:54 -03:00
Lucas Fernandes Nogueira
d7e5c00e94 feat(core): add plugin::PermissionState (#10817)
* feat(core): add `plugin::mobile::PermissionState`

* move to plugin module

* default, specta::Type
2024-08-28 22:34:03 -03:00
Lucas Fernandes Nogueira
cc799b2cc8 fix(ci): publish CLI workflow wrong target path (#10816) 2024-08-28 17:02:15 -03:00
github-actions[bot]
abfbef4b9d apply version updates (#10750)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-08-28 15:19:54 -03:00
Amr Bashir
d14a2a55f0 ci: fix a few relative paths (#10813)
* ci: fix a few relative paths

* Update .changes/config.json

---------

Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
2024-08-28 13:27:33 -03:00
Amr Bashir
ebfe17e264 ci: fix sync-cli-metadata.js path (#10812) 2024-08-28 12:43:55 -03:00
Lucas Fernandes Nogueira
f67a9eb6de feat(cli): synchronize Tauri config and lib name with iOS Xcode project (#10802)
- the Xcode project now uses a fixed output library name, which means changes to the Cargo.toml lib name won't affect it (backwards compatible change, we're checking if this new format is being used or not by reading the project.pbxproj)
- sync config identifier with the pbxproj
- sync development team config with the pbxproj

the sync runs both on dev and on build

Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
2024-08-28 12:11:50 -03:00
Amr Bashir
431208207b ci: fix building cli in integration test (#10811) 2024-08-28 11:54:35 -03:00
Lucas Fernandes Nogueira
f81929e251 feat(api): permission types for mobile plugins (#10799)
* feat(api): permission types for mobile plugins

let's have a central place to keep the permission types
ref https://github.com/tauri-apps/plugins-workspace/issues/979

* build
2024-08-28 17:49:05 +03:00
Lucas Fernandes Nogueira
d1c97bce7b chore: add root taurignore (#10805)
* chore: add root taurignore

enhances the DX of running `tauri dev` in any of the examples folder - we don't need to watch the entire workspace for changes

* extend ignore list
2024-08-28 17:48:39 +03:00
Lucas Fernandes Nogueira
f4bfd0722e fix(ci): check change tags script (#10803) 2024-08-28 03:20:45 +03:00
Amr Bashir
36eee37220 Restructure the repository (#10796)
* Restructure the repository

* lock file

* fmt

* fix bench

* fix cli template test

* remove accidental file

* fix mv command

* clippy

* upgrade paths-filter github action

* fix cli migration tests

* lockfile

* license headers

* clippy

* scope test-core to tauri crate

* license header

* correct --manifest-path usage

* lockfile

* fix tauri-driver on macOS [skip ci]

* build target ios

* try downgrade env_logger

* downgrade 0.1.7

* try to fix bench

* bench overflow

* revert overflow fix, fix tauri_root_path

* revert env_logger downgrade

* fmt

* raise msrv to 1.71

* fmt

* delete .cargo/config.toml [skip ci]

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-27 18:42:30 -03:00
Lucas Fernandes Nogueira
22d2afa89b fix(core): add proguard rule to keep JSON deserializers (#10800) 2024-08-27 15:30:10 -03:00
Ishaan Goel
c85bb0fb61 fix(docs): typo in documentation of setSize() method in Webview API. (#10798)
The example for the `setSize()` method in the documentation wrongly imports `getCurrent` (I believe as was in tauri v1)
instead of `getCurrentWebview`.
2024-08-27 20:15:08 +03:00
Lucas Fernandes Nogueira
fbe76a955a fix: serialize Uint8Array and ArrayBuffer as number[], closes #10336 (#10797) 2024-08-27 12:49:18 -03:00
Lucas Fernandes Nogueira
83ed090bfa fix(cli): do not exit mobile dev if logger could not be attached (#10790)
I just faced this when I was connected to my iPhone but wireless. Xcode also lets this happen, you only miss the logs in this case.
2024-08-27 12:05:32 -03:00
Lucas Fernandes Nogueira
84070bae92 fix(cli): plugin ios init cmd not generating iOS folder, closes #10661 (#10792) 2024-08-27 12:05:19 -03:00
Lucas Fernandes Nogueira
edb2ca31f7 fix(cli): migrate v1 plugins NPM packages (#10794) 2024-08-27 12:01:15 -03:00
Lucas Fernandes Nogueira
02b2f964a7 fix(cli): add command version requirement for known plugin npm (#10795)
small regression from #10699 - NPM install is now prompting users to select the version
2024-08-27 17:02:14 +03:00
Lucas Fernandes Nogueira
9718dc9e8c fix(cli): readd targetSdk to Android app template, closes #10712 (#10791)
Regression from #10558
2024-08-27 16:04:43 +03:00
Amr Bashir
1e441811ee feat: add DoubleClick variant for TrayIconEvent (#10786)
* feat: add `DoubleClick` variant for `TrayIconEvent`

* revert api example change

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-27 16:03:55 +03:00
Lucas Fernandes Nogueira
3a4972b394 feat(cli): include arch in the tauri info output (#10793) 2024-08-27 16:02:40 +03:00
Amr Bashir
72597a77f9 chore(deps): update cargo-mobile2 to 0.15 (#10788)
* chore(deps): update cargo-mobile2 to 0.15

* fix ios build [skip ci]

* lock file

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-27 08:42:42 -03:00
Masahiko Sakakibara
03f2a50981 fix(core): update swift-rs to fix iOS plugin builds (#10718)
* fix(cli): add comment suggest to use patch swift-rs

* Create change-pr-10718.md

* swift-rs 1.0.7 (still not published) [skip ci]

* update lockfile

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-27 08:22:13 -03:00
Lucas Fernandes Nogueira
fd68b7fdea fix(cli): do not generate .cargo/config file (#10785) 2024-08-26 22:15:08 -03:00
Lucas Nogueira
dc0612b156 fix(examples): streaming file path 2024-08-26 21:48:48 -03:00
Amr Bashir
70306dc79b ci: check toml formatting with taplo-cli (#10787)
* ci: check toml formatting with taplo-cli

* change name of job

* { workspace = true } -> .workspace = true

* add taplo.toml
2024-08-26 21:46:05 -03:00
Amr Bashir
ad83d41cb5 chore: cleanup and simplify examples (#10743) 2024-08-27 01:25:36 +03:00
Lucas Nogueira
c50800023e chore(cli): remove println 2024-08-26 18:01:39 -03:00
Masahiko Sakakibara
f86a8146ad feat(core): add plugin methods getArgs and getRawArgs for iOS and Android (#10761)
* feat(api): add method getArgsData

* chore

* return JSObject instead

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-26 16:55:51 -03:00
Masahiko Sakakibara
fb6bf31425 fix(plugin): fix android_package_id to follow cli (#10763)
* fix(plugin): fix android_package_id to follow cli

* Update tooling/cli/templates/plugin/src/mobile.rs

* add change file

---------

Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
2024-08-26 13:39:05 -03:00
Masahiko Sakakibara
21c2488d2e fix(cli): change supported URL Type "link:" in plugin template (#10771) 2024-08-26 15:16:14 +03:00
Tony
12e477ac38 fix(ci): missing pnpm on check api action (#10778)
* ci: fix missing pnpm on check api action

* Add set up node action
2024-08-26 15:12:24 +03:00
Lucas Fernandes Nogueira
073bb4f459 refactor(core): remove deprecated webview_fixed_runtime_path option (#10772)
* refactor(core): remove deprecated webview_fixed_runtime_path option

* update migration
2024-08-25 16:35:42 -03:00
Lucas Fernandes Nogueira
792340a73b fix(utils): minimum_webview2_version config kebab-case alias (#10773) 2024-08-25 10:59:33 -03:00
Lucas Fernandes Nogueira
09e9dc1aab feat(cli): allow xcodebuild to manage iOS signing and provisioning (#10752) 2024-08-23 21:12:49 -03:00
renovate[bot]
5c369e6059 chore(deps) Update Tauri CLI (dev) (#10724)
* chore(deps) Update Tauri CLI

* downgrade html5ever

* update lockfile [skip ci]

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-23 12:45:57 -03:00
renovate[bot]
1dab93f000 chore(deps) Update Rust crate syn to v2.0.75 (#10723)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-23 12:16:30 -03:00
renovate[bot]
8b96eca241 chore(deps) Update Tauri Codegen (#10725)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-23 12:14:56 -03:00
Lucas Fernandes Nogueira
2d31aef759 fix(cli): ensure gradlew is executable and does not use CRLF (#10751)
* test fix

* ensure gradle is executable and does not use CRLF

* fix import

* add change file

* add 0o111 instead
2024-08-23 10:49:45 -03:00
Tony
58dda44a59 feat(bundler/nsis): add minimum webview2 version checks (#10339) 2024-08-23 15:21:39 +03:00
chip
88bc357325 fix: generate Context inside a thread (#10734)
* generate `Context` inside a thread

fix #9882

this is a workaround for #9882 due to windows having a small
stack size for the main thread (1MiB) versus other platforms which
have 8MiB. the true fix would be to lower the generated code
stack size, but with lots a plugins, there are lots of ACL
configurations.

* add change file [skip ci]

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2024-08-23 08:46:23 -03:00
Amr Bashir
91e9e784aa feat(cli/info): include plugins info (#10729)
* feat(cli/info): include plugins info

closes #10682

* header

* resolve package manager once

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2024-08-23 08:29:03 -03:00
Lucas Nogueira
07aff5a2d4 fix(pnpm): ignore micromatch ReDoS vuln CVE-2024-4067 2024-08-22 12:47:48 -03:00
github-actions[bot]
9620c58e5a Apply Version Updates From Current Changes (#10740) 2024-08-22 11:50:17 -03:00
Lucas Fernandes Nogueira
c33adb19a7 Revert "apply version updates (#10715)" (#10739)
This reverts commit dc49cb3d9b.
2024-08-22 09:44:23 -03:00
github-actions[bot]
dc49cb3d9b apply version updates (#10715)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-08-22 09:43:45 -03:00
chip
5f64ed2b78 support 1.x automation env var in tauri-driver (#10738)
* support 1.x and 2.x automation env var

* changefile
2024-08-22 09:29:10 -03:00
Amr Bashir
f4d5241b37 chore: cleanup unnecessary scripts and files (#10731)
* chore: cleanup unnecessary scripts and files

- Removed `.cargo/config` and `__TAURI_WORKSPACE__` workaround
- Removed husky and precommit hooks
- Remove unecessary script files
- Moved `.scripts/covector/sync-cli-metadata.js` to `.scripts/ci/sync-cli-metadata.js`
- Moved `app-icon.png` to `.github/icon.png`
- Enhanced has-diff.sh script to output which files are modified

* lock file

* bring back __TAURI_WORKSPACE__

* add change file

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2024-08-22 07:56:52 -03:00
renovate[bot]
1add13b84e chore(deps) Update Tauri CLI (dev) (#10706)
* chore(deps) Update Tauri CLI

* revert html5ever

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-21 13:58:38 -03:00
renovate[bot]
7d9112edc7 chore(deps) Update Rust crate syn to v2.0.75 (#10705)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-21 13:50:37 -03:00
renovate[bot]
620163bf23 chore(deps) Update Tauri API Definitions (#10709)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-21 13:50:13 -03:00
renovate[bot]
660a5cd09e chore(deps) Update Tauri Codegen (#10708)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-21 13:50:03 -03:00
Lucas Fernandes Nogueira
793ee05317 fix(core): allow hyphens and underscores on identifiers, closes #9707 (#10700)
* fix(core): allow hyphens and underscores on identifiers, closes #9707

* fix build

* fix build

* lint

* move replace

* update tao

* update tao-macros
2024-08-21 13:46:25 -03:00
Lucas Fernandes Nogueira
da8c9a7d30 refactor(cli): synchronize pbxproj and export options, handle cert on build (#10669) 2024-08-21 11:38:02 -03:00
Lucas Fernandes Nogueira
9bcff3cd79 fix(core): properly remove isolation script from DOM (#10703) 2024-08-21 09:08:16 -03:00
1029 changed files with 17785 additions and 47996 deletions

View File

@@ -1,2 +1,4 @@
[env]
# workaround needed to prevent `STATUS_ENTRYPOINT_NOT_FOUND` error in tests
# see https://github.com/tauri-apps/tauri/pull/4383#issuecomment-1212221864
__TAURI_WORKSPACE__ = "true"

View File

@@ -0,0 +1,7 @@
---
"tauri": patch:breaking
"tauri-runtime-wry": patch:breaking
---
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.

View File

@@ -0,0 +1,5 @@
---
"@tauri-apps/api": patch:enhance
---
Added `PermissionState`, `checkPermissions` and `requestPermissions` base APIs to the core module, designed for plugin authors to extend.

View File

@@ -0,0 +1,6 @@
---
"tauri-utils": patch:breaking
"tauri": patch:breaking
---
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`.

View File

@@ -0,0 +1,5 @@
---
"tauri-utils": patch:enhance
---
Validate duplicate capability identifier.

View File

@@ -0,0 +1,6 @@
---
"tauri": 'patch:bug'
"tauri-utils": 'patch:bug'
---
Update swift-rs fixing a plugin build when native dependencies are used.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:enhance
"@tauri-apps/cli": patch:enhance
---
Include architecture in the `tauri info` output.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": "patch:feat"
"@tauri-apps/cli": "patch:feat"
---
Add plugins information in `tauri info` output

View File

@@ -128,7 +128,7 @@
},
"packages": {
"@tauri-apps/api": {
"path": "./tooling/api",
"path": "./packages/api",
"manager": "javascript",
"publish": [
{
@@ -149,61 +149,61 @@
]
},
"tauri-utils": {
"path": "./core/tauri-utils",
"path": "./crates/tauri-utils",
"manager": "rust"
},
"tauri-macos-sign": {
"path": "./tooling/macos-sign",
"path": "./crates/tauri-macos-sign",
"manager": "rust"
},
"tauri-bundler": {
"path": "./tooling/bundler",
"path": "./crates/tauri-bundler",
"manager": "rust",
"dependencies": ["tauri-utils", "tauri-macos-sign"]
},
"tauri-runtime": {
"path": "./core/tauri-runtime",
"path": "./crates/tauri-runtime",
"manager": "rust",
"dependencies": ["tauri-utils"]
},
"tauri-runtime-wry": {
"path": "./core/tauri-runtime-wry",
"path": "./crates/tauri-runtime-wry",
"manager": "rust",
"dependencies": ["tauri-utils", "tauri-runtime"]
},
"tauri-codegen": {
"path": "./core/tauri-codegen",
"path": "./crates/tauri-codegen",
"manager": "rust",
"dependencies": ["tauri-utils"]
},
"tauri-macros": {
"path": "./core/tauri-macros",
"path": "./crates/tauri-macros",
"manager": "rust",
"dependencies": ["tauri-codegen", "tauri-utils"]
},
"tauri-plugin": {
"path": "./core/tauri-plugin",
"path": "./crates/tauri-plugin",
"manager": "rust",
"dependencies": ["tauri-utils"],
"postversion": "node ../../.scripts/covector/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }"
"postversion": "node ../../.scripts/ci/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }"
},
"tauri-build": {
"path": "./core/tauri-build",
"path": "./crates/tauri-build",
"manager": "rust",
"dependencies": ["tauri-codegen", "tauri-utils"],
"postversion": [
"node ../../.scripts/covector/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }",
"cargo build --manifest-path ../tauri-config-schema/Cargo.toml"
"node ../../.scripts/ci/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }",
"cargo build --manifest-path ../tauri-schema-generator/Cargo.toml"
],
"assets": [
{
"path": "./tooling/cli/schema.json",
"name": "schema.json"
"path": "./crates/tauri-schema-generator/schemas/config.schema.json",
"name": "config.schema.json"
}
]
},
"tauri": {
"path": "./core/tauri",
"path": "./crates/tauri",
"manager": "rust",
"dependencies": [
"tauri-macros",
@@ -212,31 +212,31 @@
"tauri-runtime-wry",
"tauri-build"
],
"postversion": "node ../../.scripts/covector/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }"
"postversion": "node ../../.scripts/ci/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }"
},
"@tauri-apps/cli": {
"path": "./tooling/cli/node",
"path": "./packages/cli",
"manager": "javascript",
"dependencies": ["tauri-cli"],
"postversion": [
"node ../../../.scripts/covector/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }",
"cargo build --manifest-path ../../../core/tauri-config-schema/Cargo.toml"
"node ../../.scripts/ci/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }",
"cargo build --manifest-path ../../crates/tauri-schema-generator/Cargo.toml"
],
"prepublish": [],
"publish": [],
"postpublish": []
},
"tauri-cli": {
"path": "./tooling/cli",
"path": "./crates/tauri-cli",
"manager": "rust",
"dependencies": ["tauri-bundler", "tauri-utils", "tauri-macos-sign"],
"postversion": [
"cargo check",
"cargo build --manifest-path ../../core/tauri-config-schema/Cargo.toml"
"cargo build --manifest-path ../tauri-schema-generator/Cargo.toml"
]
},
"tauri-driver": {
"path": "./tooling/webdriver",
"path": "./crates/tauri-driver",
"manager": "rust",
"postversion": "cargo check"
}

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Do not quit `ios dev` and `android dev` process when we fail to attach the logger.

View File

@@ -0,0 +1,6 @@
---
"tauri-codegen": patch:changes
"tauri": patch:changes
---
Changes how the Info.plist is embedded on macOS development to avoid a clippy warning.

View File

@@ -0,0 +1,6 @@
---
'tauri-cli': 'patch:enhance'
'@tauri-apps/cli': 'patch:enhance'
---
Enhance iOS library validation, checking libs built with link time optimization.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Ensure gradlew is executable and does not use CRLF so it can be used on UNIX systems.

View File

@@ -0,0 +1,6 @@
---
'tauri-cli': 'patch:bug'
'@tauri-apps/cli': 'patch:bug'
---
Fix the `add` command NPM version specifier for known plugins from `2.0.0-rc` (unknown version requirement) to `^2.0.0-rc`.

View File

@@ -0,0 +1,5 @@
---
"tauri-utils": patch:bug
---
Properly remove isolation script on Android.

View File

@@ -0,0 +1,5 @@
---
"tauri-codegen": patch:bug
---
Generate context in a separate thread to prevent a stack overflow.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Fixes iOS code signing failing on CI due to a missing development certificate.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Fixes `ios build --target [aarch64-sim | x86_64]` failing to generate the app bundle for the iOS simulator.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Fixes `ios build` failing to build iOS app in CI when using an API key for automatic signing.

View File

@@ -0,0 +1,5 @@
---
"tauri": patch:bug
---
Fixes IPC postMessage raw body processing when using the isolation pattern.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Fix `tauri plugin ios init` not generating the iOS folder.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:breaking
"@tauri-apps/cli": patch:breaking
---
The `IOS_CERTIFICATE`, `IOS_CERTIFICATE_PASSWORD` and `IOS_MOBILE_PROVISION` environment variables are now read by the `ios build` command instead of `ios init`.

View File

@@ -0,0 +1,5 @@
---
"tauri": patch:bug
---
Fixes a warning when using a null value on the `invoke.resolve()` iOS plugin API.

View File

@@ -0,0 +1,5 @@
---
"tauri-bundler": patch:enhance
---
The debian `Maintainer` field now defaults to the Cargo.toml authors, but fallbacks to the `publisher` config value and the second part of the bundle identifier.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Migrate v1 plugins NPM packages.

View File

@@ -0,0 +1,8 @@
---
"tauri-cli": patch:bug
"tauri-build": patch:bug
"@tauri-apps/cli": patch:bug
"tauri-runtime-wry": patch:bug
---
Allow hyphens and underscores on app identifiers.

View File

@@ -0,0 +1,6 @@
---
"tauri": patch:enhance
---
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.

View File

@@ -0,0 +1,6 @@
---
"tauri-bundler": "patch:feat"
"tauri-utils": "patch:feat"
---
Add a new option `minimumWebview2Version` for Windows NSIS installer to trigger a webview2 update if the user's webview2 is older than this version

View File

@@ -3,43 +3,62 @@
"changes": [
".changes/add-notarize-error.md",
".changes/allow-commands-by-default.md",
".changes/always-enable-linux-ipc-custom-protocol.md",
".changes/android-dev-open-adb-fix.md",
".changes/android-gradle-8-9.md",
".changes/android-port-forward-fixes.md",
".changes/api-permissions-plugin.md",
".changes/append_invoke_initialization_script.md",
".changes/asset-resolver-dev-fallback.md",
".changes/assets-iter-cow.md",
".changes/avoid-rebuilds.md",
".changes/brotli-6.md",
".changes/bundler-object-custom-sign-command.md",
".changes/capability-id-already-exists.md",
".changes/change-default-export-option-debugging.md",
".changes/change-pr-10435.md",
".changes/change-pr-10498.md",
".changes/change-pr-10619.md",
".changes/change-pr-10676.md",
".changes/change-pr-10718.md",
".changes/check-android-lib-symbols.md",
".changes/cli-add-no-fmt.md",
".changes/cli-android-template-androidtv.md",
".changes/cli-desktop-port-exposure.md",
".changes/cli-info-include-arch.md",
".changes/cli-info-plugins.md",
".changes/cli-make-app-dir-consistent.md",
".changes/cli-mobile-checks.md",
".changes/cli-signtool-path.md",
".changes/core-plugin-namespace.md",
".changes/dev-url-localhost-mobile.md",
".changes/do-not-exit-on-log-fail.md",
".changes/embed-plist-no-unit-val.md",
".changes/enhance-ios-lib-validation.md",
".changes/enhance-permission-error-message.md",
".changes/ensure-gradlew-unix.md",
".changes/feat-remove-target-sdk.md",
".changes/fix-adb.md",
".changes/fix-add-plugin-npm-version-req.md",
".changes/fix-android-remove-current-script.md",
".changes/fix-cli-add-plugin-version.md",
".changes/fix-cli-dev-server-android.md",
".changes/fix-cli-panic-bun.md",
".changes/fix-colon-in-file-path.md",
".changes/fix-conf-parsing-error-filepath.md",
".changes/fix-config-override.md",
".changes/fix-context-stack-size.md",
".changes/fix-export-default-permissions.md",
".changes/fix-ios-automatic-signing-ci.md",
".changes/fix-ios-build-older-swift.md",
".changes/fix-ios-build-simulator.md",
".changes/fix-ios-bun-support.md",
".changes/fix-ios-signing-api-key.md",
".changes/fix-ipc-fallback.md",
".changes/fix-isolation-parse-raw-body.md",
".changes/fix-manifest-migration.md",
".changes/fix-missing-codesign-error-macos.md",
".changes/fix-tauri-plugin-ios-init.md",
".changes/fix-tslib-path.md",
".changes/fix-usage-without-compression.md",
".changes/fix-v1-frontend-migration.md",
@@ -48,28 +67,54 @@
".changes/improve-cli-init.md",
".changes/infer-signing-identity.md",
".changes/inject-mobile-resources.md",
".changes/ios-codesign-on-build.md",
".changes/ios-custom-project-template.md",
".changes/ios-default-minversion.md",
".changes/ios-frameworks.md",
".changes/ios-invoke-response-null.md",
".changes/isolation-main-frame-origin.md",
".changes/linux-option-gtk-app-id.md",
".changes/maintainer-fallback.md",
".changes/migrate-plugins.md",
".changes/migrate-prevent-duplications.md",
".changes/migrate-v1-plugin-npm.md",
".changes/migrate-vue-svelte.md",
".changes/min-ios-version.md",
".changes/mobile-identifier.md",
".changes/mobile-plugin-get-args.md",
".changes/nsis-ensure-webview2-version.md",
".changes/only-validate-ios-lib-debug.md",
".changes/permissions-add-target-specific.md",
".changes/plugin-builder-failable.md",
".changes/proguard-keep-json-deserializer-classes.md",
".changes/provisioning-signing-ios.md",
".changes/rc-migration.md",
".changes/readd-target-sdk-app.md",
".changes/refactor-ipc-error.md",
".changes/refactor-ipc-response.md",
".changes/remove-cargo-config-creation.md",
".changes/remove-open-command.md",
".changes/remove-unsecure-configs.md",
".changes/remove-webview_fixed_runtime_path.md",
".changes/resource-dir-android.md",
".changes/resource-dir-ios.md",
".changes/resources-map-becoming-dirs.md",
".changes/rust-permission-state.md",
".changes/safe-file-path-serialize.md",
".changes/safe-path-buf-from-str.md",
".changes/serialize-array-buffer.md",
".changes/synchronize-config-and-xcode-project.md",
".changes/synchronize-pbxproj-export-options.md",
".changes/tauri-build.md",
".changes/tauri-driver-1.x.md",
".changes/tray-double-click.md",
".changes/universal-bin-build-fails.md",
".changes/update-android-plugin-template.md",
".changes/update-docs-icon-path.md",
".changes/update-pbxproj-codesign.md",
".changes/update-tao-wry.md",
".changes/update-trayicon-infer-urlpattern-image.md",
".changes/update-wry.md",
".changes/utils-autogenerated-command-return-list.md",
".changes/utils-fix-plugin-reference.md",
".changes/v1-migrate-updater.md",

View File

@@ -0,0 +1,5 @@
---
"tauri": patch:bug
---
Change the Android Proguard rules to keep custom JSON deserializers.

View File

@@ -0,0 +1,7 @@
---
'tauri-cli': 'patch:feat'
'@tauri-apps/cli': 'patch:feat'
---
Allow Xcode to manage iOS code sign and provisioning profiles by default.
On CI, the `APPLE_API_KEY`, `APPLE_API_ISSUER` and `APPLE_API_KEY_PATH` environment variables must be provided for authentication.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Reintroduce the `targetSdk` value in the Android application template.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:enhance
"@tauri-apps/cli": patch:enhance
---
Remove the `.cargo/config` file creation that used to fix mobile build caches.

View File

@@ -0,0 +1,8 @@
---
"tauri-utils": patch:breaking
"@tauri-apps/cli": patch:breaking
"tauri-cli": patch:breaking
"tauri-bundler": patch:breaking
---
Removed the deprecated `webview_fixed_runtime_path` config option, use the `webview_install_mode` instead.

View File

@@ -0,0 +1,5 @@
---
"tauri": patch:enhance
---
Added `plugin:::PermissionState` enum.

View File

@@ -0,0 +1,6 @@
---
"tauri": patch:feat
---
Derive serde `Serialize` for `SafePathBuf`

View File

@@ -0,0 +1,5 @@
---
"tauri": patch:feat
---
Add `FromStr` impl for `SafePathBuf`

View File

@@ -0,0 +1,6 @@
---
"tauri": patch:bug
"@tauri-apps/api": patch:bug
---
Uint8Arrays and ArrayBuffers are now properly serialized as an array of numbers.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:enhance
"@tauri-apps/cli": patch:enhance
---
Synchronize identifier, development team and lib name with the iOS Xcode project.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Synchronize Xcode project changes with the ExportOptions.plist file so `ios build` calls can work with code signing changes made in Xcode.

6
.changes/tauri-build.md Normal file
View File

@@ -0,0 +1,6 @@
---
"tauri-build": "patch:feat"
---
Add `WindowsAttributes::new_without_app_manifest` to create `WindowsAttributes` without the default manifest.

View File

@@ -0,0 +1,5 @@
---
"tauri-driver": patch:bug
---
support both 1.x and 2.x automation env vars in `tauri-driver`

View File

@@ -0,0 +1,5 @@
---
"tauri": "patch:feat"
---
On Windows, Add and emit `DoubleClick` variant for `TrayIconEvent`.

View File

@@ -0,0 +1,6 @@
---
'tauri-cli': 'patch:changes'
'@tauri-apps/cli': 'patch:changes'
---
Update plugin template Android code to match documentation on Android package ID usage.

View File

@@ -0,0 +1,17 @@
---
"tauri": patch:changes
"tauri-runtime": patch:changes
"tauri-runtime-wry": patch:changes
"tauri-utils": patch:changes
"tauri-macros": patch:changes
"tauri-codegen": patch:changes
"tauri-build": patch:changes
"tauri-plugin": patch:changes
"tauri-driver": patch:changes
"tauri-cli": patch:changes
"@tauri-apps/cli": patch:changes
"@tauri-apps/api": patch:changes
"tauri-bundler": patch:changes
---
Update documentation icon path.

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:enhance
"@tauri-apps/cli": patch:enhance
---
Modify both ExportOptions.plist and project.pbxproj to reflect changes for the `IOS_CERTIFICATE`, `IOS_CERTIFICATE_PASSWORD` and `IOS_MOBILE_PROVISION` environment variables.

View File

@@ -0,0 +1,6 @@
---
"tauri": patch:deps
"tauri-utils": patch:deps
---
Update infer to 0.16, tray icon to 0.17, urlpattern to 0.3, image to 0.25

5
.changes/update-wry.md Normal file
View File

@@ -0,0 +1,5 @@
---
"tauri-runtime-wry": patch:deps
---
Update tao to 0.30 and wry to 0.43.

View File

@@ -48,7 +48,7 @@ Hi! We, the maintainers, are really excited that you are interested in contribut
First, [join our Discord server](https://discord.gg/SpmNs4S) and let us know that you want to contribute. This way we can point you in the right direction and help ensure your contribution will be as helpful as possible.
To set up your machine for development, follow the [Tauri setup guide](https://tauri.app/v1/guides/getting-started/prerequisites/) to get all the tools you need to develop Tauri apps. The only additional tool you may need is [PNPM](https://pnpm.io/), it is only required if you are developing the Node CLI or API packages (`tooling/cli/node` and `tooling/api`). Next, fork and clone this repo. It is structured as a monorepo, which means that all the various Tauri packages are under the same repository. The development process varies depending on what part of Tauri you are contributing to, see the guides below for per-package instructions.
To set up your machine for development, follow the [Tauri setup guide](https://tauri.app/v1/guides/getting-started/prerequisites/) to get all the tools you need to develop Tauri apps. The only additional tool you may need is [PNPM](https://pnpm.io/), it is only required if you are developing the Node CLI or API packages (`packages/cli` and `packages/api`). Next, fork and clone this repo. It is structured as a monorepo, which means that all the various Tauri packages are under the same repository. The development process varies depending on what part of Tauri you are contributing to, see the guides below for per-package instructions.
Some Tauri packages will be automatically built when running one of the examples. Others, however, will need to be built beforehand. To build these automatically, run the `.scripts/setup.sh` (Linux and macOS) or `.scripts/setup.ps1` (Windows) script. This will install the Rust and Node.js CLI and build the JS API. After that, you should be able to run all the examples. Note that the setup script should be executed from the root folder of the repository in order to run correctly.
@@ -58,15 +58,15 @@ See [Architecture](../ARCHITECTURE.md#major-components) for an overview of the p
### Developing Tauri Bundler and Rust CLI
The code for the bundler is located in `[Tauri repo root]/tooling/bundler`, and the code for the Rust CLI is located in `[Tauri repo root]/tooling/cli`. If you are using your local copy of `@tauri-apps/cli` (see above), any changes you make to the bundler and CLI will be automatically built and applied when running the build or dev command. Otherwise, running `cargo install --path .` in the Rust CLI directory will allow you to run `cargo tauri build` and `cargo tauri dev` anywhere, using the updated copy of the bundler and cli. You will have to run this command each time you make a change in either package.
The code for the bundler is located in `[Tauri repo root]/crates/tauri-bundler`, and the code for the Rust CLI is located in `[Tauri repo root]/crates/tauri-cli`. If you are using your local copy of `@tauri-apps/cli` (see above), any changes you make to the bundler and CLI will be automatically built and applied when running the build or dev command. Otherwise, running `cargo install --path .` in the Rust CLI directory will allow you to run `cargo tauri build` and `cargo tauri dev` anywhere, using the updated copy of the bundler and cli. You will have to run this command each time you make a change in either package.
### Developing The Node.js CLI (`@tauri-apps/cli`)
`@tauri-apps/cli` is a wrapper to `tauri-cli` so most changes should be written on the Rust CLI. The `[Tauri repo root]/tooling/cli/node` folder contains only packaging scripts to properly publish the Rust CLI binaries to NPM.
`@tauri-apps/cli` is a wrapper to `tauri-cli` so most changes should be written on the Rust CLI. The `[Tauri repo root]/crates/tauri-cli` folder contains only packaging scripts to properly publish the Rust CLI binaries to NPM.
### Developing Tauri Core and Related Components (Rust API, Macros, Codegen, and Utils)
The code for the Rust crates, including the Core, Macros, Utils, WRY runtime, and a few more are located in `[Tauri repo root]/core/tauri-(macros/utils)`. The easiest way to test your changes is to use the `[Tauri repo root]/examples/helloworld` app. It automatically rebuilds and uses your local copy of the Tauri core packages. Just run `cargo run --example helloworld` after making changes to test them out.
The code for the Rust crates, including the Core, Macros, Utils, WRY runtime, and a few more are located in `[Tauri repo root]/crates/tauri-(macros/utils)`. The easiest way to test your changes is to use the `[Tauri repo root]/examples/helloworld` app. It automatically rebuilds and uses your local copy of the Tauri core packages. Just run `cargo run --example helloworld` after making changes to test them out.
#### Building the documentation locally
@@ -78,7 +78,7 @@ $ RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features --open
### Developing the JS API
The JS API provides bindings between the developer's JS in the Webview and the builtin Tauri APIs, written in Rust. Its code is located in `[Tauri repo root]/tooling/api`. After making changes to the code, run `pnpm build` to build it. To test your changes, we recommend using the API example app, located in `[Tauri repo root]/examples/api`. It will automatically use your local copy of the JS API and provides a helpful UI to test the various commands.
The JS API provides bindings between the developer's JS in the Webview and the builtin Tauri APIs, written in Rust. Its code is located in `[Tauri repo root]/packages/api`. After making changes to the code, run `pnpm build` to build it. To test your changes, we recommend using the API example app, located in `[Tauri repo root]/examples/api`. It will automatically use your local copy of the JS API and provides a helpful UI to test the various commands.
## Financial Contribution

View File

@@ -5,7 +5,7 @@
name: 💡 Feature Request
title: '[feat] '
description: Suggest an idea
labels: 'type: feature request'
labels: ['type: feature request']
body:
- type: textarea

View File

@@ -5,7 +5,7 @@ Before submitting a PR, please read https://github.com/tauri-apps/tauri/blob/dev
Examples of good title:
- fix(windows): fix race condition in event loop
- docs: update docstrings
- docs: update example for `App::show`
- feat: add `Window::set_fullscreen`
Examples of bad title:

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -37,5 +37,5 @@ jobs:
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: '18'
node-version: 'lts/*'
- run: pnpm audit

View File

@@ -8,11 +8,11 @@ on:
push:
branches:
- dev
- 1.x
workflow_dispatch:
pull_request:
paths:
- '.github/workflows/bench.yml'
- 'bench/**'
env:
RUST_BACKTRACE: 1
@@ -45,7 +45,7 @@ jobs:
targets: ${{ matrix.platform.target }}
- name: setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: x64
@@ -55,7 +55,7 @@ jobs:
python -m pip install --upgrade pip
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libwebkit2gtk-4.1-dev libayatana-appindicator3-dev \
webkit2gtk-4.1 libayatana-appindicator3-dev \
xvfb \
at-spi2-core
wget https://github.com/sharkdp/hyperfine/releases/download/v1.18.0/hyperfine_1.18.0_amd64.deb
@@ -63,15 +63,13 @@ jobs:
pip install memory_profiler
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
core -> ../target
tooling/bench/tests
- name: run benchmarks
run: |
cargo build --release -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --target ${{ matrix.platform.target }} --manifest-path tooling/bench/tests/Cargo.toml
xvfb-run --auto-servernum cargo run --manifest-path tooling/bench/Cargo.toml --bin run_benchmark
cargo build --manifest-path bench/tests/cpu_intensive/src-tauri/Cargo.toml --release -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --target ${{ matrix.platform.target }}
cargo build --manifest-path bench/tests/files_transfer/src-tauri/Cargo.toml --release -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --target ${{ matrix.platform.target }}
cargo build --manifest-path bench/tests/helloworld/src-tauri/Cargo.toml --release -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --target ${{ matrix.platform.target }}
xvfb-run --auto-servernum cargo run --manifest-path bench/Cargo.toml --bin run_benchmark
- name: clone benchmarks_results
if: github.repository == 'tauri-apps/tauri' && github.ref == 'refs/heads/dev'
@@ -84,7 +82,7 @@ jobs:
- name: push new benchmarks
if: github.repository == 'tauri-apps/tauri' && github.ref == 'refs/heads/dev'
run: |
cargo run --manifest-path tooling/bench/Cargo.toml --bin build_benchmark_jsons
cargo run --manifest-path bench/Cargo.toml --bin build_benchmark_jsons
cd gh-pages
git pull
git config user.name "tauri-bench"

View File

@@ -19,7 +19,19 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
- name: check change files end with .md
run: |
for file in .changes/*
do
if [[ ! "$file" =~ \.(md|json)$ ]]; then
echo ".changes directory should only contain files that end with .md"
echo "found an invalid file in .changes directory:"
echo "$file"
exit 1
fi
done
- uses: dorny/paths-filter@v3
id: filter
with:
list-files: shell

View File

@@ -8,11 +8,11 @@ on:
pull_request:
paths:
- '.github/workflows/check-generated-files.yml'
- 'tooling/api/src/**'
- 'core/tauri/scripts/bundle.global.js'
- 'core/tauri-utils/src/config.rs'
- 'tooling/cli/schema.json'
- 'core/tauri-config-schema/schema.json'
- 'packages/api/src/**'
- 'crates/tauri/scripts/bundle.global.js'
- 'crates/tauri-utils/src/config.rs'
- 'crates/tauri-cli/config.schema.json'
- 'crates/tauri-schema-generator/schemas/*.json'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -26,18 +26,17 @@ jobs:
schema: ${{ steps.filter.outputs.schema }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
api:
- 'tooling/api/src/**'
- 'core/tauri/scripts/bundle.global.js'
- 'packages/api/src/**'
- 'crates/tauri/scripts/bundle.global.js'
schema:
- 'core/tauri-utils/src/config.rs'
- 'tooling/cli/schema.json'
- 'core/tauri-config-schema/schema.json'
- 'core/tauri-acl-schema/*.json'
- 'crates/tauri-utils/src/config.rs'
- 'crates/tauri-cli/config.schema.json'
- 'crates/tauri-schema-generator/schemas/*.json'
api:
runs-on: ubuntu-latest
@@ -45,10 +44,17 @@ jobs:
if: needs.changes.outputs.api == 'true'
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'pnpm'
- name: install deps
run: pnpm i --frozen-lockfile
- name: build api
working-directory: tooling/api
run: pnpm i --frozen-lockfile && pnpm build
run: pnpm build
working-directory: packages/api
- name: check api
run: ./.scripts/ci/has-diff.sh
@@ -68,14 +74,9 @@ jobs:
sudo apt-get install -y libgtk-3-dev
- uses: Swatinem/rust-cache@v2
with:
workspaces: core -> ../target
- name: generate config schema
run: cargo build --manifest-path ./core/tauri-config-schema/Cargo.toml
- name: generate schemas
run: cargo build --manifest-path ./crates/tauri-schema-generator/Cargo.toml
- name: generate ACL schema
run: cargo build --manifest-path ./core/tauri-acl-schema/Cargo.toml
- name: check schema
- name: check schemas
run: ./.scripts/ci/has-diff.sh

View File

@@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
- uses: dorny/paths-filter@v3
id: filter
with:
list-files: shell

View File

@@ -1,231 +0,0 @@
# Copyright 2019-2024 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
name: covector version or publish
on:
push:
branches:
- 1.x
jobs:
msrv-list:
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- {
target: x86_64-pc-windows-msvc,
os: windows-latest,
toolchain: '1.61.0'
}
- {
target: x86_64-unknown-linux-gnu,
os: ubuntu-latest,
toolchain: '1.60.0'
}
- {
target: x86_64-apple-darwin,
os: macos-latest,
toolchain: '1.60.0'
}
steps:
- uses: actions/checkout@v4
- name: install rust ${{ matrix.platform.toolchain }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.platform.toolchain }}
target: ${{ matrix.platform.target }}
override: true
default: true
- name: install Linux dependencies
if: contains(matrix.platform.target, 'unknown-linux')
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
- uses: Swatinem/rust-cache@v2
- name: delete lockfile
run: rm Cargo.lock
- name: Downgrade crates with MSRV conflict
# The --precise flag can only be used once per invocation.
run: |
cargo update -p system-deps:6.2.0 --precise 6.1.1
cargo update -p toml:0.7.8 --precise 0.7.3
cargo update -p toml_edit:0.19.15 --precise 0.19.8
cargo update -p embed-resource --precise 2.3.0
cargo update -p toml_datetime --precise 0.6.1
cargo update -p serde_spanned --precise 0.6.1
cargo update -p winnow --precise 0.4.1
cargo update -p plist --precise 1.5.1
cargo update -p time --precise 0.3.15
cargo update -p ignore --precise 0.4.18
cargo update -p raw-window-handle --precise 0.5.0
cargo update -p cargo_toml:0.15.3 --precise 0.15.2
cargo update -p zbus --precise 3.13.0
cargo update -p zbus_names --precise 2.5.0
cargo update -p colored --precise 2.0.2
cargo update -p arboard --precise 3.2.1
cargo update -p tempfile --precise 3.6.0
cargo update -p serde_with:3.6.1 --precise 3.0.0
cargo update -p tokio --precise 1.29.0
cargo update -p flate2 --precise 1.0.26
cargo update -p h2 --precise 0.3.20
cargo update -p reqwest --precise 0.11.18
cargo update -p bstr --precise 1.6.2
cargo update -p cfg-expr:0.15.7 --precise 0.15.4
cargo update -p memchr --precise 2.6.2
cargo update -p async-executor --precise 1.5.1
cargo update -p proptest --precise 1.2.0
cargo update -p regex --precise 1.9.6
cargo update -p bstr --precise 1.6.2
cargo update -p backtrace --precise 0.3.68
cargo update -p blocking --precise 1.4.1
cargo update -p ignore --precise 0.4.18
cargo update -p regex --precise 1.9.6
cargo update -p globset --precise 0.4.13
cargo update -p crossbeam-channel --precise 0.5.8
cargo update -p crossbeam-utils --precise 0.8.16
cargo update -p image --precise 0.24.4
cargo update -p async-process --precise 1.7.0
cargo update -p is-terminal --precise 0.4.7
cargo update -p tar --precise 0.4.39
cargo update -p serde_json --precise 1.0.97
cargo update -p petgraph --precise 0.6.3
cargo update -p os_str_bytes --precise 6.5.1
cargo update -p thread_local --precise 1.1.7
- name: test build
run: cargo check --target ${{ matrix.platform.target }} --features tracing,compression,wry,linux-protocol-headers,isolation,custom-protocol,api-all,cli,updater,system-tray,windows7-compat,http-multipart,test
run-integration-tests:
runs-on: ${{ matrix.platform }}
needs: msrv-list
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: install stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: install Linux dependencies
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev libfuse2
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
core -> ../target
tooling/cli
- name: build CLI
uses: actions-rs/cargo@v1
with:
command: build
args: --manifest-path ./tooling/cli/Cargo.toml
- name: run integration tests
run: cargo test --test '*' -- --ignored
- name: run CLI tests
timeout-minutes: 30
run: |
cd ./tooling/cli/node
yarn
yarn build
yarn test
version-or-publish:
runs-on: ubuntu-latest
timeout-minutes: 65
outputs:
change: ${{ steps.covector.outputs.change }}
commandRan: ${{ steps.covector.outputs.commandRan }}
successfulPublish: ${{ steps.covector.outputs.successfulPublish }}
needs:
- run-integration-tests
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 14
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'
cache-dependency-path: tooling/*/yarn.lock
- name: cargo login
run: cargo login ${{ secrets.ORG_CRATES_IO_TOKEN }}
- name: git config
run: |
git config --global user.name "${{ github.event.pusher.name }}"
git config --global user.email "${{ github.event.pusher.email }}"
- name: covector version or publish (publish when no change files present)
uses: jbolda/covector/packages/action@covector-v0
id: covector
env:
NODE_AUTH_TOKEN: ${{ secrets.ORG_NPM_TOKEN }}
CARGO_AUDIT_OPTIONS: ${{ secrets.CARGO_AUDIT_OPTIONS }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: 'version-or-publish'
createRelease: true
- name: Create Pull Request With Versions Bumped
if: steps.covector.outputs.commandRan == 'version'
uses: tauri-apps/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: release/version-updates-v1
title: Apply Version Updates From Current Changes (v1)
commit-message: 'apply version updates'
labels: 'version updates'
body: ${{ steps.covector.outputs.change }}
- name: Trigger doc update
if: |
steps.covector.outputs.successfulPublish == 'true' &&
steps.covector.outputs.packagesPublished != ''
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.ORG_TAURI_BOT_PAT }}
repository: tauri-apps/tauri-docs
event-type: update-docs
- name: Trigger `@tauri-apps/cli` publishing workflow
if: |
steps.covector.outputs.successfulPublish == 'true' &&
contains(steps.covector.outputs.packagesPublished, '@tauri-apps/cli')
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.ORG_TAURI_BOT_PAT }}
event-type: publish-js-cli
client-payload: >-
{"releaseId": "${{ steps.covector.outputs['-tauri-apps-cli-releaseId'] }}" }
- name: Trigger `tauri-cli` publishing workflow
if: |
steps.covector.outputs.successfulPublish == 'true' &&
contains(steps.covector.outputs.packagesPublished, 'tauri-cli')
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.ORG_TAURI_BOT_PAT }}
event-type: publish-clirs

View File

@@ -24,6 +24,10 @@ jobs:
fetch-depth: 0
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: install stable
uses: dtolnay/rust-toolchain@stable
@@ -35,13 +39,9 @@ jobs:
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev libfuse2
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
core -> ../target
tooling/cli
- name: build CLI
run: cargo build --manifest-path ./tooling/cli/Cargo.toml
run: cargo build --manifest-path ./crates/tauri-cli/Cargo.toml
- name: run integration tests
run: cargo test --test '*' -- --ignored
@@ -49,7 +49,7 @@ jobs:
- name: run CLI tests
timeout-minutes: 30
run: |
cd ./tooling/cli/node
cd ./packages/cli
pnpm i --frozen-lockfile
pnpm build
pnpm test
@@ -76,7 +76,7 @@ jobs:
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'

View File

@@ -31,20 +31,20 @@ jobs:
run: cargo install cross --git https://github.com/cross-rs/cross
- name: Upload cross
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cross
path: '~/.cargo/bin/cross'
if-no-files-found: error
- name: build CLI
run: cargo build --manifest-path ./tooling/cli/Cargo.toml
run: cargo build --manifest-path ./crates/tauri-cli/Cargo.toml
- name: Upload CLI
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cargo-tauri
path: tooling/cli/target/debug/cargo-tauri
path: crates/tauri-cli/target/debug/cargo-tauri
if-no-files-found: error
docker:
@@ -70,16 +70,16 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 'lts/*'
- name: Download cross
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
name: cross
path: '~/.cargo/bin'
- name: Download CLI
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
name: cargo-tauri
path: 'examples/api'
@@ -112,7 +112,7 @@ jobs:
- name: Test
run: |
cd tooling/api
cd packages/api
pnpm i --frozen-lockfile && pnpm build
cd ../../examples/api
pnpm i --frozen-lockfile

51
.github/workflows/fmt.yml vendored Normal file
View File

@@ -0,0 +1,51 @@
# Copyright 2019-2024 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
name: check formatting
on:
pull_request:
jobs:
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install Rust stable and rustfmt
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: run cargo fmt
run: cargo fmt --all -- --check
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'pnpm'
- run: pnpm i --frozen-lockfile
- run: pnpm format:check
taplo:
name: taplo (.toml files)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: install taplo-cli
uses: taiki-e/install-action@v2
with:
tool: taplo-cli
- run: taplo fmt --check --diff

View File

@@ -1,70 +0,0 @@
# Copyright 2019-2024 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
name: lint core
on:
push:
branches:
- dev
- 1.x
pull_request:
paths:
- '.github/workflows/lint-core.yml'
- 'core/**'
- '!core/tauri/scripts/**'
- 'examples/**'
env:
RUST_BACKTRACE: 1
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install Rust stable and rustfmt
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: run cargo fmt
run: cargo fmt --all -- --check
clippy:
runs-on: ubuntu-latest
strategy:
matrix:
clippy:
- { args: '', key: 'empty' }
- { args: '--all-features', key: 'all' }
- { args: '--features custom-protocol', key: 'custom-protocol' }
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev
- name: install Rust stable with clippy
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
with:
workspaces: core -> ../target
save-if: ${{ matrix.clippy.key == 'all' }}
- name: Run clippy - ${{ matrix.clippy.key }}
run: cargo clippy --manifest-path ./core/tauri/Cargo.toml --all-targets ${{ matrix.clippy.args }} -- -D warnings

View File

@@ -8,26 +8,13 @@ on:
pull_request:
paths:
- '.github/workflows/lint-js.yml'
- 'tooling/cli/node/**'
- 'tooling/api/**'
- 'packages/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'pnpm'
- run: pnpm i --frozen-lockfile
- run: pnpm format:check
eslint:
runs-on: ubuntu-latest
steps:

View File

@@ -2,17 +2,16 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
name: lint cli
name: lint rust
on:
push:
branches:
- dev
- 1.x
pull_request:
paths:
- '.github/workflows/lint-cli.yml'
- 'tooling/cli/**'
- 'crates/**'
env:
RUST_BACKTRACE: 1
@@ -23,27 +22,13 @@ concurrency:
cancel-in-progress: true
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install Rust stable and rustfmt
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Run cargo fmt
run: cargo fmt --manifest-path ./tooling/cli/Cargo.toml --all -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install Rust stable and clippy
- name: install rust stable and clippy
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
@@ -51,11 +36,8 @@ jobs:
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.1 libayatana-appindicator3-dev
- uses: Swatinem/rust-cache@v2
with:
workspaces: tooling/cli
- name: run Clippy
run: cargo clippy --manifest-path ./tooling/cli/Cargo.toml --all-targets --all-features -- -D warnings
- run: cargo clippy --all-targets --all-features -- -D warnings

View File

@@ -18,7 +18,7 @@ on:
defaults:
run:
working-directory: tooling/cli/node/
working-directory: packages/cli/
jobs:
build:
@@ -48,14 +48,14 @@ jobs:
target: x86_64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
build: |
cd tooling/cli/node
cd packages/cli
pnpm build:release --target x86_64-unknown-linux-gnu
strip *.node
- host: ubuntu-20.04
target: x86_64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: |
cd tooling/cli/node
cd packages/cli
pnpm build:release
strip *.node
- host: macos-latest
@@ -67,7 +67,7 @@ jobs:
target: aarch64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
build: |
cd tooling/cli/node
cd packages/cli
pnpm build:release --target aarch64-unknown-linux-gnu
aarch64-unknown-linux-gnu-strip *.node
- host: ubuntu-20.04
@@ -84,11 +84,11 @@ jobs:
target: aarch64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: |
cd tooling/cli/node
cd packages/cli
rustup target add aarch64-unknown-linux-musl
pnpm build:release --target aarch64-unknown-linux-musl
/aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node
name: stable - ${{ matrix.settings.target }} - node@16
name: stable - ${{ matrix.settings.target }} - node@20
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v4
@@ -97,7 +97,7 @@ jobs:
uses: actions/setup-node@v4
if: ${{ !matrix.settings.docker }}
with:
node-version: 18
node-version: 20
cache: 'pnpm'
architecture: ${{ matrix.settings.architecture }}
- name: Install Rust
@@ -108,7 +108,7 @@ jobs:
- uses: Swatinem/rust-cache@v1
with:
key: ${{ matrix.settings.target }}
working-directory: 'tooling/cli/'
working-directory: 'crates/tauri-cli/'
if: ${{ matrix.settings.docker }}
- name: Setup toolchain
run: ${{ matrix.settings.setup }}
@@ -131,10 +131,10 @@ jobs:
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: bindings-${{ matrix.settings.target }}
path: tooling/cli/node/${{ env.APP_NAME }}.*.node
path: packages/cli/${{ env.APP_NAME }}.*.node
if-no-files-found: error
# build-freebsd:
# runs-on: macos-10.15
@@ -173,17 +173,17 @@ jobs:
# whoami
# env
# freebsd-version
# cd ./tooling/cli/node/
# cd ./packages/cli/
# pnpm i --frozen-lockfile --ignore-scripts
# pnpm build:release
# strip -x *.node
# rm -rf node_modules
# rm -rf ../target
# rm -rf ../../target
# - name: Upload artifact
# uses: actions/upload-artifact@v3
# uses: actions/upload-artifact@v4
# with:
# name: bindings-freebsd
# path: tooling/cli/node/${{ env.APP_NAME }}.*.node
# path: packages/cli/${{ env.APP_NAME }}.*.node
# if-no-files-found: error
test-macOS-windows-binding:
name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }}
@@ -212,10 +212,10 @@ jobs:
- name: Install dependencies
run: pnpm i --frozen-lockfile --ignore-scripts
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
name: bindings-${{ matrix.settings.target }}
path: 'tooling/cli/node/'
path: 'packages/cli/'
- name: List packages
run: ls -R .
shell: bash
@@ -243,10 +243,10 @@ jobs:
- name: Install dependencies
run: pnpm i --frozen-lockfile --ignore-scripts
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
name: bindings-x86_64-unknown-linux-gnu
path: 'tooling/cli/node/'
path: 'packages/cli'
- name: List packages
run: ls -R .
shell: bash
@@ -280,10 +280,10 @@ jobs:
- name: Install dependencies
run: pnpm i --frozen-lockfile --ignore-scripts
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
name: bindings-x86_64-unknown-linux-musl
path: 'tooling/cli/node/'
path: 'packages/cli/'
- name: List packages
run: ls -R .
shell: bash
@@ -319,15 +319,15 @@ jobs:
run: ls -R .
shell: bash
- name: Download aarch64-gnu artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
name: bindings-aarch64-unknown-linux-gnu
path: 'tooling/cli/node/'
path: 'packages/cli'
- name: Download armv7-gnueabihf artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
name: bindings-armv7-unknown-linux-gnueabihf
path: 'tooling/cli/node/'
path: 'packages/cli/'
# TODO: actually run test, blocked by https://github.com/rust-lang/cargo/issues/8719
- uses: addnab/docker-run-action@v3
with:
@@ -345,7 +345,7 @@ jobs:
eval "$(fnm env --use-on-cd)"
fnm install ${{ matrix.node }}
fnm use ${{ matrix.node }}
cd tooling/cli/node
cd packages/cli
node tauri.js --help
ls -la
publish:
@@ -371,9 +371,9 @@ jobs:
- name: Install dependencies
run: pnpm i --frozen-lockfile --ignore-scripts
- name: Download all artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
path: tooling/cli/node/artifacts
path: packages/cli/artifacts
- name: Move artifacts
run: pnpm artifacts
- name: List packages

View File

@@ -58,13 +58,13 @@ jobs:
sudo apt-get install -y libgtk-3-dev
- name: Build CLI
run: cargo build --manifest-path ./tooling/cli/Cargo.toml --profile release-size-optimized ${{ matrix.config.args }}
run: cargo build --manifest-path ./crates/tauri-cli/Cargo.toml --profile release-size-optimized ${{ matrix.config.args }}
- name: Upload CLI
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cargo-tauri-${{ matrix.config.rust_target }}${{ matrix.config.ext }}
path: tooling/cli/target/release-size-optimized/cargo-tauri${{ matrix.config.ext }}
path: target/release-size-optimized/cargo-tauri${{ matrix.config.ext }}
if-no-files-found: error
upload:
@@ -76,7 +76,7 @@ jobs:
uses: actions/checkout@v4
- name: Download built CLIs
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
path: outputs
@@ -84,7 +84,7 @@ jobs:
run: ./.scripts/ci/pack-cli.sh
- name: Get CLI version
run: echo "CLI_VERSION=$(cat tooling/cli/metadata-v2.json | jq '."cli.js".version' -r)" >> $GITHUB_ENV
run: echo "CLI_VERSION=$(cat crates/tauri-cli/metadata-v2.json | jq '."cli.js".version' -r)" >> $GITHUB_ENV
- name: Publish release
uses: softprops/action-gh-release@50195ba7f6f93d1ac97ba8332a178e008ad176aa

View File

@@ -10,7 +10,6 @@ on:
push:
branches:
- dev
- 1.x
paths:
- '.github/workflows/supply-chain.yml'
- '**/Cargo.lock'

View File

@@ -8,13 +8,13 @@ on:
pull_request:
paths:
- '.github/workflows/test-android.yml'
- 'tooling/cli/templates/mobile/android/**'
- 'tooling/cli/src/mobile/**'
- '!tooling/cli/src/mobile/ios.rs'
- '!tooling/cli/src/mobile/ios/**'
- 'core/tauri-build/src/mobile.rs'
- 'core/tauri/mobile/android/**'
- 'core/tauri/mobile/android-codegen/**'
- 'crates/tauri-cli/templates/mobile/android/**'
- 'crates/tauri-cli/src/mobile/**'
- '!crates/tauri-cli/src/mobile/ios.rs'
- '!crates/tauri-cli/src/mobile/ios/**'
- 'crates/tauri-build/src/mobile.rs'
- 'crates/tauri/mobile/android/**'
- 'crates/tauri/mobile/android-codegen/**'
workflow_dispatch:
concurrency:
@@ -46,7 +46,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: lts/*
cache: 'pnpm'
- uses: actions/setup-java@v3
@@ -75,29 +75,23 @@ jobs:
done
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
tooling/cli
examples/api/src-tauri
- name: build CLI
run: cargo build --manifest-path ./tooling/cli/Cargo.toml
run: cargo build --manifest-path ./crates/tauri-cli/Cargo.toml
- name: move CLI to cargo bin dir
if: matrix.platform != 'windows-latest'
run: mv ./tooling/cli/target/debug/cargo-tauri $HOME/.cargo/bin
run: mv ./target/debug/cargo-tauri $HOME/.cargo/bin
- name: move CLI to cargo bin dir
if: matrix.platform == 'windows-latest'
run: mv ./tooling/cli/target/debug/cargo-tauri.exe $HOME/.cargo/bin
run: mv ./target/debug/cargo-tauri.exe $HOME/.cargo/bin
- run: pnpm i --frozen-lockfile
- name: build Tauri API
working-directory: ./tooling/api
run: pnpm i --frozen-lockfile && pnpm build
- name: install API example dependencies
working-directory: ./examples/api
run: pnpm i --frozen-lockfile
working-directory: ./packages/api
run: pnpm build
- name: init Android Studio project
working-directory: ./examples/api

View File

@@ -8,12 +8,11 @@ on:
push:
branches:
- dev
- 1.x
pull_request:
paths:
- '.github/workflows/test-cli-js.yml'
# currently` @tauri-apps/cli` only tests the template
- 'tooling/cli/templates/app/**'
- 'crates/tauri-cli/templates/app/**'
env:
RUST_BACKTRACE: 1
@@ -42,7 +41,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 'lts/*'
cache: 'pnpm'
- name: install Linux dependencies
@@ -52,15 +51,11 @@ jobs:
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
tooling/cli
tooling/cli/node/test/jest/fixtures/empty/src-tauri
- name: test
timeout-minutes: 30
run: |
cd ./tooling/cli/node
cd ./packages/cli
pnpm i --frozen-lockfile
pnpm build
pnpm test

View File

@@ -8,13 +8,12 @@ on:
push:
branches:
- dev
- 1.x
pull_request:
paths:
- '.github/workflows/test-cli-rs.yml'
- 'core/tauri-utils/**'
- 'tooling/bundler/**'
- 'tooling/cli/**'
- 'crates/tauri-utils/**'
- 'crates/tauri-bundler/**'
- 'crates/tauri-cli/**'
env:
RUST_BACKTRACE: 1
@@ -53,11 +52,9 @@ jobs:
if: matrix.platform.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.1 libayatana-appindicator3-dev
- uses: Swatinem/rust-cache@v2
with:
workspaces: tooling/cli
- name: test CLI
run: cargo test --manifest-path ./tooling/cli/Cargo.toml ${{ matrix.platform.args }}
run: cargo test --manifest-path ./crates/tauri-cli/Cargo.toml ${{ matrix.platform.args }}

View File

@@ -8,12 +8,15 @@ on:
push:
branches:
- dev
- 1.x
pull_request:
paths:
- '.github/workflows/test-core.yml'
- 'core/**'
- '!core/tauri/scripts/**'
- 'crates/**'
- '!crates/tauri/scripts/**'
- '!crates/tauri-cli/**'
- '!crates/tauri-bundler/**'
- '!crates/tauri-macos-sign/**'
- '!crates/tauri-schema-generator/**'
env:
RUST_BACKTRACE: 1
@@ -34,35 +37,35 @@ jobs:
- {
target: x86_64-pc-windows-msvc,
os: windows-latest,
toolchain: '1.70.0',
toolchain: '1.71.0',
cross: false,
command: 'test'
}
- {
target: x86_64-unknown-linux-gnu,
os: ubuntu-latest,
toolchain: '1.70.0',
toolchain: '1.71.0',
cross: false,
command: 'test'
}
- {
target: aarch64-apple-darwin,
os: macos-14,
toolchain: '1.70.0',
toolchain: '1.71.0',
cross: false,
command: 'test'
}
- {
target: aarch64-apple-ios,
os: macos-latest,
toolchain: '1.70.0',
toolchain: '1.71.0',
cross: false,
command: 'build'
}
- {
target: aarch64-linux-android,
os: ubuntu-latest,
toolchain: '1.70.0',
toolchain: '1.71.0',
cross: true,
command: 'build'
}
@@ -88,16 +91,15 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
prefix-key: v2
workspaces: core -> ../target
save-if: ${{ matrix.features.key == 'all' }}
- name: test
if: ${{ !matrix.platform.cross }}
run: cargo ${{ matrix.platform.command }} --target ${{ matrix.platform.target }} ${{ matrix.features.args }} --manifest-path crates/tauri/Cargo.toml
- name: test (using cross)
if: ${{ matrix.platform.cross }}
# update or remove the rev once we update the MSRV from 1.70.0
# update or remove the rev once we update the MSRV from 1.71.0
run: |
cargo install cross --git https://github.com/cross-rs/cross --rev 20c73df79c9aaf78a2ad2e9fe8ae981668a729dc --locked
cross ${{ matrix.platform.command }} --target ${{ matrix.platform.target }} ${{ matrix.features.args }}
- name: test (using cargo)
if: ${{ !matrix.platform.cross }}
run: cargo ${{ matrix.platform.command }} --target ${{ matrix.platform.target }} ${{ matrix.features.args }}
cross ${{ matrix.platform.command }} --target ${{ matrix.platform.target }} ${{ matrix.features.args }} --manifest-path crates/tauri/Cargo.toml

View File

@@ -1,79 +0,0 @@
# Copyright 2019-2024 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
name: test and lint bundler
on:
push:
branches:
- dev
- 1.x
pull_request:
paths:
- '.github/workflows/test-bundler.yml'
- 'tooling/bundler/**'
env:
RUST_BACKTRACE: 1
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: install stable
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: tooling/bundler
- name: test
run: |
cd ./tooling/bundler
cargo test
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install Rust stable and rustfmt
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Run cargo fmt
run: cargo fmt --manifest-path ./tooling/bundler/Cargo.toml --all -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install Rust stable and clippy
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
with:
workspaces: tooling/bundler
- name: clippy check
run: cargo clippy --manifest-path ./tooling/bundler/Cargo.toml --all-targets -- -D warnings

View File

@@ -8,7 +8,6 @@ on:
push:
branches:
- dev
- 1.x
env:
RUST_BACKTRACE: 1
@@ -33,29 +32,31 @@ jobs:
cli: ${{ steps.filter.outputs.cli }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
tauri:
- 'core/tauri/**'
- '!core/tauri/scripts/**'
- 'crates/tauri/**'
- '!crates/tauri/scripts/**'
build:
- 'core/tauri-build/**'
- 'crates/tauri-build/**'
codegen:
- 'core/tauri-codegen/**'
- 'crates/tauri-codegen/**'
macros:
- 'core/tauri-macros/**'
- 'crates/tauri-macros/**'
runtime:
- 'core/tauri-runtime/**'
- 'crates/tauri-runtime/**'
wry:
- 'core/tauri-runtime-wry/**'
- 'crates/tauri-runtime-wry/**'
utils:
- 'core/tauri-utils/**'
- 'crates/tauri-utils/**'
bundler:
- 'tooling/bundler/**'
- 'crates/tauri-bundler/**'
cli:
- 'tooling/cli/**'
- 'crates/tauri-cli/**'
macossign:
- 'crates/tauri-macos-sign/**'
setup:
runs-on: ubuntu-latest
@@ -69,7 +70,8 @@ jobs:
needs.changes.outputs.wry == 'true' ||
needs.changes.outputs.utils == 'true' ||
needs.changes.outputs.bundler == 'true' ||
needs.changes.outputs.cli == 'true'
needs.changes.outputs.cli == 'true' ||
needs.changes.outputs.macossign == 'true'
steps:
- uses: actions/checkout@v4
@@ -81,7 +83,7 @@ jobs:
run: cargo install cargo-udeps --locked --force
- name: Upload udeps
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: udeps
path: '~/.cargo/bin/cargo-udeps'
@@ -99,17 +101,19 @@ jobs:
UTILS: ${{ needs.changes.outputs.utils == 'true' }}
BUNDLER: ${{ needs.changes.outputs.bundler == 'true' }}
CLI: ${{ needs.changes.outputs.cli == 'true' }}
MACOSSIGN: ${{ needs.changes.outputs.macossign == 'true' }}
run: |
crates=()
if [ "${TAURI}" == "true" ]; then crates[${#crates[@]}]="\"./core/tauri\""; fi
if [ "${BUILD}" == "true" ]; then crates[${#crates[@]}]="\"./core/tauri-build\""; fi
if [ "${CODEGEN}" == "true" ]; then crates[${#crates[@]}]="\"./core/tauri-codegen\""; fi
if [ "${MACROS}" == "true" ]; then crates[${#crates[@]}]="\"./core/tauri-macros\""; fi
if [ "${RUNTIME}" == "true" ]; then crates[${#crates[@]}]="\"./core/tauri-runtime\""; fi
if [ "${WRY}" == "true" ]; then crates[${#crates[@]}]="\"./core/tauri-runtime-wry\""; fi
if [ "${UTILS}" == "true" ]; then crates[${#crates[@]}]="\"./core/tauri-utils\""; fi
if [ "${BUNDLER}" == "true" ]; then crates[${#crates[@]}]="\"./tooling/bundler\""; fi
if [ "${CLI}" == "true" ]; then crates[${#crates[@]}]="\"./tooling/cli\""; fi
if [ "${TAURI}" == "true" ]; then crates[${#crates[@]}]="\"./crates/tauri\""; fi
if [ "${BUILD}" == "true" ]; then crates[${#crates[@]}]="\"./crates/tauri-build\""; fi
if [ "${CODEGEN}" == "true" ]; then crates[${#crates[@]}]="\"./crates/tauri-codegen\""; fi
if [ "${MACROS}" == "true" ]; then crates[${#crates[@]}]="\"./crates/tauri-macros\""; fi
if [ "${RUNTIME}" == "true" ]; then crates[${#crates[@]}]="\"./crates/tauri-runtime\""; fi
if [ "${WRY}" == "true" ]; then crates[${#crates[@]}]="\"./crates/tauri-runtime-wry\""; fi
if [ "${UTILS}" == "true" ]; then crates[${#crates[@]}]="\"./crates/tauri-utils\""; fi
if [ "${BUNDLER}" == "true" ]; then crates[${#crates[@]}]="\"./crates/tauri-bundler\""; fi
if [ "${CLI}" == "true" ]; then crates[${#crates[@]}]="\"./crates/tauri-cli\""; fi
if [ "${MACOSSIGN}" == "true" ]; then crates[${#crates[@]}]="\"./crates/tauri-macos-sign\""; fi
echo "matrix=[$crates]" >> "$GITHUB_OUTPUT"
outputs:
matrix: ${{ steps.create-matrix.outputs.matrix }}
@@ -132,14 +136,9 @@ jobs:
sudo apt-get install -y libgtk-3-dev
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
core -> ../target
tooling/cli
tooling/bundler
- name: Download udeps
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
name: udeps
path: '~/.cargo/bin'

105
.gitignore vendored
View File

@@ -1,89 +1,52 @@
# Logs
# dependency directories
node_modules/
# Optional npm and yarn cache directory
.npm/
.yarn/
# Output of 'npm pack'
*.tgz
# dotenv environment variables file
.env
# .vscode workspace settings file
.vscode/settings.json
# npm, yarn and bun lock files
package-lock.json
yarn.lock
bun.lockb
# rust compiled folders
target/
# test video for streaming example
streaming_example_test_video.mp4
# examples /gen directory
/examples/**/src-tauri/gen/
/bench/**/src-tauri/gen/
# logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# smoke-tests repo
/smoke-tests
# Runtime data
# runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Typescript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional yarn cache directory
.yarn
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# miscellaneous
/.vs
.DS_Store
.Thumbs.db
*.sublime*
.idea
debug.log
package-lock.json
.vscode/settings.json
*/.vscode/
proptest-regressions/
TODO.md
# rust compiled folders
target
# lock for libs
#/Cargo.lock Committed to prevent msrv checks from failing
/tooling/bench/tests/Cargo.lock
/yarn.lock
# ignore frida handlers
__handlers__/
# benches
gh-pages
test_video.mp4
# old cli directories
/tooling/cli.js
/tooling/cli.rs

View File

@@ -1,24 +0,0 @@
#!/bin/sh
# Copyright 2019-2024 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
. "$(dirname "$0")/_/husky.sh"
if [ -z "$(git diff --name-only tooling/api)" ]; then
echo "skipping api - no changes detected"
else
cd tooling/api
pnpm format
pnpm eslint:fix
cd ../..
fi
if [ -z "$(git diff --name-only tooling/cli/node)" ]; then
echo "skipping \`@tauri-apps/cli\` - no changes detected"
else
cd tooling/cli/node
pnpm format
cd ../../..
fi

View File

@@ -1,5 +1,4 @@
/.changes
/.husky
/audits
/.vscode
@@ -12,20 +11,20 @@ dist/
pnpm-lock.yaml
# autogenerated and minimized js file
core/tauri/scripts/bundle.global.js
crates/tauri/scripts/bundle.global.js
# this file is an IIFE, shouldn't be formatted
core/tauri/scripts/process-ipc-message-fn.js
crates/tauri/scripts/process-ipc-message-fn.js
# cli templates should be formatted manually
# it also includes invalid json files that
# prettier can't handle
tooling/cli/templates
crates/tauri-cli/templates
# autogenerated files
**/autogenerated/**/*.md
tooling/cli/node/index.js
tooling/cli/node/index.d.ts
packages/cli/index.js
packages/cli/index.d.ts
CHANGELOG.md
*schema.json
@@ -34,3 +33,4 @@ CHANGELOG.md
# examples /gen directory
examples/**/src-tauri/gen
bench/**/src-tauri/gen

View File

@@ -1,8 +1,5 @@
{
"singleQuote": true,
"semi": false,
"trailingComma": "none",
"overrides": [
{ "files": [".changes/**.md"], "options": { "singleQuote": false } }
]
"trailingComma": "none"
}

View File

@@ -1,55 +0,0 @@
#!/usr/bin/env pwsh
# Copyright 2019-2024 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
# note: you can pass in the cargo sub-commands used to check manually.
# allowed commands: check, clippy, fmt, test
# default: clippy, fmt, test
# set the script arguments if none are found
if(-Not $args) {
$args=@("clippy","fmt","test")
}
# exit the script early if the last command returned an error
function check_error {
if($LASTEXITCODE -ne 0 ) {
Exit $LASTEXITCODE
}
}
function run {
$command, $_args = $args
Write-Output "[$command]"
cargo $command --workspace --all-targets --all-features $_args
check_error
}
foreach ($command in $args) {
Switch ($command) {
"check" {
run check
break
}
"test" {
run test
break
}
"clippy" {
run clippy "--" -D warnings
break
}
"fmt" {
Write-Output "[$command] checking formatting"
cargo +nightly fmt "--" --check
check_error
}
default {
Write-Output "[cargo-check.ps1] Unknown cargo sub-command: $command"
Exit 1
}
}
}

View File

@@ -1,45 +0,0 @@
#!/usr/bin/env sh
# Copyright 2019-2024 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
# note: you can pass in the cargo sub-commands used to check manually.
# allowed commands: check, clippy, fmt, test
# default: clippy, fmt, test
# exit the script early if any of the commands return an error
set -e
# set the script arguments if none are found
if [ -z "$*" ]; then
set -- "clippy" "fmt" "test"
fi
# run n+1 times, where n is the amount of mutually exclusive features.
# the extra run is for all the crates without mutually exclusive features.
# as many features as possible are enabled at for each command
run() {
command=$1
shift 1
cargo "$command" --workspace --all-targets --all-features "$@"
}
for command in "$@"; do
case "$command" in
check | test)
run "$command"
;;
clippy)
run clippy -- -D warnings
;;
fmt)
echo "[$command] checking formatting"
cargo +nightly fmt -- --check
;;
*)
echo "[cargo-check.sh] Unknown cargo sub-command: $command"
exit 1
;;
esac
done

View File

@@ -4,10 +4,12 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
if git diff --quiet --ignore-submodules HEAD
git_output=$(git diff --ignore-submodules --name-only HEAD)
if [ -z "$git_output" ];
then
echo "working directory is clean"
echo "working directory is clean"
else
echo "found diff"
echo "found diff:"
echo "$git_output"
exit 1
fi

View File

@@ -10,7 +10,7 @@ for o in outputs/*; do
pushd "$o"
chmod +x cargo-tauri*
cp ../../tooling/cli/LICENSE* ../../tooling/cli/README.md .
cp ../../crates/tauri-cli/LICENSE* ../../crates/tauri-cli/README.md .
target=$(basename "$o" | cut -d. -f1)
if grep -qE '(apple|windows)' <<< "$target"; then

View File

@@ -6,7 +6,7 @@
/*
This script is solely intended to be run as part of the `covector version` step to
keep the `../tooling/cli/metadata.json` up to date with other version bumps. Long term
keep the `../../crates/tauri-cli/metadata-v2.json` up to date with other version bumps. Long term
we should look to find a more "rusty way" to import / "pin" a version value in our tauri-cli
rust binaries.
*/
@@ -15,10 +15,7 @@ const { readFileSync, writeFileSync } = require('fs')
const { resolve } = require('path')
const packageNickname = process.argv[2]
const filePath =
packageNickname === '@tauri-apps/cli'
? `../../../tooling/cli/metadata-v2.json`
: `../../tooling/cli/metadata-v2.json`
const filePath = resolve(__dirname, '../../crates/tauri-cli/metadata-v2.json')
const bump = process.argv[3]
let index = null
@@ -52,7 +49,7 @@ const inc = (version) => {
}
if (bump === 'premajor') {
const pre = JSON.parse(
readFileSync(resolve(filePath, '../../../.changes/pre.json'), 'utf-8')
readFileSync(resolve(__dirname, '../../.changes/pre.json'), 'utf-8')
)
return `${v.join('.')}-${pre.tag}.0`
}

View File

@@ -1,7 +0,0 @@
#!/bin/sh
# Copyright 2019-2024 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
docker build -t aarch64-unknown-linux-gnu:latest --file .docker/cross/aarch64.Dockerfile .docker/cross

View File

@@ -1,30 +0,0 @@
#!/usr/bin/env pwsh
# Copyright 2019-2024 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
echo "Building API definitions..."
cd tooling\api
pnpm i; pnpm build
cd ..\..
echo "Installing the Tauri Rust CLI..."
cd tooling\cli
cargo install --path .
cd ..\..
echo "Tauri Rust CLI installed. Run it with '$ cargo tauri [COMMAND]'."
$yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes"
$no = New-Object System.Management.Automation.Host.ChoiceDescription "&No"
$options = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no)
$result = $host.ui.PromptForChoice("Node.js CLI", "Do you want to install the Node.js CLI?", $options, 1)
switch ($result) {
0{
cd tooling\cli\node
pnpm i; pnpm build; pnpm link
cd ..\..
echo "Tauri Node.js CLI installed. use `pnpm link @tauri-apps/cli` and run it with '$ pnpm tauri [COMMAND]'."
}
}

View File

@@ -1,29 +0,0 @@
#!/usr/bin/env bash
# Copyright 2019-2024 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
echo "Building API definitions..."
cd tooling/api
pnpm i && pnpm build
cd ../..
echo "Building the Tauri Rust CLI..."
cd tooling/cli
cargo install --path .
cd ../..
echo "Tauri Rust CLI installed. Run it with '$ cargo tauri [COMMAND]'."
echo "Do you want to install the Node.js CLI?"
select yn in "Yes" "No"; do
case $yn in
Yes )
cd tooling/cli/node
pnpm i && pnpm build && pnpm link
cd ../../..
echo "Tauri Node.js CLI installed. use `pnpm link @tauri-apps/cli` and run it with '$ pnpm tauri [COMMAND]'."
break;;
No ) break;;
esac
done

View File

@@ -1,24 +0,0 @@
#!/usr/bin/env sh
# Copyright 2019-2024 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
declare -a examples=("api" "sidecar" "resources" "tauri-dynamic-lib" "workspace")
declare -a tooling=("bench" "cli" "webdriver")
for example in "${examples[@]}"
do
cd examples/$example/src-tauri
cargo update
cargo build
cd ../../..
done
for tooling in "${tooling[@]}"
do
cd tooling/$tooling
cargo update
cargo build
cd ../..
done

View File

@@ -1,66 +0,0 @@
: Copyright 2019-2024 Tauri Programme within The Commons Conservancy
: SPDX-License-Identifier: Apache-2.0
: SPDX-License-Identifier: MIT
@ECHO OFF
REM Copyright 2019-2024 Tauri Programme within The Commons Conservancy
REM SPDX-License-Identifier: Apache-2.0
REM SPDX-License-Identifier: MIT
ECHO Make EXE From BAT
ECHO.
ECHO.
REM Usage:
REM MakeExeFromBat BatFileToConvert [IncludeFile1] [IncludeFile2] [...]
REM
REM Required Parameters:
REM BatFileToConvert
REM Source batch file to use to produce the output Exe file.
REM
REM Optional Parameters:
REM IncludeFile
REM Additional files to include in the Exe file.
REM You can include external tools used by the batch file so they are available on the executing machine.
SETLOCAL
REM Configuration (no quotes needed):
SET PathTo7Zip=
REM ---- Do not modify anything below this line ----
SET OutputFile="%~n1.exe"
SET SourceFiles="%TEMP%MakeEXE_files.txt"
SET Config="%TEMP%MakeEXE_config.txt"
SET Source7ZFile="%Temp%MakeEXE.7z"
REM Remove existing files
IF EXIST %OutputFile% DEL %OutputFile%
REM Build source archive
ECHO "%~dpnx1" > %SourceFiles%
:AddInclude
IF {%2}=={} GOTO EndInclude
ECHO "%~dpnx2" >> %SourceFiles%
SHIFT /2
GOTO AddInclude
:EndInclude
"%PathTo7Zip%7za.exe" a %Source7ZFile% @%SourceFiles%
REM Build config file
ECHO ;!@Install@!UTF-8! > %Config%
ECHO RunProgram="%~nx1" >> %Config%
ECHO ;!@InstallEnd@! >> %Config%
REM Build EXE
COPY /B "%PathTo7Zip%7zsd.sfx" + %Config% + %Source7ZFile% %OutputFile%
REM Clean up
IF EXIST %SourceFiles% DEL %SourceFiles%
IF EXIST %Config% DEL %Config%
IF EXIST %Source7ZFile% DEL %Source7ZFile%
ENDLOCAL

16
.taurignore Normal file
View File

@@ -0,0 +1,16 @@
.changes
.devcontainer
.docker
.github
.scripts
.vscode
audits
bench
packages/api
packages/cli
crates/tauri-cli
crates/tauri-bundler
crates/tauri-driver
crates/tauri-macos-sign
crates/tauri-schema-generator
crates/tests

View File

@@ -1,7 +1,8 @@
{
"recommendations": [
"ms-vscode-remote.vscode-remote-extensionpack",
"rust-lang.rust-analyzer",
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode"
"esbenp.prettier-vscode",
"tamasfe.even-better-toml"
]
}

View File

@@ -21,50 +21,50 @@ The following section briefly describes the roles of the various parts of Tauri.
### Tauri Core [STABLE RUST]
#### [tauri](https://github.com/tauri-apps/tauri/tree/dev/core/tauri)
#### [tauri](https://github.com/tauri-apps/tauri/tree/dev/crates/tauri)
This is the major crate that holds everything together. It brings the runtimes, macros, utilities and API into one final product. It reads the `tauri.conf.json` file at compile time in order to bring in features and undertake actual configuration of the app (and even the `Cargo.toml` file in the project's folder). It handles script injection (for polyfills / prototype revision) at runtime, hosts the API for systems interaction, and even manages updating.
#### [tauri-build](https://github.com/tauri-apps/tauri/tree/dev/core/tauri-build)
#### [tauri-build](https://github.com/tauri-apps/tauri/tree/dev/crates/tauri-build)
Apply the macros at build-time in order to rig some special features needed by `cargo`.
#### [tauri-codegen](https://github.com/tauri-apps/tauri/tree/dev/core/tauri-codegen)
#### [tauri-codegen](https://github.com/tauri-apps/tauri/tree/dev/crates/tauri-codegen)
- Embed, hash, and compress assets, including icons for the app as well as the system-tray.
- Parse `tauri.conf.json` at compile time and generate the Config struct.
#### [tauri-macros](https://github.com/tauri-apps/tauri/tree/dev/core/tauri-macros)
#### [tauri-macros](https://github.com/tauri-apps/tauri/tree/dev/crates/tauri-macros)
Create macros for the context, handler, and commands by leveraging the `tauri-codegen` crate.
#### [tauri-runtime](https://github.com/tauri-apps/tauri/tree/dev/core/tauri-runtime)
#### [tauri-runtime](https://github.com/tauri-apps/tauri/tree/dev/crates/tauri-runtime)
This is the glue layer between tauri itself and lower level webview libraries.
#### [tauri-runtime-wry](https://github.com/tauri-apps/tauri/tree/dev/core/tauri-runtime-wry)
#### [tauri-runtime-wry](https://github.com/tauri-apps/tauri/tree/dev/crates/tauri-runtime-wry)
This crate opens up direct systems-level interactions specifically for WRY, such as printing, monitor detection, and other windowing related tasks. `tauri-runtime` implementation for WRY.
#### [tauri-utils](https://github.com/tauri-apps/tauri/tree/dev/core/tauri-utils)
#### [tauri-utils](https://github.com/tauri-apps/tauri/tree/dev/crates/tauri-utils)
This is common code that is reused in many places and offers useful utilities like parsing configuration files, detecting platform triples, injecting the CSP, and managing assets.
### Tauri Tooling
#### [@tauri-apps/api](https://github.com/tauri-apps/tauri/tree/dev/tooling/api) [TS -> JS]
#### [@tauri-apps/api](https://github.com/tauri-apps/tauri/tree/dev/packages/api) [TS -> JS]
A TypeScript library that creates `cjs` and `esm` JavaScript endpoints for you to import into your Frontend framework so that the Webview can call and listen to backend activity. We also ship the pure TypeScript, because for some frameworks this is more optimal. It uses the message passing of webviews to their hosts.
#### [bundler](https://github.com/tauri-apps/tauri/tree/dev/tooling/bundler) [RUST / SHELL]
#### [bundler](https://github.com/tauri-apps/tauri/tree/dev/crates/tauri-bundler) [RUST / SHELL]
The bundler is a library that builds a Tauri App for the platform triple it detects / is told. At the moment it currently supports macOS, Windows and Linux - but in the near future will support mobile platforms as well. May be used outside of Tauri projects.
#### [@tauri-apps/cli](https://github.com/tauri-apps/tauri/tree/dev/tooling/cli/node) [JS]
#### [@tauri-apps/cli](https://github.com/tauri-apps/tauri/tree/dev/packages/cli) [JS]
It is a wrapper around [tauri-cli](https://github.com/tauri-apps/tauri/blob/dev/tooling/cli) using [napi-rs](https://github.com/napi-rs/napi-rs) to produce NPM packages for each platform.
It is a wrapper around [tauri-cli](https://github.com/tauri-apps/tauri/blob/dev/crates/tauri-cli) using [napi-rs](https://github.com/napi-rs/napi-rs) to produce NPM packages for each platform.
#### [tauri-cli](https://github.com/tauri-apps/tauri/tree/dev/tooling/cli) [RUST]
#### [tauri-cli](https://github.com/tauri-apps/tauri/tree/dev/crates/tauri-cli) [RUST]
This rust executable provides the full interface to all of the required activities for which the CLI is required. It will run on macOS, Windows, and Linux.

4817
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,32 +1,38 @@
[workspace]
resolver = "2"
members = [
# core
"core/tauri",
"core/tauri-runtime",
"core/tauri-runtime-wry",
"core/tauri-macros",
"core/tauri-utils",
"core/tauri-build",
"core/tauri-codegen",
"core/tauri-config-schema",
"core/tauri-acl-schema",
"core/tauri-plugin",
"crates/tauri",
"crates/tauri-runtime",
"crates/tauri-runtime-wry",
"crates/tauri-macros",
"crates/tauri-utils",
"crates/tauri-build",
"crates/tauri-codegen",
"crates/tauri-plugin",
"crates/tauri-schema-generator",
"crates/tauri-cli",
"crates/tauri-bundler",
"crates/tauri-macos-sign",
"crates/tauri-driver",
# @tauri-apps/cli rust project
"packages/cli",
# integration tests
"core/tests/restart",
"core/tests/acl",
]
"crates/tests/restart",
"crates/tests/acl",
exclude = [
# examples that can be compiled with the tauri CLI
"examples/api/src-tauri",
"examples/resources/src-tauri",
"examples/web/core",
# bench
"bench",
"bench/tests/cpu_intensive/src-tauri",
"bench/tests/files_transfer/src-tauri",
"bench/tests/helloworld/src-tauri",
# examples
"examples/file-associations/src-tauri",
"examples/workspace",
"examples/plugins/tauri-plugin-example",
"examples/api/src-tauri",
"examples/api/src-tauri/tauri-plugin-sample",
]
resolver = "2"
[workspace.package]
authors = ["Tauri Programme within The Commons Conservancy"]
@@ -35,7 +41,7 @@ repository = "https://github.com/tauri-apps/tauri"
categories = ["gui", "web-programming"]
license = "Apache-2.0 OR MIT"
edition = "2021"
rust-version = "1.70"
rust-version = "1.71"
# default to small, optimized workspace release binaries
[profile.release]
@@ -45,6 +51,17 @@ lto = true
incremental = false
opt-level = "s"
# profiles for tauri-cli
[profile.dev.package.miniz_oxide]
opt-level = 3
[profile.release-size-optimized]
inherits = "release"
codegen-units = 1
lto = true
incremental = false
opt-level = "s"
# Temporary patch to schemars to preserve newlines in docstrings for our reference docs schemas
# See https://github.com/GREsau/schemars/issues/120 for reference
[patch.crates-io]

View File

@@ -1,11 +1,9 @@
workspace = {}
[package]
name = "tauri_bench"
version = "0.1.0"
authors = [ "Tauri Programme within The Commons Conservancy" ]
authors = ["Tauri Programme within The Commons Conservancy"]
edition = "2021"
rust-version = "1.70"
rust-version = "1.71"
license = "Apache-2.0 OR MIT"
description = "Cross-platform WebView rendering library"
repository = "https://github.com/tauri-apps/wry"
@@ -15,7 +13,7 @@ anyhow = "1.0.40"
time = { version = "0.3", features = ["formatting"] }
tempfile = "3.2.0"
serde_json = "1.0"
serde = { version = "1.0", features = [ "derive" ] }
serde = { version = "1.0", features = ["derive"] }
[[bin]]
name = "run_benchmark"

View File

@@ -1,6 +1,6 @@
# Tauri Bench
<img align="right" src="https://github.com/tauri-apps/tauri/raw/dev/app-icon.png" height="128" width="128">
<img align="right" src="https://github.com/tauri-apps/tauri/raw/dev/.github/icon.png" height="128" width="128">
[![status](https://img.shields.io/badge/Status-beta-green.svg)](https://github.com/tauri-apps/tauri)
[![License](https://img.shields.io/badge/License-MIT%20or%20Apache%202-green.svg)](https://opencollective.com/tauri)

View File

@@ -9,8 +9,8 @@
//! ***_Internal use only_**
#![doc(
html_logo_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png",
html_favicon_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png"
html_logo_url = "https://github.com/tauri-apps/tauri/raw/dev/.github/icon.png",
html_favicon_url = "https://github.com/tauri-apps/tauri/raw/dev/.github/icon.png"
)]
use std::{fs::File, io::BufReader};

View File

@@ -9,8 +9,8 @@
//! ***_Internal use only_**
#![doc(
html_logo_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png",
html_favicon_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png"
html_logo_url = "https://github.com/tauri-apps/tauri/raw/dev/.github/icon.png",
html_favicon_url = "https://github.com/tauri-apps/tauri/raw/dev/.github/icon.png"
)]
use anyhow::Result;
@@ -28,22 +28,19 @@ fn get_all_benchmarks() -> Vec<(String, String)> {
vec![
(
"tauri_hello_world".into(),
format!(
"tests/target/{}/release/bench_helloworld",
utils::get_target()
),
format!("../target/{}/release/bench_helloworld", utils::get_target()),
),
(
"tauri_cpu_intensive".into(),
format!(
"tests/target/{}/release/bench_cpu_intensive",
"../target/{}/release/bench_cpu_intensive",
utils::get_target()
),
),
(
"tauri_3mb_transfer".into(),
format!(
"tests/target/{}/release/bench_files_transfer",
"../target/{}/release/bench_files_transfer",
utils::get_target()
),
),
@@ -191,7 +188,7 @@ fn cargo_deps() -> HashMap<String, usize> {
cmd.args(["--edges", "normal"]);
cmd.args(["--prefix", "none"]);
cmd.args(["--target", target]);
cmd.current_dir(&utils::tauri_root_path());
cmd.current_dir(utils::tauri_root_path());
let full_deps = cmd.output().expect("failed to run cargo tree").stdout;
let full_deps = String::from_utf8(full_deps).expect("cargo tree output not utf-8");

View File

@@ -42,6 +42,12 @@ pub fn get_target() -> &'static str {
} else {
"x86_64-apple-darwin"
};
#[cfg(target_os = "ios")]
return if cfg!(target_arch = "aarch64") {
"aarch64-apple-ios"
} else {
"x86_64-apple-ios"
};
#[cfg(target_os = "linux")]
return "x86_64-unknown-linux-gnu";
#[cfg(target_os = "windows")]
@@ -50,7 +56,7 @@ pub fn get_target() -> &'static str {
pub fn target_dir() -> PathBuf {
bench_root_path()
.join("tests")
.join("..")
.join("target")
.join(get_target())
.join("release")
@@ -62,7 +68,7 @@ pub fn bench_root_path() -> PathBuf {
#[allow(dead_code)]
pub fn home_path() -> PathBuf {
#[cfg(any(target_os = "macos", target_os = "linux"))]
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "linux"))]
return PathBuf::from(env!("HOME"));
#[cfg(target_os = "windows")]
return PathBuf::from(env!("HOMEPATH"));
@@ -70,12 +76,7 @@ pub fn home_path() -> PathBuf {
#[allow(dead_code)]
pub fn tauri_root_path() -> PathBuf {
bench_root_path()
.parent()
.unwrap()
.parent()
.unwrap()
.to_path_buf()
bench_root_path().parent().unwrap().to_path_buf()
}
#[allow(dead_code)]
@@ -108,7 +109,7 @@ pub fn parse_max_mem(file_path: &str) -> Option<u64> {
let output = BufReader::new(file);
let mut highest: u64 = 0;
// MEM 203.437500 1621617192.4123
for line in output.lines().flatten() {
for line in output.lines().map_while(Result::ok) {
// split line by space
let split = line.split(' ').collect::<Vec<_>>();
if split.len() == 3 {

Some files were not shown because too many files have changed in this diff Show More