mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-11 10:43:31 +02:00
Compare commits
401 Commits
@tauri-app
...
@tauri-app
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
86f22f0ec9 | ||
|
|
3f6f07a1b8 | ||
|
|
60e86d5f6e | ||
|
|
b28435860c | ||
|
|
229d7f8e22 | ||
|
|
c561786844 | ||
|
|
6bf917941f | ||
|
|
8e8312bb82 | ||
|
|
f550a3f471 | ||
|
|
4d545ab3ca | ||
|
|
fabc2f283e | ||
|
|
6b3c82aa90 | ||
|
|
3781429147 | ||
|
|
15d6515eb1 | ||
|
|
b63353bd61 | ||
|
|
e8c0c57909 | ||
|
|
58392a5221 | ||
|
|
8061fb2da8 | ||
|
|
e835751d4f | ||
|
|
0a170d0716 | ||
|
|
03828587b5 | ||
|
|
5c4b830843 | ||
|
|
cbc095ec5f | ||
|
|
2a75c64b54 | ||
|
|
1b6b2cfaa1 | ||
|
|
17c6952aec | ||
|
|
7af01ff2ce | ||
|
|
100a4455aa | ||
|
|
4191a7a53d | ||
|
|
f37e97d410 | ||
|
|
058c0db72f | ||
|
|
f8994b214e | ||
|
|
c33bbf4574 | ||
|
|
129414faa4 | ||
|
|
12ffc19ce0 | ||
|
|
9f472591cc | ||
|
|
d25dd9e31d | ||
|
|
c43d5df158 | ||
|
|
1065f632f2 | ||
|
|
ac22950f39 | ||
|
|
a8105eccb2 | ||
|
|
888277ec40 | ||
|
|
0014f9ae69 | ||
|
|
8036c78e08 | ||
|
|
516c7d9f63 | ||
|
|
54cbf59b5a | ||
|
|
ce864cebfd | ||
|
|
ed78f52cd1 | ||
|
|
ccf20eb3ff | ||
|
|
d0c1189b91 | ||
|
|
0d31fe99c7 | ||
|
|
d4b3659523 | ||
|
|
8e083c99c8 | ||
|
|
8c6d1e8e6c | ||
|
|
6dea12a067 | ||
|
|
1f311832ab | ||
|
|
e0d1307d3f | ||
|
|
f0da0bde87 | ||
|
|
a5bf48eab0 | ||
|
|
7a1a3276c4 | ||
|
|
8ca0e4dd2c | ||
|
|
1367ff5ec6 | ||
|
|
fbb45c674c | ||
|
|
eb61d44f9f | ||
|
|
c8f55b615d | ||
|
|
bd1b2a1e85 | ||
|
|
37557ffa35 | ||
|
|
6cd917c227 | ||
|
|
8278a36318 | ||
|
|
f8b559dacd | ||
|
|
add09c8034 | ||
|
|
ea50f65f89 | ||
|
|
e1bf6ef8cb | ||
|
|
20c142f749 | ||
|
|
e4c9268b19 | ||
|
|
2e88633ba4 | ||
|
|
25cc5655c0 | ||
|
|
df83e5c7fc | ||
|
|
3cb73d08c6 | ||
|
|
ef2482ddec | ||
|
|
e3b09be7f0 | ||
|
|
bcf279278d | ||
|
|
68d4460361 | ||
|
|
f3f521f038 | ||
|
|
e75f0d27ef | ||
|
|
e63432fbfc | ||
|
|
627e90c304 | ||
|
|
1bfe2485bb | ||
|
|
4a2d51a73a | ||
|
|
6a768cb679 | ||
|
|
e55bd4ba7a | ||
|
|
61bffa4feb | ||
|
|
2d087ee4b7 | ||
|
|
069c05e44f | ||
|
|
b3563e3d6a | ||
|
|
d609bef9fd | ||
|
|
4731f0cf31 | ||
|
|
504bb8ec8c | ||
|
|
1d3f51e100 | ||
|
|
04fd3a7db5 | ||
|
|
eda5713eab | ||
|
|
3e9fd0665c | ||
|
|
a49a19ffa3 | ||
|
|
9102faa4b3 | ||
|
|
03e7590429 | ||
|
|
e2a4da027c | ||
|
|
e968b3d252 | ||
|
|
858b3516a0 | ||
|
|
4475fbb502 | ||
|
|
6d98f2462b | ||
|
|
6f3a2b38f0 | ||
|
|
0ab2b33064 | ||
|
|
983e7800b6 | ||
|
|
be683e2ac3 | ||
|
|
c7b9a53525 | ||
|
|
11b5e9c525 | ||
|
|
a08e6ffa6f | ||
|
|
6cfe7edf63 | ||
|
|
11e9f2eb83 | ||
|
|
f5d61822bf | ||
|
|
60a5aea53d | ||
|
|
e10fdb786c | ||
|
|
0c87e05513 | ||
|
|
25e7833701 | ||
|
|
354be36d4e | ||
|
|
12de4fa7c7 | ||
|
|
df24cb9442 | ||
|
|
de7414aab9 | ||
|
|
a49fc999fc | ||
|
|
1d8b67b297 | ||
|
|
d9d2502b41 | ||
|
|
58bab8b35b | ||
|
|
9e46e07784 | ||
|
|
95df53a2ed | ||
|
|
0b4495996d | ||
|
|
544328d5a3 | ||
|
|
5621174b05 | ||
|
|
2a654fdb8d | ||
|
|
a944b9b05b | ||
|
|
06718b4569 | ||
|
|
9af08f93e4 | ||
|
|
dfba0ede68 | ||
|
|
1efa5e7184 | ||
|
|
8f3f010e6d | ||
|
|
4078923f6b | ||
|
|
8d381a71e8 | ||
|
|
948772a657 | ||
|
|
e08c4e6888 | ||
|
|
cbe3bd80d8 | ||
|
|
ae12f3cc90 | ||
|
|
11db7be6c2 | ||
|
|
8d22c0c814 | ||
|
|
56e087471a | ||
|
|
d369e8db5f | ||
|
|
28169ae097 | ||
|
|
62b3a5cd1c | ||
|
|
67b8a9a17a | ||
|
|
f57a729cd8 | ||
|
|
3f1a8a4e7e | ||
|
|
8ab2e3cc3e | ||
|
|
9014a3f176 | ||
|
|
0ddfc59d67 | ||
|
|
b88e22a5fe | ||
|
|
40a45b564d | ||
|
|
62b52f60a2 | ||
|
|
a247170e1f | ||
|
|
fbff6388ad | ||
|
|
4f374a26a3 | ||
|
|
4d4e7bf318 | ||
|
|
cbdcee61dc | ||
|
|
96c1ec3b89 | ||
|
|
5ff0bbc547 | ||
|
|
09de8c6593 | ||
|
|
5f694c3d4c | ||
|
|
a1cce04260 | ||
|
|
ad294d274d | ||
|
|
ddf69157b5 | ||
|
|
9bb8fc6189 | ||
|
|
551e0624a9 | ||
|
|
e7fd676c27 | ||
|
|
e266f2f35e | ||
|
|
c530de4fd0 | ||
|
|
e5f0372775 | ||
|
|
58465d4f7d | ||
|
|
b1dacd539a | ||
|
|
a12bf148d6 | ||
|
|
bc4804d484 | ||
|
|
63264a2914 | ||
|
|
94e9d476ef | ||
|
|
5a0e922d40 | ||
|
|
4f44ebf8a7 | ||
|
|
db64d088ba | ||
|
|
0b00428365 | ||
|
|
71f4ca564b | ||
|
|
184f0ad22b | ||
|
|
54be2f72d7 | ||
|
|
44d54a0710 | ||
|
|
6c5340f8b2 | ||
|
|
35bd9dd3dc | ||
|
|
3ad2427dc0 | ||
|
|
5eb036f339 | ||
|
|
4ba7b94b59 | ||
|
|
def875193a | ||
|
|
b13cb208a3 | ||
|
|
00182ebf89 | ||
|
|
63649d82d2 | ||
|
|
a1e88d2b57 | ||
|
|
fe5ff1228c | ||
|
|
be18ed50d8 | ||
|
|
c901d9fdf9 | ||
|
|
9d468774a9 | ||
|
|
7eb1171e3a | ||
|
|
6566182258 | ||
|
|
d8ccf9d76a | ||
|
|
a5848af65b | ||
|
|
fafceec309 | ||
|
|
0a47bf0430 | ||
|
|
ffa33cd28a | ||
|
|
faa259bacf | ||
|
|
d9c8d3cc8d | ||
|
|
e568956e48 | ||
|
|
a655d9c6ce | ||
|
|
bdfa9534ab | ||
|
|
e885c17ab6 | ||
|
|
77056b194a | ||
|
|
0c46e48860 | ||
|
|
0899e50831 | ||
|
|
976cad97c1 | ||
|
|
11b3ab1468 | ||
|
|
431ca2c776 | ||
|
|
27d0183431 | ||
|
|
9c9644d155 | ||
|
|
b42683592d | ||
|
|
79de4332b6 | ||
|
|
5048a7293b | ||
|
|
f0acf504a2 | ||
|
|
ecc5362c1c | ||
|
|
6696e48800 | ||
|
|
c55474f21d | ||
|
|
6faa032766 | ||
|
|
82b084e65c | ||
|
|
5af1f5dec1 | ||
|
|
5ec74456b9 | ||
|
|
0d2efd9ff4 | ||
|
|
d7e5c00e94 | ||
|
|
cc799b2cc8 | ||
|
|
abfbef4b9d | ||
|
|
d14a2a55f0 | ||
|
|
ebfe17e264 | ||
|
|
f67a9eb6de | ||
|
|
431208207b | ||
|
|
f81929e251 | ||
|
|
d1c97bce7b | ||
|
|
f4bfd0722e | ||
|
|
36eee37220 | ||
|
|
22d2afa89b | ||
|
|
c85bb0fb61 | ||
|
|
fbe76a955a | ||
|
|
83ed090bfa | ||
|
|
84070bae92 | ||
|
|
edb2ca31f7 | ||
|
|
02b2f964a7 | ||
|
|
9718dc9e8c | ||
|
|
1e441811ee | ||
|
|
3a4972b394 | ||
|
|
72597a77f9 | ||
|
|
03f2a50981 | ||
|
|
fd68b7fdea | ||
|
|
dc0612b156 | ||
|
|
70306dc79b | ||
|
|
ad83d41cb5 | ||
|
|
c50800023e | ||
|
|
f86a8146ad | ||
|
|
fb6bf31425 | ||
|
|
21c2488d2e | ||
|
|
12e477ac38 | ||
|
|
073bb4f459 | ||
|
|
792340a73b | ||
|
|
09e9dc1aab | ||
|
|
5c369e6059 | ||
|
|
1dab93f000 | ||
|
|
8b96eca241 | ||
|
|
2d31aef759 | ||
|
|
58dda44a59 | ||
|
|
88bc357325 | ||
|
|
91e9e784aa | ||
|
|
07aff5a2d4 | ||
|
|
9620c58e5a | ||
|
|
c33adb19a7 | ||
|
|
dc49cb3d9b | ||
|
|
5f64ed2b78 | ||
|
|
f4d5241b37 | ||
|
|
1add13b84e | ||
|
|
7d9112edc7 | ||
|
|
620163bf23 | ||
|
|
660a5cd09e | ||
|
|
793ee05317 | ||
|
|
da8c9a7d30 | ||
|
|
9bcff3cd79 | ||
|
|
762cf31a11 | ||
|
|
1a60822a42 | ||
|
|
da381e07f3 | ||
|
|
086271b73e | ||
|
|
02f85dffbe | ||
|
|
30c7685eb8 | ||
|
|
ed04cc3d36 | ||
|
|
7796a8fc64 | ||
|
|
8d148a9e25 | ||
|
|
5c335ae9ad | ||
|
|
8ae52a615a | ||
|
|
77844529f3 | ||
|
|
9b99ebab17 | ||
|
|
b25545c53f | ||
|
|
c689521a76 | ||
|
|
6b63c75504 | ||
|
|
52fdcaaf28 | ||
|
|
ee0b53fbe2 | ||
|
|
23a912bb84 | ||
|
|
dcc62e6fc4 | ||
|
|
167a0feb31 | ||
|
|
1142289670 | ||
|
|
85c2d6302e | ||
|
|
07a5f505d9 | ||
|
|
30667714c0 | ||
|
|
3522fbd78e | ||
|
|
dd5b081eeb | ||
|
|
01f6aa3405 | ||
|
|
9e891933d8 | ||
|
|
8deb1966ac | ||
|
|
d39c392b7c | ||
|
|
6d7ac65676 | ||
|
|
1b0c447fcb | ||
|
|
10fb027b75 | ||
|
|
255d64e3dc | ||
|
|
d0510f52eb | ||
|
|
d1ee3f4b55 | ||
|
|
f712f31d1d | ||
|
|
8902dd8137 | ||
|
|
b5c948f68e | ||
|
|
360330136f | ||
|
|
659c7d2f5d | ||
|
|
9089d97637 | ||
|
|
b6dca99fff | ||
|
|
b160f9359d | ||
|
|
521d1d5cdb | ||
|
|
9f75d06228 | ||
|
|
39bf0a1635 | ||
|
|
78e22bedca | ||
|
|
f4cd68f040 | ||
|
|
f35bcda289 | ||
|
|
712f1049fa | ||
|
|
41c7a6646b | ||
|
|
f8d658ea1b | ||
|
|
fedf93eb7e | ||
|
|
b1d9ffa1ab | ||
|
|
794cf8234f | ||
|
|
9fe846615b | ||
|
|
20be073bc4 | ||
|
|
f228d3d3d4 | ||
|
|
3bec7b1595 | ||
|
|
3998570fd3 | ||
|
|
3beba92b5b | ||
|
|
f3837d5b98 | ||
|
|
71d00646a9 | ||
|
|
416f845784 | ||
|
|
2d47352a07 | ||
|
|
0afee5ed80 | ||
|
|
bfc49cc7a1 | ||
|
|
4bfe4880fb | ||
|
|
bba1a44191 | ||
|
|
92cac12a92 | ||
|
|
f65990d1d7 | ||
|
|
e91550bd86 | ||
|
|
88a9fa23e5 | ||
|
|
008b9f7481 | ||
|
|
a975cd7976 | ||
|
|
0bb7b0f352 | ||
|
|
213c0b1b8e | ||
|
|
ab4e56f5d2 | ||
|
|
f5dfc02800 | ||
|
|
5f56cb0a8b | ||
|
|
00e5a6ac74 | ||
|
|
10e30c5139 | ||
|
|
393428e5c8 | ||
|
|
9ed8fe8c92 | ||
|
|
8dc81b6cc2 | ||
|
|
02c00abc63 | ||
|
|
5be7607b26 | ||
|
|
a440a3f9d8 | ||
|
|
ab382f4ca9 | ||
|
|
2e8ab7bac1 | ||
|
|
a3cd9779a4 | ||
|
|
e2dc76cfbf | ||
|
|
8e1e15304e | ||
|
|
ca68689564 | ||
|
|
7e810cb2a3 | ||
|
|
725dbb7250 | ||
|
|
b9a4410516 | ||
|
|
fb1933f174 | ||
|
|
699319d8a7 | ||
|
|
206914fe8d |
9
.cargo/audit.toml
Normal file
9
.cargo/audit.toml
Normal file
@@ -0,0 +1,9 @@
|
||||
[advisories]
|
||||
ignore = [
|
||||
# rsa Marvin Attack
|
||||
"RUSTSEC-2023-0071",
|
||||
# difference is unmaintained
|
||||
"RUSTSEC-2020-0095",
|
||||
# proc-macro-error is unmaintained
|
||||
"RUSTSEC-2024-0370",
|
||||
]
|
||||
@@ -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"
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
"tauri": patch:enhance
|
||||
"tauri-codegen": patch:enhance
|
||||
---
|
||||
|
||||
Enhance `AssetResolver::get` in development mode by reading distDir directly as a fallback to the embedded assets.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"tauri": patch:bug
|
||||
---
|
||||
|
||||
Fix Specta remote implementation target for `Channel`.
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
"tauri-cli": "patch:enhance"
|
||||
"@tauri-apps/cli": "patch:enhance"
|
||||
---
|
||||
|
||||
Changes the default behavior of the `dev` command to only expose to localhost (`127.0.0.1`) instead of the default system interface.
|
||||
@@ -14,22 +14,25 @@
|
||||
"pkgManagers": {
|
||||
"rust": {
|
||||
"version": true,
|
||||
"getPublishedVersion": "node ../../.scripts/covector/package-latest-version.js cargo ${ pkgFile.pkg.package.name } ${ pkgFile.pkg.package.version }",
|
||||
"getPublishedVersion": {
|
||||
"use": "fetch:check",
|
||||
"options": {
|
||||
"url": "https://crates.io/api/v1/crates/${ pkg.pkgFile.pkg.package.name }/${ pkg.pkgFile.version }"
|
||||
}
|
||||
},
|
||||
"prepublish": [
|
||||
"sudo apt-get update",
|
||||
"sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev",
|
||||
"cargo install cargo-audit --features=fix",
|
||||
{
|
||||
"command": "echo '<details>\n<summary><em><h4>Cargo Audit</h4></em></summary>\n\n```'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "cargo generate-lockfile",
|
||||
"dryRunCommand": true,
|
||||
"runFromRoot": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "echo '<details>\n<summary><em><h4>Cargo Audit</h4></em></summary>\n\n```'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "cargo audit ${ process.env.CARGO_AUDIT_OPTIONS || '' }",
|
||||
"dryRunCommand": true,
|
||||
@@ -43,11 +46,6 @@
|
||||
}
|
||||
],
|
||||
"publish": [
|
||||
"sleep 15s",
|
||||
{
|
||||
"command": "cargo package --no-verify",
|
||||
"dryRunCommand": true
|
||||
},
|
||||
{
|
||||
"command": "echo '<details>\n<summary><em><h4>Cargo Publish</h4></em></summary>\n\n```'",
|
||||
"dryRunCommand": true,
|
||||
@@ -64,33 +62,34 @@
|
||||
"pipe": true
|
||||
}
|
||||
],
|
||||
"postpublish": [
|
||||
"git tag ${ pkg.pkg }-v${ pkgFile.versionMajor } -f",
|
||||
"git tag ${ pkg.pkg }-v${ pkgFile.versionMajor }.${ pkgFile.versionMinor } -f",
|
||||
"git push --tags -f"
|
||||
],
|
||||
"assets": [
|
||||
{
|
||||
"path": "./target/package/${ pkg.pkg }-${ pkgFile.version }.crate",
|
||||
"name": "${ pkg.pkg }-${ pkgFile.version }.crate"
|
||||
}
|
||||
]
|
||||
"postpublish": {
|
||||
"use": "fetch:check",
|
||||
"options": {
|
||||
"url": "https://crates.io/api/v1/crates/${ pkg.pkgFile.pkg.package.name }/${ pkg.pkgFile.version }"
|
||||
},
|
||||
"retries": [5000, 5000, 5000]
|
||||
}
|
||||
},
|
||||
"javascript": {
|
||||
"version": true,
|
||||
"getPublishedVersion": "node ../../.scripts/covector/package-latest-version.js npm ${ pkgFile.pkg.name } ${ pkgFile.pkg.version }",
|
||||
"getPublishedVersion": {
|
||||
"use": "fetch:check",
|
||||
"options": {
|
||||
"url": "https://registry.npmjs.com/${ pkg.pkgFile.pkg.name }/${ pkg.pkgFile.version }"
|
||||
}
|
||||
},
|
||||
"prepublish": [
|
||||
{
|
||||
"command": "yarn",
|
||||
"dryRunCommand": true
|
||||
},
|
||||
{
|
||||
"command": "echo '<details>\n<summary><em><h4>Yarn Audit</h4></em></summary>\n\n```'",
|
||||
"command": "echo '<details>\n<summary><em><h4>PNPM Audit</h4></em></summary>\n\n```'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "yarn audit",
|
||||
"command": "pnpm i --frozen-lockfile",
|
||||
"dryRunCommand": true
|
||||
},
|
||||
{
|
||||
"command": "pnpm audit",
|
||||
"dryRunCommand": true,
|
||||
"runFromRoot": true,
|
||||
"pipe": true
|
||||
@@ -99,22 +98,17 @@
|
||||
"command": "echo '```\n\n</details>\n'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "npm pack",
|
||||
"dryRunCommand": true
|
||||
}
|
||||
],
|
||||
"publish": [
|
||||
"sleep 15s",
|
||||
{
|
||||
"command": "echo '<details>\n<summary><em><h4>Yarn Publish</h4></em></summary>\n\n```'",
|
||||
"command": "echo '<details>\n<summary><em><h4>PNPM Publish</h4></em></summary>\n\n```'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "yarn publish --access public --loglevel silly --tag next",
|
||||
"dryRunCommand": "npm publish --dry-run --access public",
|
||||
"command": "pnpm publish --access public --loglevel silly --no-git-checks",
|
||||
"dryRunCommand": "npm publish --dry-run --access public --no-git-checks",
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
@@ -123,57 +117,27 @@
|
||||
"pipe": true
|
||||
}
|
||||
],
|
||||
"postpublish": [
|
||||
"git tag ${ pkg.pkg }-v${ pkgFile.versionMajor } -f",
|
||||
"git tag ${ pkg.pkg }-v${ pkgFile.versionMajor }.${ pkgFile.versionMinor } -f",
|
||||
"git push --tags -f"
|
||||
]
|
||||
"postpublish": {
|
||||
"use": "fetch:check",
|
||||
"options": {
|
||||
"url": "https://registry.npmjs.com/${ pkg.pkgFile.pkg.name }/${ pkg.pkgFile.version }"
|
||||
},
|
||||
"retries": [5000, 5000, 5000]
|
||||
}
|
||||
}
|
||||
},
|
||||
"packages": {
|
||||
"@tauri-apps/api": {
|
||||
"path": "./tooling/api",
|
||||
"path": "./packages/api",
|
||||
"manager": "javascript",
|
||||
"assets": [
|
||||
{
|
||||
"path": "./tooling/api/dist/tauri-apps-api-${ pkgFile.version }.tgz",
|
||||
"name": "tauri-apps-api-${ pkgFile.version }.tgz"
|
||||
}
|
||||
],
|
||||
"prepublish": [
|
||||
{
|
||||
"command": "yarn",
|
||||
"dryRunCommand": true
|
||||
},
|
||||
{
|
||||
"command": "echo '<details>\n<summary><em><h4>Yarn Audit</h4></em></summary>\n\n```'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "yarn audit",
|
||||
"dryRunCommand": true,
|
||||
"runFromRoot": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "echo '```\n\n</details>\n'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "yarn npm-pack",
|
||||
"dryRunCommand": true
|
||||
}
|
||||
],
|
||||
"publish": [
|
||||
{
|
||||
"command": "echo '<details>\n<summary><em><h4>Yarn Publish</h4></em></summary>\n\n```'",
|
||||
"command": "echo '<details>\n<summary><em><h4>PNPM Publish</h4></em></summary>\n\n```'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "yarn npm-publish",
|
||||
"command": "pnpm npm-publish",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
@@ -185,61 +149,52 @@
|
||||
]
|
||||
},
|
||||
"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"
|
||||
],
|
||||
"assets": [
|
||||
{
|
||||
"path": "./tooling/cli/schema.json",
|
||||
"name": "schema.json"
|
||||
}
|
||||
]
|
||||
"postversion": "node ../../.scripts/ci/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }"
|
||||
},
|
||||
"tauri": {
|
||||
"path": "./core/tauri",
|
||||
"path": "./crates/tauri",
|
||||
"manager": "rust",
|
||||
"dependencies": [
|
||||
"tauri-macros",
|
||||
@@ -248,40 +203,28 @@
|
||||
"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 }",
|
||||
"cargo build --manifest-path ../tauri-schema-generator/Cargo.toml"
|
||||
]
|
||||
},
|
||||
"@tauri-apps/cli": {
|
||||
"path": "./tooling/cli/node",
|
||||
"path": "./packages/cli",
|
||||
"manager": "javascript",
|
||||
"getPublishedVersion": "node ../../../.scripts/covector/package-latest-version.js npm ${ pkgFile.pkg.name } ${ pkgFile.pkg.version }",
|
||||
"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"
|
||||
],
|
||||
"postversion": "node ../../.scripts/ci/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }",
|
||||
"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"
|
||||
],
|
||||
"assets": [
|
||||
{
|
||||
"path": "${ pkg.path }/target/package/tauri-cli-${ pkgFile.version }.crate",
|
||||
"name": "${ pkg.pkg }-${ pkgFile.version }.crate"
|
||||
}
|
||||
]
|
||||
"dependencies": ["tauri-bundler", "tauri-utils", "tauri-macos-sign"]
|
||||
},
|
||||
"tauri-driver": {
|
||||
"path": "./tooling/webdriver",
|
||||
"manager": "rust",
|
||||
"postversion": "cargo check"
|
||||
"path": "./crates/tauri-driver",
|
||||
"manager": "rust"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
---
|
||||
"tauri": patch:breaking
|
||||
"tauri-plugin": patch:breaking
|
||||
"@tauri-apps/cli": patch:breaking
|
||||
"tauri-cli": patch:breaking
|
||||
---
|
||||
|
||||
Core plugin permissions are now prefixed with `core:`, the `core:default` permission set can now be used and the `core` plugin name is reserved.
|
||||
The `tauri migrate` tool will automate the migration process, which involves prefixing all `app`, `event`, `image`, `menu`, `path`, `resources`, `tray`, `webview` and `window` permissions with `core:`.
|
||||
@@ -1,9 +0,0 @@
|
||||
---
|
||||
"tauri-cli": patch:breaking
|
||||
"@tauri-apps/cli": patch:breaking
|
||||
---
|
||||
|
||||
`ios dev` and `android dev` now uses localhost for the development server unless running on an iOS device,
|
||||
which still requires connecting to the public network address. To conditionally check this on your frontend
|
||||
framework's configuration you can check for the existence of the `TAURI_DEV_HOST`
|
||||
environment variable instead of checking if the target is iOS or Android (previous recommendation).
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
"tauri-utils": "patch:bug"
|
||||
---
|
||||
|
||||
Fixed an issue where configuration parsing errors always displayed 'tauri.conf.json' as the file path, even when using 'Tauri.toml' or 'tauri.conf.json5'.
|
||||
|
||||
The error messages now correctly shows the actual config file being used.
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
"tauri": patch:bug
|
||||
"tauri-codegen": patch:bug
|
||||
---
|
||||
|
||||
Fixes asset resolving when not using the `compression` feature.
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
"tauri-utils": patch:feat
|
||||
"@tauri-apps/cli": patch:feat
|
||||
"tauri-cli": patch:feat
|
||||
---
|
||||
|
||||
Added `bundle > iOS > frameworks` configuration to define a list of frameworks that are linked to the Xcode project when it is generated.
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
"tauri": "patch:sec"
|
||||
"tauri-utils": "patch:sec"
|
||||
---
|
||||
|
||||
Explicitly check that the main frame's origin is the sender of Isolation Payloads
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
"tauri-utils": "patch:enhance"
|
||||
"tauri": "patch:enhance"
|
||||
---
|
||||
|
||||
Make the set of gtk application id optional, to allow more then one instance of the app running at the same time.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"tauri": "patch:enhance"
|
||||
---
|
||||
|
||||
Add `tauri::plugin::Builder::try_build` to allow plugins to check if their `TauriPlugin` initialization is valid.
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"tag": "rc",
|
||||
"changes": [
|
||||
".changes/asset-resolver-dev-fallback.md",
|
||||
".changes/change-pr-10435.md",
|
||||
".changes/cli-desktop-port-exposure.md",
|
||||
".changes/core-plugin-namespace.md",
|
||||
".changes/dev-url-localhost-mobile.md",
|
||||
".changes/fix-conf-parsing-error-filepath.md",
|
||||
".changes/fix-usage-without-compression.md",
|
||||
".changes/ios-frameworks.md",
|
||||
".changes/isolation-main-frame-origin.md",
|
||||
".changes/linux-option-gtk-app-id.md",
|
||||
".changes/plugin-builder-failable.md",
|
||||
".changes/rc-migration.md",
|
||||
".changes/remove-unsecure-configs.md"
|
||||
]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
"tauri-cli": patch:feat
|
||||
"@tauri-apps/cli": patch:feat
|
||||
---
|
||||
|
||||
Added migration from `2.0.0-beta` to `2.0.0-rc`.
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
"tauri-cli": patch:sec
|
||||
"@tauri-apps/cli": patch:sec
|
||||
"tauri": patch:sec
|
||||
---
|
||||
|
||||
Re-enable TLS checks that were previously disabled to support an insecure HTTPS custom protocol on Android which is no longer used.
|
||||
|
||||
@@ -5,7 +5,7 @@ FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
|
||||
|
||||
# Derived from Tauri contribution and setup guides:
|
||||
# See: https://github.com/tauri-apps/tauri/blob/dev/.github/CONTRIBUTING.md#development-guide
|
||||
# See: https://tauri.app/v1/guides/getting-started/prerequisites/#setting-up-linux
|
||||
# See: https://v2.tauri.app/start/prerequisites/
|
||||
ARG TAURI_BUILD_DEPS="build-essential curl libappindicator3-dev libgtk-3-dev librsvg2-dev libssl-dev libwebkit2gtk-4.1-dev wget"
|
||||
|
||||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||
|
||||
@@ -24,7 +24,7 @@ Prerequisites are mainly derived from VS Code's instructions for usage of develo
|
||||
|
||||
### A note on filesystem performance
|
||||
|
||||
Due to limitations in how Docker shares files between the Docker host and a container, it's also recommended that developers [clone Tauri source code into a container volume](https://code.visualstudio.com/remote/advancedcontainers/improve-performance#_use-clone-repository-in-container-volume). This is optional, but highly advised as many filesystem/IO heavy operations (`cargo build`, `yarn install`, etc) will be very slow if they operate on directories shared with a Docker container from the Docker host.
|
||||
Due to limitations in how Docker shares files between the Docker host and a container, it's also recommended that developers [clone Tauri source code into a container volume](https://code.visualstudio.com/remote/advancedcontainers/improve-performance#_use-clone-repository-in-container-volume). This is optional, but highly advised as many filesystem/IO heavy operations (`cargo build`, `pnpm install`, etc) will be very slow if they operate on directories shared with a Docker container from the Docker host.
|
||||
|
||||
To do this, open your project with VS Code and run **Remote-Containers: Clone Repository in Container Volume...** from the Command Palette (<kbd>F1</kbd>).
|
||||
|
||||
|
||||
23
.github/CODE_OF_CONDUCT.md
vendored
23
.github/CODE_OF_CONDUCT.md
vendored
@@ -1,4 +1,3 @@
|
||||
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
@@ -18,23 +17,23 @@ diverse, inclusive, and healthy community.
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
- Demonstrating empathy and kindness toward other people
|
||||
- Being respectful of differing opinions, viewpoints, and experiences
|
||||
- Giving and gracefully accepting constructive feedback
|
||||
- Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the overall
|
||||
- Focusing on what is best not just for us as individuals, but for the overall
|
||||
community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or advances of
|
||||
- The use of sexualized language or imagery, and sexual attention or advances of
|
||||
any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email address,
|
||||
- Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or email address,
|
||||
without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
- Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
@@ -130,4 +129,4 @@ For answers to common questions about this code of conduct, see the FAQ at
|
||||
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
||||
[Mozilla CoC]: https://github.com/mozilla/diversity
|
||||
[FAQ]: https://www.contributor-covenant.org/faq
|
||||
[translations]: https://www.contributor-covenant.org/translations
|
||||
[translations]: https://www.contributor-covenant.org/translations
|
||||
|
||||
13
.github/CONTRIBUTING.md
vendored
13
.github/CONTRIBUTING.md
vendored
@@ -37,9 +37,12 @@ Hi! We, the maintainers, are really excited that you are interested in contribut
|
||||
- Provide convincing reason to add this feature. Ideally you should open a suggestion issue first and have it greenlighted before working on it.
|
||||
|
||||
- If fixing a bug:
|
||||
|
||||
- If you are resolving a special issue, add `(fix: #xxxx[,#xxx])` (#xxxx is the issue id) in your PR title for a better release log, e.g. `fix: update entities encoding/decoding (fix #3899)`.
|
||||
- Provide detailed description of the bug in the PR, or link to an issue that does.
|
||||
|
||||
- If the PR is meant to be released, follow the instructions in `.changes/readme.md` to log your changes. ie. [readme.md](https://github.com/tauri-apps/tauri/blob/dev/.changes/README.md)
|
||||
|
||||
## Development Guide
|
||||
|
||||
**NOTE: If you have any question don't hesitate to ask in our Discord server. We try to keep this guide to up guide, but if something doesn't work let us know.**
|
||||
@@ -48,7 +51,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 [Yarn](https://yarnpkg.com/), 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://v2.tauri.app/start/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 +61,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 +81,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 `yarn 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
|
||||
|
||||
|
||||
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -45,7 +45,7 @@ body:
|
||||
id: info
|
||||
attributes:
|
||||
label: Full `tauri info` output
|
||||
description: "Output of `npm run tauri info` or `cargo tauri info`"
|
||||
description: 'Output of `npm run tauri info` or `cargo tauri info`'
|
||||
render: text
|
||||
validations:
|
||||
required: true
|
||||
|
||||
3
.github/ISSUE_TEMPLATE/docs_report.md
vendored
3
.github/ISSUE_TEMPLATE/docs_report.md
vendored
@@ -1,8 +1,7 @@
|
||||
---
|
||||
name: 📚 Docs Report
|
||||
about: Create a report to help us improve the docs
|
||||
title: "[docs] "
|
||||
title: '[docs] '
|
||||
labels: 'type: documentation'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
6
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
6
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
@@ -5,7 +5,7 @@
|
||||
name: 💡 Feature Request
|
||||
title: '[feat] '
|
||||
description: Suggest an idea
|
||||
labels: 'type: feature request'
|
||||
labels: ['type: feature request']
|
||||
|
||||
body:
|
||||
- type: textarea
|
||||
@@ -22,7 +22,7 @@ body:
|
||||
attributes:
|
||||
label: "Describe the solution you'd like"
|
||||
description: A clear description of what change you would like
|
||||
placeholder: "I would like to..."
|
||||
placeholder: 'I would like to...'
|
||||
validations:
|
||||
required: true
|
||||
|
||||
@@ -31,7 +31,7 @@ body:
|
||||
attributes:
|
||||
label: Alternatives considered
|
||||
description: "Any alternative solutions you've considered"
|
||||
|
||||
|
||||
- type: textarea
|
||||
id: context
|
||||
attributes:
|
||||
|
||||
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -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:
|
||||
|
||||
62
.github/RELEASING.md
vendored
Normal file
62
.github/RELEASING.md
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
# Tauri Releasing Handbook
|
||||
|
||||
This handbook contains information about our release pipeline and how to deal with common issues.
|
||||
This document is mainly intended for team members responsible for maintaining the project.
|
||||
|
||||
- [Covector](#covector)
|
||||
- [Version Pull Request](#version-pull-request)
|
||||
- [Releasing and Publishing](#releasing-and-publishing)
|
||||
- [Publishing failed, what to do?](#publishing-failed-what-to-do)
|
||||
|
||||
## Covector
|
||||
|
||||
We use [`covector`](https://github.com/jbolda/covector) to manage our version bumps and release pipeline.
|
||||
It can be configured in [`.changes/config.json`](../.changes/config.json) which includes how each package should be published step by step.
|
||||
|
||||
Some packages can't be published directly using `covector` as it requires to be built on a matrix of platforms
|
||||
such as `tauri-cli` prebuilt binaries which is published using [publish-cli-rs.yml](./workflows/publish-cli-rs.yml)
|
||||
and `@tauri-apps/cli` native Node.js modules which is published using using [publish-cli-js.yml](./workflows/publish-cli-js.yml)
|
||||
both of which are triggered after `covector` has created a github release for both of them, see `Trigger @tauri-apps/cli publishing workflow`
|
||||
and `Trigger tauri-cli publishing workflow` steps in [covector-version-or-publish.yml](./workflows/covector-version-or-publish.yml)
|
||||
|
||||
## Version Pull Request
|
||||
|
||||
On each pull request merged, [covector-version-or-publish.yml](./workflows/covector-version-or-publish.yml) workflow will run, and:
|
||||
|
||||
When there're change files inside `.changes` folder and they're not all included in `pre.json` (usually this is only when we are in `-alpha` to `-rc` phase), it will open/update an `Apply Version Updates From Current Changes` PR (https://github.com/tauri-apps/tauri/pull/11029 for example) that bumps all packages based on current existing change files and generate `CHANGELOG.md` entries. see `Create Pull Request With Versions Bumped` step in [covector-version-or-publish.yml](./workflows/covector-version-or-publish.yml).
|
||||
|
||||
Otherwise, covector will start to publish packages configured in [`.changes/config.json`](../.changes/config.json).
|
||||
|
||||
## Releasing and Publishing
|
||||
|
||||
Releasing can be as easy as merging the version pull request but here is a checklist to follow:
|
||||
|
||||
- [ ] Double check that every package is bumped correctly and there are no accidental major or minor being released unless that is indeed the intention.
|
||||
- [ ] Make sure that there are no pending or unfinished [covector-version-or-publish.yml](./workflows/covector-version-or-publish.yml) workflow runs.
|
||||
- [ ] Sign the Version PR before merging as we require signed commits
|
||||
- [ ] `git fetch --all`
|
||||
- [ ] `git checkout release/version-updates`
|
||||
- [ ] `git commit --amend -S`
|
||||
- [ ] `git push --force`
|
||||
- [ ] Approve and merge the version pull request
|
||||
|
||||
## Publishing failed, what to do?
|
||||
|
||||
It is possible and due to many factors that one or many packages release can fail to release, there is no reason to panic, we can fix this.
|
||||
|
||||
Did all of the packages fail to release?
|
||||
|
||||
- yes?
|
||||
- [ ] `git checkout -b revert-branch`
|
||||
- [ ] `git revert HEAD~1`
|
||||
- no?
|
||||
- [ ] `git checkout -b revert-branch`
|
||||
- [ ] `git revert HEAD~1 --no-commit`
|
||||
- [ ] Edit the commit and revert only changes related to packages that failed to publish
|
||||
- [ ] `git revert --continue`
|
||||
|
||||
Then:
|
||||
|
||||
- [ ] Make a pull request with reverted changes, get it approved and merged
|
||||
- [ ] Fix the issue that caused releases to fail in another PR, get it approved and merged
|
||||
- [ ] Repeat the release process again.
|
||||
0
app-icon.png → .github/icon.png
vendored
0
app-icon.png → .github/icon.png
vendored
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
15
.github/workflows/audit.yml
vendored
15
.github/workflows/audit.yml
vendored
@@ -14,7 +14,7 @@ on:
|
||||
- '**/Cargo.lock'
|
||||
- '**/Cargo.toml'
|
||||
- '**/package.json'
|
||||
- '**/yarn.lock'
|
||||
- '**/pnpm-lock.yaml'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
@@ -34,11 +34,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: audit workspace
|
||||
run: yarn audit
|
||||
- name: audit @tauri-apps/api
|
||||
working-directory: tooling/api
|
||||
run: yarn audit
|
||||
- name: audit @tauri-apps/cli
|
||||
working-directory: tooling/cli/node
|
||||
run: yarn audit
|
||||
- run: corepack enable
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
- run: pnpm audit
|
||||
|
||||
18
.github/workflows/bench.yml
vendored
18
.github/workflows/bench.yml
vendored
@@ -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"
|
||||
|
||||
14
.github/workflows/check-change-tags.yml
vendored
14
.github/workflows/check-change-tags.yml
vendored
@@ -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
|
||||
|
||||
46
.github/workflows/check-generated-files.yml
vendored
46
.github/workflows/check-generated-files.yml
vendored
@@ -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,19 +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
|
||||
@@ -46,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: yarn && yarn build
|
||||
run: pnpm build
|
||||
working-directory: packages/api
|
||||
- name: check api
|
||||
run: ./.scripts/ci/has-diff.sh
|
||||
|
||||
@@ -69,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
|
||||
|
||||
2
.github/workflows/check-license-header.yml
vendored
2
.github/workflows/check-license-header.yml
vendored
@@ -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
|
||||
|
||||
@@ -27,4 +27,4 @@ jobs:
|
||||
uses: jbolda/covector/packages/action@covector-v0
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
command: "status"
|
||||
command: 'status'
|
||||
|
||||
231
.github/workflows/covector-version-or-publish-v1.yml
vendored
231
.github/workflows/covector-version-or-publish-v1.yml
vendored
@@ -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@v2
|
||||
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
|
||||
@@ -23,6 +23,12 @@ jobs:
|
||||
with:
|
||||
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
|
||||
|
||||
@@ -30,16 +36,12 @@ jobs:
|
||||
if: matrix.platform == 'ubuntu-latest'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev libfuse2
|
||||
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev libfuse2 librsvg2-dev
|
||||
|
||||
- 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
|
||||
@@ -47,14 +49,19 @@ jobs:
|
||||
- name: run CLI tests
|
||||
timeout-minutes: 30
|
||||
run: |
|
||||
cd ./tooling/cli/node
|
||||
yarn
|
||||
yarn build
|
||||
yarn test
|
||||
cd ./packages/cli
|
||||
pnpm i --frozen-lockfile
|
||||
pnpm build
|
||||
pnpm test
|
||||
|
||||
version-or-publish:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 65
|
||||
permissions:
|
||||
actions: write # required for workflow_dispatch
|
||||
contents: write # required to create new releases
|
||||
pull-requests: write # required to open version update pr
|
||||
id-token: write # pnpm provenance
|
||||
outputs:
|
||||
change: ${{ steps.covector.outputs.change }}
|
||||
commandRan: ${{ steps.covector.outputs.commandRan }}
|
||||
@@ -66,12 +73,12 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@v3
|
||||
- run: corepack enable
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
node-version: 20
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
cache: yarn
|
||||
cache-dependency-path: tooling/*/yarn.lock
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: cargo login
|
||||
run: cargo login ${{ secrets.ORG_CRATES_IO_TOKEN }}
|
||||
@@ -80,18 +87,28 @@ jobs:
|
||||
git config --global user.name "${{ github.event.pusher.name }}"
|
||||
git config --global user.email "${{ github.event.pusher.email }}"
|
||||
|
||||
- name: install Linux dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev librsvg2-dev
|
||||
|
||||
- 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 }}
|
||||
NPM_CONFIG_PROVENANCE: true
|
||||
with:
|
||||
command: 'version-or-publish'
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
createRelease: true
|
||||
recognizeContributors: true
|
||||
|
||||
- name: Sync Cargo.lock
|
||||
if: steps.covector.outputs.commandRan == 'version'
|
||||
run: cargo tree --depth 0
|
||||
|
||||
- name: Create Pull Request With Versions Bumped
|
||||
if: steps.covector.outputs.commandRan == 'version'
|
||||
uses: tauri-apps/create-pull-request@v3
|
||||
@@ -119,7 +136,7 @@ jobs:
|
||||
contains(steps.covector.outputs.packagesPublished, '@tauri-apps/cli')
|
||||
run: gh workflow run 31554138 -r dev -f releaseId=${{ steps.covector.outputs['-tauri-apps-cli-releaseId'] }}
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.ORG_TAURI_BOT_PAT }}
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Trigger `tauri-cli` publishing workflow
|
||||
if: |
|
||||
@@ -127,4 +144,4 @@ jobs:
|
||||
contains(steps.covector.outputs.packagesPublished, 'tauri-cli')
|
||||
run: gh workflow run 31554139 -r dev
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.ORG_TAURI_BOT_PAT }}
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
25
.github/workflows/deploy-schema-worker.yml
vendored
Normal file
25
.github/workflows/deploy-schema-worker.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
# Copyright 2019-2024 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: deploy schema worker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
paths:
|
||||
- '.github/workflows/deploy-schema-worker.yml'
|
||||
- 'crates/tauri-schema-worker/**'
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: cloudflare/wrangler-action@v3
|
||||
with:
|
||||
command: deploy
|
||||
workingDirectory: 'crates/tauri-schema-worker'
|
||||
apiToken: ${{ secrets.SCHEMA_WORKER_CLOUDFLARE_API_TOKEN }}
|
||||
accountId: ${{ secrets.SCHEMA_WORKER_CLOUDFLARE_ACCOUNT_ID }}
|
||||
23
.github/workflows/docker.yml
vendored
23
.github/workflows/docker.yml
vendored
@@ -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:
|
||||
@@ -66,19 +66,20 @@ jobs:
|
||||
with:
|
||||
targets: ${{ matrix.target.name }}
|
||||
|
||||
- run: corepack enable
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v3
|
||||
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'
|
||||
@@ -111,10 +112,10 @@ jobs:
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
cd tooling/api
|
||||
yarn && yarn build
|
||||
cd packages/api
|
||||
pnpm i --frozen-lockfile && pnpm build
|
||||
cd ../../examples/api
|
||||
yarn
|
||||
pnpm i --frozen-lockfile
|
||||
. .setup-cross.sh
|
||||
chmod +x cargo-tauri
|
||||
chmod +x $HOME/.cargo/bin/cross
|
||||
|
||||
51
.github/workflows/fmt.yml
vendored
Normal file
51
.github/workflows/fmt.yml
vendored
Normal 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
|
||||
70
.github/workflows/lint-core.yml
vendored
70
.github/workflows/lint-core.yml
vendored
@@ -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
|
||||
50
.github/workflows/lint-js.yml
vendored
50
.github/workflows/lint-js.yml
vendored
@@ -8,53 +8,33 @@ 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:
|
||||
eslint-cli:
|
||||
eslint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v3
|
||||
- run: corepack enable
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: yarn
|
||||
cache-dependency-path: tooling/cli/node/yarn.lock
|
||||
- name: install deps via yarn
|
||||
working-directory: ./tooling/cli/node/
|
||||
run: yarn
|
||||
# nothing to lint
|
||||
#- name: run lint
|
||||
# working-directory: ./tooling/cli/node/
|
||||
# run: yarn lint
|
||||
- name: run format
|
||||
working-directory: ./tooling/cli/node/
|
||||
run: yarn format:check
|
||||
node-version: 'lts/*'
|
||||
cache: 'pnpm'
|
||||
- run: pnpm i --frozen-lockfile
|
||||
- run: pnpm eslint:check
|
||||
|
||||
eslint-api:
|
||||
typescript:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v3
|
||||
- run: corepack enable
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: yarn
|
||||
cache-dependency-path: tooling/api/yarn.lock
|
||||
|
||||
- name: install deps via yarn
|
||||
working-directory: ./tooling/api/
|
||||
run: yarn
|
||||
- name: run ts:check
|
||||
working-directory: ./tooling/api/
|
||||
run: yarn ts:check
|
||||
- name: run lint
|
||||
working-directory: ./tooling/api/
|
||||
run: yarn lint
|
||||
- name: run format
|
||||
working-directory: ./tooling/api/
|
||||
run: yarn format:check
|
||||
node-version: 'lts/*'
|
||||
cache: 'pnpm'
|
||||
- run: pnpm i --frozen-lockfile
|
||||
- run: pnpm ts:check
|
||||
|
||||
@@ -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
|
||||
154
.github/workflows/publish-cli-js.yml
vendored
154
.github/workflows/publish-cli-js.yml
vendored
@@ -18,7 +18,7 @@ on:
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: tooling/cli/node/
|
||||
working-directory: packages/cli/
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -30,45 +30,45 @@ jobs:
|
||||
target: x86_64-apple-darwin
|
||||
architecture: x64
|
||||
build: |
|
||||
yarn build:release --target=x86_64-apple-darwin
|
||||
pnpm build --target=x86_64-apple-darwin
|
||||
strip -x *.node
|
||||
- host: windows-latest
|
||||
build: yarn build:release
|
||||
build: pnpm build
|
||||
target: x86_64-pc-windows-msvc
|
||||
architecture: x64
|
||||
- host: windows-latest
|
||||
build: yarn build:release --target i686-pc-windows-msvc
|
||||
build: pnpm build --target i686-pc-windows-msvc
|
||||
target: i686-pc-windows-msvc
|
||||
architecture: x64
|
||||
- host: windows-latest
|
||||
architecture: x64
|
||||
target: aarch64-pc-windows-msvc
|
||||
build: yarn build:release --target aarch64-pc-windows-msvc --features native-tls-vendored --cargo-flags="--no-default-features"
|
||||
build: pnpm build --target aarch64-pc-windows-msvc --features native-tls-vendored --cargo-flags="--no-default-features"
|
||||
- host: ubuntu-20.04
|
||||
target: x86_64-unknown-linux-gnu
|
||||
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
|
||||
build: |
|
||||
cd tooling/cli/node
|
||||
yarn build:release --target x86_64-unknown-linux-gnu
|
||||
cd packages/cli
|
||||
pnpm build --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
|
||||
yarn build:release
|
||||
cd packages/cli
|
||||
pnpm build
|
||||
strip *.node
|
||||
- host: macos-latest
|
||||
target: aarch64-apple-darwin
|
||||
build: |
|
||||
yarn build:release --features native-tls-vendored --target=aarch64-apple-darwin
|
||||
pnpm build --features native-tls-vendored --target=aarch64-apple-darwin
|
||||
strip -x *.node
|
||||
- host: ubuntu-20.04
|
||||
target: aarch64-unknown-linux-gnu
|
||||
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
|
||||
build: |
|
||||
cd tooling/cli/node
|
||||
yarn build:release --target aarch64-unknown-linux-gnu
|
||||
cd packages/cli
|
||||
pnpm build --target aarch64-unknown-linux-gnu
|
||||
aarch64-unknown-linux-gnu-strip *.node
|
||||
- host: ubuntu-20.04
|
||||
architecture: x64
|
||||
@@ -77,29 +77,28 @@ jobs:
|
||||
sudo apt-get update
|
||||
sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf -y
|
||||
build: |
|
||||
yarn build:release --target=armv7-unknown-linux-gnueabihf
|
||||
pnpm build --target=armv7-unknown-linux-gnueabihf
|
||||
arm-linux-gnueabihf-strip *.node
|
||||
- host: ubuntu-20.04
|
||||
architecture: x64
|
||||
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
|
||||
yarn build:release --target aarch64-unknown-linux-musl
|
||||
pnpm build --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
|
||||
- run: corepack enable
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
if: ${{ !matrix.settings.docker }}
|
||||
with:
|
||||
node-version: 16
|
||||
check-latest: true
|
||||
cache: yarn
|
||||
cache-dependency-path: 'tooling/cli/node/yarn.lock'
|
||||
node-version: 20
|
||||
cache: 'pnpm'
|
||||
architecture: ${{ matrix.settings.architecture }}
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
@@ -109,14 +108,13 @@ jobs:
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
with:
|
||||
key: ${{ matrix.settings.target }}
|
||||
working-directory: 'tooling/cli/'
|
||||
if: ${{ matrix.settings.docker }}
|
||||
- name: Setup toolchain
|
||||
run: ${{ matrix.settings.setup }}
|
||||
if: ${{ matrix.settings.setup }}
|
||||
shell: bash
|
||||
- name: Install dependencies
|
||||
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
run: pnpm i --frozen-lockfile --ignore-scripts
|
||||
|
||||
- name: Build in docker
|
||||
uses: addnab/docker-run-action@v3
|
||||
@@ -132,10 +130,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
|
||||
@@ -157,7 +155,7 @@ jobs:
|
||||
# prepare: |
|
||||
# pkg install -y curl node14 python2
|
||||
# curl -qL https://www.npmjs.com/install.sh | sh
|
||||
# npm install -g yarn
|
||||
# npm install -g pnpm
|
||||
# curl https://sh.rustup.rs -sSf --output rustup.sh
|
||||
# sh rustup.sh -y --profile minimal --default-toolchain stable
|
||||
# export PATH="/usr/local/cargo/bin:$PATH"
|
||||
@@ -165,8 +163,8 @@ jobs:
|
||||
# rustc --version
|
||||
# echo "~~~~ node -v ~~~~"
|
||||
# node -v
|
||||
# echo "~~~~ yarn --version ~~~~"
|
||||
# yarn --version
|
||||
# echo "~~~~ pnpm --version ~~~~"
|
||||
# pnpm --version
|
||||
# run: |
|
||||
# export PATH="/usr/local/cargo/bin:$PATH"
|
||||
# pwd
|
||||
@@ -174,17 +172,17 @@ jobs:
|
||||
# whoami
|
||||
# env
|
||||
# freebsd-version
|
||||
# cd ./tooling/cli/node/
|
||||
# yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
# yarn build:release
|
||||
# cd ./packages/cli/
|
||||
# pnpm i --frozen-lockfile --ignore-scripts
|
||||
# pnpm build
|
||||
# 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 }}
|
||||
@@ -199,31 +197,29 @@ jobs:
|
||||
- host: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
node:
|
||||
- '16'
|
||||
- '18'
|
||||
- '20'
|
||||
runs-on: ${{ matrix.settings.host }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: corepack enable
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
check-latest: true
|
||||
cache: yarn
|
||||
cache-dependency-path: 'tooling/cli/node/yarn.lock'
|
||||
cache: 'pnpm'
|
||||
- name: Install dependencies
|
||||
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
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
|
||||
- name: Test bindings
|
||||
run: yarn test
|
||||
run: pnpm test
|
||||
test-linux-x64-gnu-binding:
|
||||
name: Test bindings on Linux-x64-gnu - node@${{ matrix.node }}
|
||||
needs:
|
||||
@@ -232,35 +228,33 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node:
|
||||
- '16'
|
||||
- '18'
|
||||
- '20'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: corepack enable
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
check-latest: true
|
||||
cache: yarn
|
||||
cache-dependency-path: 'tooling/cli/node/yarn.lock'
|
||||
cache: 'pnpm'
|
||||
- name: Install dependencies
|
||||
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
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
|
||||
- name: install system dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev
|
||||
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev librsvg2-dev
|
||||
- name: Test bindings
|
||||
run: yarn test
|
||||
run: pnpm test
|
||||
test-linux-x64-musl-binding:
|
||||
name: Test bindings on x86_64-unknown-linux-musl - node@${{ matrix.node }}
|
||||
needs:
|
||||
@@ -269,7 +263,6 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node:
|
||||
- '16'
|
||||
- '18'
|
||||
- '20'
|
||||
runs-on: ubuntu-latest
|
||||
@@ -277,32 +270,31 @@ jobs:
|
||||
image: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: corepack enable
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
check-latest: true
|
||||
cache: yarn
|
||||
cache-dependency-path: 'tooling/cli/node/yarn.lock'
|
||||
cache: 'pnpm'
|
||||
- name: Install dependencies
|
||||
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
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
|
||||
- name: Setup and run tests
|
||||
run: |
|
||||
yarn tauri --help
|
||||
pnpm tauri --help
|
||||
ls -la
|
||||
#- name: Setup and run tests
|
||||
# run: |
|
||||
# rustup install stable
|
||||
# rustup default stable
|
||||
# yarn test
|
||||
# pnpm test
|
||||
# ls -la
|
||||
test-linux-arm-bindings:
|
||||
name: Test bindings on ${{ matrix.image }} - node@${{ matrix.node }}
|
||||
@@ -312,7 +304,6 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node:
|
||||
- '16'
|
||||
- '18'
|
||||
- '20'
|
||||
image:
|
||||
@@ -326,18 +317,16 @@ jobs:
|
||||
- name: List packages
|
||||
run: ls -R .
|
||||
shell: bash
|
||||
- name: Install dependencies
|
||||
run: yarn install --ignore-scripts --ignore-platform --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
- 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:
|
||||
@@ -355,8 +344,8 @@ jobs:
|
||||
eval "$(fnm env --use-on-cd)"
|
||||
fnm install ${{ matrix.node }}
|
||||
fnm use ${{ matrix.node }}
|
||||
cd tooling/cli/node
|
||||
yarn tauri --help
|
||||
cd packages/cli
|
||||
node tauri.js --help
|
||||
ls -la
|
||||
publish:
|
||||
name: Publish
|
||||
@@ -367,31 +356,34 @@ jobs:
|
||||
- test-linux-x64-gnu-binding
|
||||
- test-linux-x64-musl-binding
|
||||
#- test-linux-arm-bindings
|
||||
permissions:
|
||||
contents: write # update release
|
||||
id-token: write # npm provenance
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: corepack enable
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
check-latest: true
|
||||
cache: yarn
|
||||
cache-dependency-path: 'tooling/cli/node/yarn.lock'
|
||||
cache: 'pnpm'
|
||||
- name: Install dependencies
|
||||
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
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: yarn artifacts
|
||||
run: pnpm artifacts
|
||||
- name: List packages
|
||||
run: ls -R ./npm
|
||||
shell: bash
|
||||
- name: Publish
|
||||
run: |
|
||||
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
||||
npm publish --tag next
|
||||
npm publish
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NPM_TOKEN: ${{ secrets.ORG_NPM_TOKEN }}
|
||||
RELEASE_ID: ${{ github.event.client_payload.releaseId || inputs.releaseId }}
|
||||
NPM_CONFIG_PROVENANCE: true
|
||||
|
||||
10
.github/workflows/publish-cli-rs.yml
vendored
10
.github/workflows/publish-cli-rs.yml
vendored
@@ -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
|
||||
|
||||
9
.github/workflows/supply-chain.yml
vendored
9
.github/workflows/supply-chain.yml
vendored
@@ -10,7 +10,6 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- 1.x
|
||||
paths:
|
||||
- '.github/workflows/supply-chain.yml'
|
||||
- '**/Cargo.lock'
|
||||
@@ -26,7 +25,7 @@ jobs:
|
||||
- name: Install Rust
|
||||
run: rustup update stable && rustup default stable
|
||||
|
||||
- uses: actions/cache@v2
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ runner.tool_cache }}/cargo-vet
|
||||
key: cargo-vet-bin-${{ env.CARGO_VET_VERSION }}
|
||||
@@ -37,9 +36,9 @@ jobs:
|
||||
- name: Ensure that the tool cache is populated with the cargo-vet binary
|
||||
run: cargo install --root ${{ runner.tool_cache }}/cargo-vet --version ${{ env.CARGO_VET_VERSION }} cargo-vet
|
||||
|
||||
# Enable this again to break the workflow once we have a reasonable amount of suggestions to get to a clean base line
|
||||
# - name: Invoke cargo-vet
|
||||
# run: cargo vet --locked
|
||||
# Enable this again to break the workflow once we have a reasonable amount of suggestions to get to a clean base line
|
||||
# - name: Invoke cargo-vet
|
||||
# run: cargo vet --locked
|
||||
|
||||
- name: Provide audit suggestions
|
||||
run: cargo vet suggest
|
||||
|
||||
46
.github/workflows/test-android.yml
vendored
46
.github/workflows/test-android.yml
vendored
@@ -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:
|
||||
@@ -42,20 +42,18 @@ jobs:
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.1
|
||||
|
||||
- run: corepack enable
|
||||
- name: setup node
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: yarn
|
||||
cache-dependency-path: |
|
||||
tooling/api/yarn.lock
|
||||
examples/api/yarn.lock
|
||||
node-version: lts/*
|
||||
cache: 'pnpm'
|
||||
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
cache: gradle
|
||||
cache: 'gradle'
|
||||
|
||||
- name: Setup NDK
|
||||
uses: nttld/setup-ndk@v1
|
||||
@@ -77,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: yarn && yarn build
|
||||
|
||||
- name: install API example dependencies
|
||||
working-directory: ./examples/api
|
||||
run: yarn
|
||||
working-directory: ./packages/api
|
||||
run: pnpm build
|
||||
|
||||
- name: init Android Studio project
|
||||
working-directory: ./examples/api
|
||||
|
||||
23
.github/workflows/test-cli-js.yml
vendored
23
.github/workflows/test-cli-js.yml
vendored
@@ -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
|
||||
@@ -38,12 +37,12 @@ jobs:
|
||||
- name: install Rust stable
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- run: corepack enable
|
||||
- name: setup node
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
cache: yarn
|
||||
cache-dependency-path: tooling/cli/node/yarn.lock
|
||||
node-version: 'lts/*'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: install Linux dependencies
|
||||
if: matrix.platform == 'ubuntu-latest'
|
||||
@@ -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
|
||||
yarn
|
||||
yarn build
|
||||
yarn test
|
||||
cd ./packages/cli
|
||||
pnpm i --frozen-lockfile
|
||||
pnpm build
|
||||
pnpm test
|
||||
|
||||
28
.github/workflows/test-cli-rs.yml
vendored
28
.github/workflows/test-cli-rs.yml
vendored
@@ -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
|
||||
@@ -32,23 +31,14 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- {
|
||||
target: x86_64-pc-windows-msvc,
|
||||
os: windows-latest
|
||||
}
|
||||
- { target: x86_64-pc-windows-msvc, os: windows-latest }
|
||||
- {
|
||||
target: aarch64-pc-windows-msvc,
|
||||
os: windows-latest,
|
||||
args: --no-default-features --features native-tls-vendored
|
||||
}
|
||||
- {
|
||||
target: x86_64-unknown-linux-gnu,
|
||||
os: ubuntu-latest
|
||||
}
|
||||
- {
|
||||
target: x86_64-apple-darwin,
|
||||
os: macos-latest
|
||||
}
|
||||
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
|
||||
- { target: x86_64-apple-darwin, os: macos-latest }
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -62,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 }}
|
||||
|
||||
42
.github/workflows/test-core.yml
vendored
42
.github/workflows/test-core.yml
vendored
@@ -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.77.2',
|
||||
cross: false,
|
||||
command: 'test'
|
||||
}
|
||||
- {
|
||||
target: x86_64-unknown-linux-gnu,
|
||||
os: ubuntu-latest,
|
||||
toolchain: '1.70.0',
|
||||
toolchain: '1.77.2',
|
||||
cross: false,
|
||||
command: 'test'
|
||||
}
|
||||
- {
|
||||
target: aarch64-apple-darwin,
|
||||
os: macos-14,
|
||||
toolchain: '1.70.0',
|
||||
toolchain: '1.77.2',
|
||||
cross: false,
|
||||
command: 'test'
|
||||
}
|
||||
- {
|
||||
target: aarch64-apple-ios,
|
||||
os: macos-latest,
|
||||
toolchain: '1.70.0',
|
||||
toolchain: '1.77.2',
|
||||
cross: false,
|
||||
command: 'build'
|
||||
}
|
||||
- {
|
||||
target: aarch64-linux-android,
|
||||
os: ubuntu-latest,
|
||||
toolchain: '1.70.0',
|
||||
toolchain: '1.77.2',
|
||||
cross: true,
|
||||
command: 'build'
|
||||
}
|
||||
@@ -85,19 +88,26 @@ jobs:
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y webkit2gtk-4.1 libxdo-dev libayatana-appindicator3-dev
|
||||
|
||||
- name: downgrade crates with MSRV conflict
|
||||
run: |
|
||||
cargo update -p aws-config --precise 1.5.5
|
||||
cargo update -p aws-sdk-ssooidc --precise 1.40.0
|
||||
cargo update -p aws-sdk-s3 --precise 1.46.0
|
||||
cargo update -p aws-sdk-sts --precise 1.39.0
|
||||
cargo update -p aws-sdk-sso --precise 1.39.0
|
||||
cargo update -p bitstream-io --precise 2.3.0
|
||||
|
||||
- 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
|
||||
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 }}
|
||||
cargo install cross --git https://github.com/cross-rs/cross --rev ac4c11cedc97cd7c27faed36e55377a90e6ed618 --locked
|
||||
cross ${{ matrix.platform.command }} --target ${{ matrix.platform.target }} ${{ matrix.features.args }} --manifest-path crates/tauri/Cargo.toml
|
||||
|
||||
79
.github/workflows/test-lint-bundler.yml
vendored
79
.github/workflows/test-lint-bundler.yml
vendored
@@ -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
|
||||
57
.github/workflows/udeps.yml
vendored
57
.github/workflows/udeps.yml
vendored
@@ -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
105
.gitignore
vendored
@@ -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
|
||||
|
||||
1
.husky/.gitignore
vendored
1
.husky/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
_
|
||||
@@ -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
|
||||
yarn format
|
||||
yarn lint: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
|
||||
yarn format
|
||||
cd ../../..
|
||||
fi
|
||||
@@ -1,17 +1,40 @@
|
||||
/.github
|
||||
/.husky
|
||||
/.vscode
|
||||
/audits
|
||||
node_modules
|
||||
target
|
||||
dist
|
||||
/core/tauri/scripts/bundle.global.js
|
||||
/tooling/cli/templates
|
||||
/tooling/cli/node
|
||||
/tooling/cli/schema.json
|
||||
/core/tauri-config-schema/schema.json
|
||||
/.vscode
|
||||
|
||||
# change files are hand-written and shouldn't be formatted
|
||||
/.changes/*
|
||||
!/.changes/config.json
|
||||
|
||||
# dependcies and artifacts directories
|
||||
node_modules/
|
||||
target/
|
||||
dist/
|
||||
|
||||
# lock files
|
||||
pnpm-lock.yaml
|
||||
|
||||
# autogenerated and minimized js file
|
||||
crates/tauri/scripts/bundle.global.js
|
||||
|
||||
# this file is an IIFE, shouldn't be formatted
|
||||
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
|
||||
crates/tauri-cli/templates
|
||||
|
||||
# autogenerated files
|
||||
**/autogenerated/**/*.md
|
||||
packages/cli/index.js
|
||||
packages/cli/index.d.ts
|
||||
crates/tauri-schema-worker/.wrangler
|
||||
CHANGELOG.md
|
||||
*.wxs
|
||||
**/reference.md
|
||||
*schema.json
|
||||
core/tauri/scripts/process-ipc-message-fn.js
|
||||
|
||||
# WiX templates
|
||||
*.wxs
|
||||
|
||||
# examples /gen directory
|
||||
examples/**/src-tauri/gen
|
||||
bench/**/src-tauri/gen
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
{
|
||||
"singleQuote": true,
|
||||
"semi": false,
|
||||
"trailingComma": "none",
|
||||
"overrides": [
|
||||
{ "files": [".changes/**.md"], "options": { "singleQuote": false } }
|
||||
]
|
||||
"trailingComma": "none"
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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`
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
/*
|
||||
This script is solely intended to be run as part of the `covector publish` step to
|
||||
check the latest version of a crate, considering the current minor version.
|
||||
*/
|
||||
|
||||
const https = require('https')
|
||||
|
||||
const kind = process.argv[2]
|
||||
const packageName = process.argv[3]
|
||||
const packageVersion = process.argv[4]
|
||||
const target = packageVersion.substring(0, packageVersion.lastIndexOf('.'))
|
||||
|
||||
let url = null
|
||||
switch (kind) {
|
||||
case 'cargo':
|
||||
url = `https://crates.io/api/v1/crates/${packageName}`
|
||||
break
|
||||
case 'npm':
|
||||
url = `https://registry.npmjs.org/${packageName}`
|
||||
break
|
||||
default:
|
||||
throw new Error('unexpected kind ' + kind)
|
||||
}
|
||||
|
||||
const options = {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Accept: 'application/json',
|
||||
'User-Agent': 'tauri (https://github.com/tauri-apps/tauri)'
|
||||
}
|
||||
}
|
||||
|
||||
https.get(url, options, (response) => {
|
||||
let chunks = []
|
||||
response.on('data', function (chunk) {
|
||||
chunks.push(chunk)
|
||||
})
|
||||
|
||||
response.on('end', function () {
|
||||
const data = JSON.parse(chunks.join(''))
|
||||
if (kind === 'cargo') {
|
||||
const versions =
|
||||
data.versions?.filter((v) => v.num.startsWith(target)) ?? []
|
||||
console.log(versions.length ? versions[0].num : '0.0.0')
|
||||
} else if (kind === 'npm') {
|
||||
const versions = Object.keys(data.versions).filter((v) =>
|
||||
v.startsWith(target)
|
||||
)
|
||||
console.log(versions[versions.length - 1] || '0.0.0')
|
||||
}
|
||||
})
|
||||
})
|
||||
@@ -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
|
||||
@@ -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
|
||||
yarn; yarn 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
|
||||
yarn; yarn build; yarn link
|
||||
cd ..\..
|
||||
echo "Tauri Node.js CLI installed. use `yarn link @tauri-apps/cli` and run it with '$ yarn tauri [COMMAND]'."
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
yarn && yarn 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
|
||||
yarn && yarn build && yarn link
|
||||
cd ../../..
|
||||
echo "Tauri Node.js CLI installed. use `yarn link @tauri-apps/cli` and run it with '$ yarn tauri [COMMAND]'."
|
||||
break;;
|
||||
No ) break;;
|
||||
esac
|
||||
done
|
||||
@@ -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
|
||||
@@ -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
16
.taurignore
Normal 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
|
||||
5
.vscode/extensions.json
vendored
5
.vscode/extensions.json
vendored
@@ -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"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -103,7 +103,7 @@ This plugin allows you to very quickly install tauri in a vue-cli project.
|
||||
|
||||
This project enhances the VS Code interface with several nice-to-have features.
|
||||
|
||||
# Tauri Plugins [documentation](https://tauri.app/v1/guides/features/plugin/)
|
||||
# Tauri Plugins [documentation](https://v2.tauri.app/develop/plugins/)
|
||||
|
||||
Generally speaking, plugins are authored by third parties (even though there may be official, supported plugins). A plugin generally does 3 things:
|
||||
|
||||
@@ -128,7 +128,7 @@ Because of the many ways to build front-ends, we will stick with a common node.j
|
||||
The easiest way to do this is to run the following:
|
||||
|
||||
```
|
||||
npx create-tauri-app
|
||||
npm create tauri-app
|
||||
```
|
||||
|
||||
Which will ask you a bunch of questions about the framework you want to install and then create everything you need in a single folder - some via the placement of template files and some through normal installation procedures of your framework.
|
||||
@@ -138,6 +138,8 @@ Which will ask you a bunch of questions about the framework you want to install
|
||||
Once everything is installed, you can run:
|
||||
|
||||
```
|
||||
pnpm tauri dev
|
||||
-or-
|
||||
yarn tauri dev
|
||||
-or-
|
||||
npm run tauri dev
|
||||
@@ -157,7 +159,7 @@ If you modify your rust code or anything in the Cargo.toml, the window will clos
|
||||
If you need to get deeper insight into your current project, or triage requires investigation of installed components, just run:
|
||||
|
||||
```
|
||||
yarn tauri info
|
||||
pnpm tauri info
|
||||
```
|
||||
|
||||
## What does the Release flow look like?
|
||||
@@ -169,7 +171,7 @@ Depending upon the operating system that the developer (or CI) is building the a
|
||||
To kick off this process, just:
|
||||
|
||||
```
|
||||
yarn tauri build
|
||||
pnpm tauri build
|
||||
```
|
||||
|
||||
After some time, the process will end and you can see the results in the `./src-tauri/target/release` folder.
|
||||
|
||||
8093
Cargo.lock
generated
8093
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
67
Cargo.toml
67
Cargo.toml
@@ -1,32 +1,40 @@
|
||||
[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-schema-worker",
|
||||
"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/resources/src-tauri",
|
||||
"examples/api/src-tauri",
|
||||
"examples/api/src-tauri/tauri-plugin-sample",
|
||||
]
|
||||
resolver = "2"
|
||||
|
||||
[workspace.package]
|
||||
authors = ["Tauri Programme within The Commons Conservancy"]
|
||||
@@ -35,7 +43,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.77.2"
|
||||
|
||||
# default to small, optimized workspace release binaries
|
||||
[profile.release]
|
||||
@@ -44,8 +52,21 @@ codegen-units = 1
|
||||
lto = true
|
||||
incremental = false
|
||||
opt-level = "s"
|
||||
strip = true
|
||||
|
||||
# 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]
|
||||
schemars_derive = { git = 'https://github.com/tauri-apps/schemars.git', branch = 'feat/preserve-description-newlines' }
|
||||
tauri = { path = "./crates/tauri" }
|
||||
|
||||
18
README.md
18
README.md
@@ -21,7 +21,7 @@ To learn more about the details of how all of these pieces fit together, please
|
||||
|
||||
If you are interested in making a tauri app, please visit the [documentation website](https://tauri.app).
|
||||
|
||||
The quickest way to get started is to install the [prerequisites](https://tauri.app/v1/guides/getting-started/prerequisites) for your system and create a new project with [`create-tauri-app`](https://github.com/tauri-apps/create-tauri-app/#usage). For example with `npm`:
|
||||
The quickest way to get started is to install the [prerequisites](https://v2.tauri.app/start/prerequisites/) for your system and create a new project with [`create-tauri-app`](https://github.com/tauri-apps/create-tauri-app/#usage). For example with `npm`:
|
||||
|
||||
```sh
|
||||
npm create tauri-app@latest
|
||||
@@ -35,7 +35,7 @@ The list of Tauri's features includes, but is not limited to:
|
||||
- Built-in self updater (desktop only)
|
||||
- System tray icons
|
||||
- Native notifications
|
||||
- Localhost free (🔥)
|
||||
- [Localhost free (🔥)](https://github.com/tauri-apps/tauri/issues/10510)
|
||||
- GitHub action for streamlined CI
|
||||
- VS Code extension
|
||||
|
||||
@@ -43,13 +43,13 @@ The list of Tauri's features includes, but is not limited to:
|
||||
|
||||
Tauri currently supports development and distribution on the following platforms:
|
||||
|
||||
| Platform | Versions |
|
||||
| :----------------- | :-------------------------------------------------------------------------------------------------------------- |
|
||||
| Windows | 7 and above |
|
||||
| macOS | 10.15 and above |
|
||||
| Linux | webkit2gtk 4.0 for Tauri v1 (for example Ubuntu 18.04). webkit2gtk 4.1 for Tauri v2 (for example Ubuntu 22.04). |
|
||||
| iOS/iPadOS (beta) | 9 and above |
|
||||
| Android (beta) | 7 and above |
|
||||
| Platform | Versions |
|
||||
| :---------------- | :-------------------------------------------------------------------------------------------------------------- |
|
||||
| Windows | 7 and above |
|
||||
| macOS | 10.15 and above |
|
||||
| Linux | webkit2gtk 4.0 for Tauri v1 (for example Ubuntu 18.04). webkit2gtk 4.1 for Tauri v2 (for example Ubuntu 22.04). |
|
||||
| iOS/iPadOS (beta) | 9 and above |
|
||||
| Android (beta) | 7 and above |
|
||||
|
||||
## Contributing
|
||||
|
||||
|
||||
BIN
audits/Radically_Open_Security-v2-report.pdf
Normal file
BIN
audits/Radically_Open_Security-v2-report.pdf
Normal file
Binary file not shown.
@@ -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.77.2"
|
||||
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"
|
||||
@@ -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">
|
||||
|
||||
[](https://github.com/tauri-apps/tauri)
|
||||
[](https://opencollective.com/tauri)
|
||||
@@ -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};
|
||||
@@ -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");
|
||||
@@ -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 {
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
16
bench/tests/cpu_intensive/src-tauri/Cargo.toml
Normal file
16
bench/tests/cpu_intensive/src-tauri/Cargo.toml
Normal file
@@ -0,0 +1,16 @@
|
||||
[package]
|
||||
name = "bench_cpu_intensive"
|
||||
version = "0.1.0"
|
||||
description = "A very simple Tauri Application"
|
||||
edition = "2021"
|
||||
rust-version = "1.77.2"
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { path = "../../../../crates/tauri-build", features = [
|
||||
"codegen",
|
||||
] }
|
||||
|
||||
[dependencies]
|
||||
serde_json = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
tauri = { path = "../../../../crates/tauri", features = [] }
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../../../../core/tauri-config-schema/schema.json",
|
||||
"$schema": "../../../../crates/tauri-schema-generator/schemas/config.schema.json",
|
||||
"identifier": "com.tauri.dev",
|
||||
"build": {
|
||||
"frontendDist": "../public"
|
||||
@@ -23,11 +23,11 @@
|
||||
"active": true,
|
||||
"targets": "all",
|
||||
"icon": [
|
||||
"../../../../../examples/.icons/32x32.png",
|
||||
"../../../../../examples/.icons/128x128.png",
|
||||
"../../../../../examples/.icons/128x128@2x.png",
|
||||
"../../../../../examples/.icons/icon.icns",
|
||||
"../../../../../examples/.icons/icon.ico"
|
||||
"../../../../examples/.icons/32x32.png",
|
||||
"../../../../examples/.icons/128x128.png",
|
||||
"../../../../examples/.icons/128x128@2x.png",
|
||||
"../../../../examples/.icons/icon.icns",
|
||||
"../../../../examples/.icons/icon.ico"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
16
bench/tests/files_transfer/src-tauri/Cargo.toml
Normal file
16
bench/tests/files_transfer/src-tauri/Cargo.toml
Normal file
@@ -0,0 +1,16 @@
|
||||
[package]
|
||||
name = "bench_files_transfer"
|
||||
version = "0.1.0"
|
||||
description = "A very simple Tauri Application"
|
||||
edition = "2021"
|
||||
rust-version = "1.77.2"
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { path = "../../../../crates/tauri-build", features = [
|
||||
"codegen",
|
||||
] }
|
||||
|
||||
[dependencies]
|
||||
serde_json = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
tauri = { path = "../../../../crates/tauri", features = [] }
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../../../../core/tauri-config-schema/schema.json",
|
||||
"$schema": "../../../../crates/tauri-schema-generator/schemas/config.schema.json",
|
||||
"identifier": "com.tauri.dev",
|
||||
"build": {
|
||||
"frontendDist": "../public"
|
||||
@@ -23,11 +23,11 @@
|
||||
"active": true,
|
||||
"targets": "all",
|
||||
"icon": [
|
||||
"../../../../../examples/.icons/32x32.png",
|
||||
"../../../../../examples/.icons/128x128.png",
|
||||
"../../../../../examples/.icons/128x128@2x.png",
|
||||
"../../../../../examples/.icons/icon.icns",
|
||||
"../../../../../examples/.icons/icon.ico"
|
||||
"../../../../examples/.icons/32x32.png",
|
||||
"../../../../examples/.icons/128x128.png",
|
||||
"../../../../examples/.icons/128x128@2x.png",
|
||||
"../../../../examples/.icons/icon.icns",
|
||||
"../../../../examples/.icons/icon.ico"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
16
bench/tests/helloworld/src-tauri/Cargo.toml
Normal file
16
bench/tests/helloworld/src-tauri/Cargo.toml
Normal file
@@ -0,0 +1,16 @@
|
||||
[package]
|
||||
name = "bench_helloworld"
|
||||
version = "0.1.0"
|
||||
description = "A very simple Tauri Application"
|
||||
edition = "2021"
|
||||
rust-version = "1.77.2"
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { path = "../../../../crates/tauri-build", features = [
|
||||
"codegen",
|
||||
] }
|
||||
|
||||
[dependencies]
|
||||
serde_json = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
tauri = { path = "../../../../crates/tauri", features = [] }
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../../../../core/tauri-config-schema/schema.json",
|
||||
"$schema": "../../../../crates/tauri-schema-generator/schemas/config.schema.json",
|
||||
"identifier": "com.tauri.dev",
|
||||
"build": {
|
||||
"frontendDist": "../public",
|
||||
@@ -25,11 +25,11 @@
|
||||
"active": true,
|
||||
"targets": "all",
|
||||
"icon": [
|
||||
"../../../../../examples/.icons/32x32.png",
|
||||
"../../../../../examples/.icons/128x128.png",
|
||||
"../../../../../examples/.icons/128x128@2x.png",
|
||||
"../../../../../examples/.icons/icon.icns",
|
||||
"../../../../../examples/.icons/icon.ico"
|
||||
"../../../../examples/.icons/32x32.png",
|
||||
"../../../../examples/.icons/128x128.png",
|
||||
"../../../../examples/.icons/128x128@2x.png",
|
||||
"../../../../examples/.icons/icon.icns",
|
||||
"../../../../examples/.icons/icon.ico"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
use std::{error::Error, path::PathBuf};
|
||||
|
||||
use schemars::schema_for;
|
||||
use tauri_utils::{
|
||||
acl::capability::Capability,
|
||||
acl::{Permission, Scopes},
|
||||
write_if_changed,
|
||||
};
|
||||
|
||||
macro_rules! schema {
|
||||
($name:literal, $path:ty) => {
|
||||
(concat!($name, "-schema.json"), schema_for!($path))
|
||||
};
|
||||
}
|
||||
|
||||
pub fn main() -> Result<(), Box<dyn Error>> {
|
||||
let schemas = [
|
||||
schema!("capability", Capability),
|
||||
schema!("permission", Permission),
|
||||
schema!("scope", Scopes),
|
||||
];
|
||||
|
||||
let out = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR")?);
|
||||
for (filename, schema) in schemas {
|
||||
let schema = serde_json::to_string_pretty(&schema)?;
|
||||
write_if_changed(out.join(filename), schema)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user