mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-01-31 00:35:19 +01:00
Restructure the repository (#10796)
* Restructure the repository * lock file * fmt * fix bench * fix cli template test * remove accidental file * fix mv command * clippy * upgrade paths-filter github action * fix cli migration tests * lockfile * license headers * clippy * scope test-core to tauri crate * license header * correct --manifest-path usage * lockfile * fix tauri-driver on macOS [skip ci] * build target ios * try downgrade env_logger * downgrade 0.1.7 * try to fix bench * bench overflow * revert overflow fix, fix tauri_root_path * revert env_logger downgrade * fmt * raise msrv to 1.71 * fmt * delete .cargo/config.toml [skip ci] --------- Co-authored-by: Lucas Nogueira <lucas@tauri.app>
This commit is contained in:
@@ -128,7 +128,7 @@
|
|||||||
},
|
},
|
||||||
"packages": {
|
"packages": {
|
||||||
"@tauri-apps/api": {
|
"@tauri-apps/api": {
|
||||||
"path": "./tooling/api",
|
"path": "./packages/api",
|
||||||
"manager": "javascript",
|
"manager": "javascript",
|
||||||
"publish": [
|
"publish": [
|
||||||
{
|
{
|
||||||
@@ -149,61 +149,61 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"tauri-utils": {
|
"tauri-utils": {
|
||||||
"path": "./core/tauri-utils",
|
"path": "./crates/tauri-utils",
|
||||||
"manager": "rust"
|
"manager": "rust"
|
||||||
},
|
},
|
||||||
"tauri-macos-sign": {
|
"tauri-macos-sign": {
|
||||||
"path": "./tooling/macos-sign",
|
"path": "./crates/tauri-macos-sign",
|
||||||
"manager": "rust"
|
"manager": "rust"
|
||||||
},
|
},
|
||||||
"tauri-bundler": {
|
"tauri-bundler": {
|
||||||
"path": "./tooling/bundler",
|
"path": "./crates/tauri-bundler",
|
||||||
"manager": "rust",
|
"manager": "rust",
|
||||||
"dependencies": ["tauri-utils", "tauri-macos-sign"]
|
"dependencies": ["tauri-utils", "tauri-macos-sign"]
|
||||||
},
|
},
|
||||||
"tauri-runtime": {
|
"tauri-runtime": {
|
||||||
"path": "./core/tauri-runtime",
|
"path": "./crates/tauri-runtime",
|
||||||
"manager": "rust",
|
"manager": "rust",
|
||||||
"dependencies": ["tauri-utils"]
|
"dependencies": ["tauri-utils"]
|
||||||
},
|
},
|
||||||
"tauri-runtime-wry": {
|
"tauri-runtime-wry": {
|
||||||
"path": "./core/tauri-runtime-wry",
|
"path": "./crates/tauri-runtime-wry",
|
||||||
"manager": "rust",
|
"manager": "rust",
|
||||||
"dependencies": ["tauri-utils", "tauri-runtime"]
|
"dependencies": ["tauri-utils", "tauri-runtime"]
|
||||||
},
|
},
|
||||||
"tauri-codegen": {
|
"tauri-codegen": {
|
||||||
"path": "./core/tauri-codegen",
|
"path": "./crates/tauri-codegen",
|
||||||
"manager": "rust",
|
"manager": "rust",
|
||||||
"dependencies": ["tauri-utils"]
|
"dependencies": ["tauri-utils"]
|
||||||
},
|
},
|
||||||
"tauri-macros": {
|
"tauri-macros": {
|
||||||
"path": "./core/tauri-macros",
|
"path": "./crates/tauri-macros",
|
||||||
"manager": "rust",
|
"manager": "rust",
|
||||||
"dependencies": ["tauri-codegen", "tauri-utils"]
|
"dependencies": ["tauri-codegen", "tauri-utils"]
|
||||||
},
|
},
|
||||||
"tauri-plugin": {
|
"tauri-plugin": {
|
||||||
"path": "./core/tauri-plugin",
|
"path": "./crates/tauri-plugin",
|
||||||
"manager": "rust",
|
"manager": "rust",
|
||||||
"dependencies": ["tauri-utils"],
|
"dependencies": ["tauri-utils"],
|
||||||
"postversion": "node ../../.scripts/ci/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }"
|
"postversion": "node ../../.scripts/ci/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }"
|
||||||
},
|
},
|
||||||
"tauri-build": {
|
"tauri-build": {
|
||||||
"path": "./core/tauri-build",
|
"path": "./crates/tauri-build",
|
||||||
"manager": "rust",
|
"manager": "rust",
|
||||||
"dependencies": ["tauri-codegen", "tauri-utils"],
|
"dependencies": ["tauri-codegen", "tauri-utils"],
|
||||||
"postversion": [
|
"postversion": [
|
||||||
"node ../../.scripts/ci/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }",
|
"node ../../.scripts/ci/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }",
|
||||||
"cargo build --manifest-path ../tauri-config-schema/Cargo.toml"
|
"cargo build --manifest-path ../tauri-schema-generator/Cargo.toml"
|
||||||
],
|
],
|
||||||
"assets": [
|
"assets": [
|
||||||
{
|
{
|
||||||
"path": "./tooling/cli/schema.json",
|
"path": "./crates/tauri-schema-generator/schemas/config.schema.json",
|
||||||
"name": "schema.json"
|
"name": "config.schema.json"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"tauri": {
|
"tauri": {
|
||||||
"path": "./core/tauri",
|
"path": "./crates/tauri",
|
||||||
"manager": "rust",
|
"manager": "rust",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"tauri-macros",
|
"tauri-macros",
|
||||||
@@ -215,28 +215,28 @@
|
|||||||
"postversion": "node ../../.scripts/ci/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }"
|
"postversion": "node ../../.scripts/ci/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }"
|
||||||
},
|
},
|
||||||
"@tauri-apps/cli": {
|
"@tauri-apps/cli": {
|
||||||
"path": "./tooling/cli/node",
|
"path": "./packages/cli",
|
||||||
"manager": "javascript",
|
"manager": "javascript",
|
||||||
"dependencies": ["tauri-cli"],
|
"dependencies": ["tauri-cli"],
|
||||||
"postversion": [
|
"postversion": [
|
||||||
"node ../../../.scripts/ci/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }",
|
"node ../../../.scripts/ci/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }",
|
||||||
"cargo build --manifest-path ../../../core/tauri-config-schema/Cargo.toml"
|
"cargo build --manifest-path ../../../crates/tauri-schema-generator/Cargo.toml"
|
||||||
],
|
],
|
||||||
"prepublish": [],
|
"prepublish": [],
|
||||||
"publish": [],
|
"publish": [],
|
||||||
"postpublish": []
|
"postpublish": []
|
||||||
},
|
},
|
||||||
"tauri-cli": {
|
"tauri-cli": {
|
||||||
"path": "./tooling/cli",
|
"path": "./crates/tauri-cli",
|
||||||
"manager": "rust",
|
"manager": "rust",
|
||||||
"dependencies": ["tauri-bundler", "tauri-utils", "tauri-macos-sign"],
|
"dependencies": ["tauri-bundler", "tauri-utils", "tauri-macos-sign"],
|
||||||
"postversion": [
|
"postversion": [
|
||||||
"cargo check",
|
"cargo check",
|
||||||
"cargo build --manifest-path ../../core/tauri-config-schema/Cargo.toml"
|
"cargo build --manifest-path ../../crates/tauri-schema-generator/Cargo.toml"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"tauri-driver": {
|
"tauri-driver": {
|
||||||
"path": "./tooling/webdriver",
|
"path": "./crates/tauri-driver",
|
||||||
"manager": "rust",
|
"manager": "rust",
|
||||||
"postversion": "cargo check"
|
"postversion": "cargo check"
|
||||||
}
|
}
|
||||||
|
|||||||
10
.github/CONTRIBUTING.md
vendored
10
.github/CONTRIBUTING.md
vendored
@@ -48,7 +48,7 @@ Hi! We, the maintainers, are really excited that you are interested in contribut
|
|||||||
|
|
||||||
First, [join our Discord server](https://discord.gg/SpmNs4S) and let us know that you want to contribute. This way we can point you in the right direction and help ensure your contribution will be as helpful as possible.
|
First, [join our Discord server](https://discord.gg/SpmNs4S) and let us know that you want to contribute. This way we can point you in the right direction and help ensure your contribution will be as helpful as possible.
|
||||||
|
|
||||||
To set up your machine for development, follow the [Tauri setup guide](https://tauri.app/v1/guides/getting-started/prerequisites/) to get all the tools you need to develop Tauri apps. The only additional tool you may need is [PNPM](https://pnpm.io/), it is only required if you are developing the Node CLI or API packages (`tooling/cli/node` and `tooling/api`). Next, fork and clone this repo. It is structured as a monorepo, which means that all the various Tauri packages are under the same repository. The development process varies depending on what part of Tauri you are contributing to, see the guides below for per-package instructions.
|
To set up your machine for development, follow the [Tauri setup guide](https://tauri.app/v1/guides/getting-started/prerequisites/) to get all the tools you need to develop Tauri apps. The only additional tool you may need is [PNPM](https://pnpm.io/), it is only required if you are developing the Node CLI or API packages (`packages/cli` and `packages/api`). Next, fork and clone this repo. It is structured as a monorepo, which means that all the various Tauri packages are under the same repository. The development process varies depending on what part of Tauri you are contributing to, see the guides below for per-package instructions.
|
||||||
|
|
||||||
Some Tauri packages will be automatically built when running one of the examples. Others, however, will need to be built beforehand. To build these automatically, run the `.scripts/setup.sh` (Linux and macOS) or `.scripts/setup.ps1` (Windows) script. This will install the Rust and Node.js CLI and build the JS API. After that, you should be able to run all the examples. Note that the setup script should be executed from the root folder of the repository in order to run correctly.
|
Some Tauri packages will be automatically built when running one of the examples. Others, however, will need to be built beforehand. To build these automatically, run the `.scripts/setup.sh` (Linux and macOS) or `.scripts/setup.ps1` (Windows) script. This will install the Rust and Node.js CLI and build the JS API. After that, you should be able to run all the examples. Note that the setup script should be executed from the root folder of the repository in order to run correctly.
|
||||||
|
|
||||||
@@ -58,15 +58,15 @@ See [Architecture](../ARCHITECTURE.md#major-components) for an overview of the p
|
|||||||
|
|
||||||
### Developing Tauri Bundler and Rust CLI
|
### 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`)
|
### 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)
|
### 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
|
#### Building the documentation locally
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ $ RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features --open
|
|||||||
|
|
||||||
### Developing the JS API
|
### Developing the JS API
|
||||||
|
|
||||||
The JS API provides bindings between the developer's JS in the Webview and the builtin Tauri APIs, written in Rust. Its code is located in `[Tauri repo root]/tooling/api`. After making changes to the code, run `pnpm build` to build it. To test your changes, we recommend using the API example app, located in `[Tauri repo root]/examples/api`. It will automatically use your local copy of the JS API and provides a helpful UI to test the various commands.
|
The JS API provides bindings between the developer's JS in the Webview and the builtin Tauri APIs, written in Rust. Its code is located in `[Tauri repo root]/packages/api`. After making changes to the code, run `pnpm build` to build it. To test your changes, we recommend using the API example app, located in `[Tauri repo root]/examples/api`. It will automatically use your local copy of the JS API and provides a helpful UI to test the various commands.
|
||||||
|
|
||||||
## Financial Contribution
|
## Financial Contribution
|
||||||
|
|
||||||
|
|||||||
2
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
2
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
@@ -5,7 +5,7 @@
|
|||||||
name: 💡 Feature Request
|
name: 💡 Feature Request
|
||||||
title: '[feat] '
|
title: '[feat] '
|
||||||
description: Suggest an idea
|
description: Suggest an idea
|
||||||
labels: 'type: feature request'
|
labels: ['type: feature request']
|
||||||
|
|
||||||
body:
|
body:
|
||||||
- type: textarea
|
- type: textarea
|
||||||
|
|||||||
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:
|
Examples of good title:
|
||||||
- fix(windows): fix race condition in event loop
|
- fix(windows): fix race condition in event loop
|
||||||
- docs: update docstrings
|
- docs: update example for `App::show`
|
||||||
- feat: add `Window::set_fullscreen`
|
- feat: add `Window::set_fullscreen`
|
||||||
|
|
||||||
Examples of bad title:
|
Examples of bad title:
|
||||||
|
|||||||
2
.github/workflows/audit.yml
vendored
2
.github/workflows/audit.yml
vendored
@@ -37,5 +37,5 @@ jobs:
|
|||||||
- run: corepack enable
|
- run: corepack enable
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '18'
|
node-version: 'lts/*'
|
||||||
- run: pnpm audit
|
- run: pnpm audit
|
||||||
|
|||||||
16
.github/workflows/bench.yml
vendored
16
.github/workflows/bench.yml
vendored
@@ -8,11 +8,11 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- dev
|
||||||
- 1.x
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/bench.yml'
|
- '.github/workflows/bench.yml'
|
||||||
|
- 'bench/**'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
RUST_BACKTRACE: 1
|
RUST_BACKTRACE: 1
|
||||||
@@ -55,7 +55,7 @@ jobs:
|
|||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y --no-install-recommends \
|
sudo apt-get install -y --no-install-recommends \
|
||||||
libwebkit2gtk-4.1-dev libayatana-appindicator3-dev \
|
webkit2gtk-4.1 libayatana-appindicator3-dev \
|
||||||
xvfb \
|
xvfb \
|
||||||
at-spi2-core
|
at-spi2-core
|
||||||
wget https://github.com/sharkdp/hyperfine/releases/download/v1.18.0/hyperfine_1.18.0_amd64.deb
|
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
|
pip install memory_profiler
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
|
||||||
workspaces: |
|
|
||||||
core -> ../target
|
|
||||||
tooling/bench/tests
|
|
||||||
|
|
||||||
- name: run benchmarks
|
- name: run benchmarks
|
||||||
run: |
|
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
|
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 }}
|
||||||
xvfb-run --auto-servernum cargo run --manifest-path tooling/bench/Cargo.toml --bin run_benchmark
|
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
|
- name: clone benchmarks_results
|
||||||
if: github.repository == 'tauri-apps/tauri' && github.ref == 'refs/heads/dev'
|
if: github.repository == 'tauri-apps/tauri' && github.ref == 'refs/heads/dev'
|
||||||
@@ -84,7 +82,7 @@ jobs:
|
|||||||
- name: push new benchmarks
|
- name: push new benchmarks
|
||||||
if: github.repository == 'tauri-apps/tauri' && github.ref == 'refs/heads/dev'
|
if: github.repository == 'tauri-apps/tauri' && github.ref == 'refs/heads/dev'
|
||||||
run: |
|
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
|
cd gh-pages
|
||||||
git pull
|
git pull
|
||||||
git config user.name "tauri-bench"
|
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:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- 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
|
||||||
|
end
|
||||||
|
|
||||||
|
- uses: dorny/paths-filter@v3
|
||||||
id: filter
|
id: filter
|
||||||
with:
|
with:
|
||||||
list-files: shell
|
list-files: shell
|
||||||
|
|||||||
40
.github/workflows/check-generated-files.yml
vendored
40
.github/workflows/check-generated-files.yml
vendored
@@ -8,11 +8,11 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/check-generated-files.yml'
|
- '.github/workflows/check-generated-files.yml'
|
||||||
- 'tooling/api/src/**'
|
- 'packages/api/src/**'
|
||||||
- 'core/tauri/scripts/bundle.global.js'
|
- 'crates/tauri/scripts/bundle.global.js'
|
||||||
- 'core/tauri-utils/src/config.rs'
|
- 'crates/tauri-utils/src/config.rs'
|
||||||
- 'tooling/cli/schema.json'
|
- 'crates/tauri-cli/config.schema.json'
|
||||||
- 'core/tauri-config-schema/schema.json'
|
- 'crates/tauri-schema-generator/schemas/*.json'
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
@@ -26,18 +26,17 @@ jobs:
|
|||||||
schema: ${{ steps.filter.outputs.schema }}
|
schema: ${{ steps.filter.outputs.schema }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dorny/paths-filter@v2
|
- uses: dorny/paths-filter@v3
|
||||||
id: filter
|
id: filter
|
||||||
with:
|
with:
|
||||||
filters: |
|
filters: |
|
||||||
api:
|
api:
|
||||||
- 'tooling/api/src/**'
|
- 'packages/api/src/**'
|
||||||
- 'core/tauri/scripts/bundle.global.js'
|
- 'crates/tauri/scripts/bundle.global.js'
|
||||||
schema:
|
schema:
|
||||||
- 'core/tauri-utils/src/config.rs'
|
- 'crates/tauri-utils/src/config.rs'
|
||||||
- 'tooling/cli/schema.json'
|
- 'crates/tauri-cli/config.schema.json'
|
||||||
- 'core/tauri-config-schema/schema.json'
|
- 'crates/tauri-schema-generator/schemas/*.json'
|
||||||
- 'core/tauri-acl-schema/*.json'
|
|
||||||
|
|
||||||
api:
|
api:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -51,9 +50,11 @@ jobs:
|
|||||||
node-version: 'lts/*'
|
node-version: 'lts/*'
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
- name: install deps
|
||||||
|
run: pnpm i --frozen-lockfile
|
||||||
- name: build api
|
- name: build api
|
||||||
working-directory: tooling/api
|
run: pnpm build
|
||||||
run: pnpm i --frozen-lockfile && pnpm build
|
working-directory: packages/api
|
||||||
- name: check api
|
- name: check api
|
||||||
run: ./.scripts/ci/has-diff.sh
|
run: ./.scripts/ci/has-diff.sh
|
||||||
|
|
||||||
@@ -73,14 +74,9 @@ jobs:
|
|||||||
sudo apt-get install -y libgtk-3-dev
|
sudo apt-get install -y libgtk-3-dev
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
|
||||||
workspaces: core -> ../target
|
|
||||||
|
|
||||||
- name: generate config schema
|
- name: generate schemas
|
||||||
run: cargo build --manifest-path ./core/tauri-config-schema/Cargo.toml
|
run: cargo build --manifest-path ./crates/tauri-schema-generator/Cargo.toml
|
||||||
|
|
||||||
- name: generate ACL schema
|
- name: check schemas
|
||||||
run: cargo build --manifest-path ./core/tauri-acl-schema/Cargo.toml
|
|
||||||
|
|
||||||
- name: check schema
|
|
||||||
run: ./.scripts/ci/has-diff.sh
|
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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dorny/paths-filter@v2
|
- uses: dorny/paths-filter@v3
|
||||||
id: filter
|
id: filter
|
||||||
with:
|
with:
|
||||||
list-files: shell
|
list-files: shell
|
||||||
|
|||||||
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@v4
|
|
||||||
with:
|
|
||||||
node-version: 14
|
|
||||||
registry-url: 'https://registry.npmjs.org'
|
|
||||||
cache: 'yarn'
|
|
||||||
cache-dependency-path: tooling/*/yarn.lock
|
|
||||||
|
|
||||||
- name: cargo login
|
|
||||||
run: cargo login ${{ secrets.ORG_CRATES_IO_TOKEN }}
|
|
||||||
- name: git config
|
|
||||||
run: |
|
|
||||||
git config --global user.name "${{ github.event.pusher.name }}"
|
|
||||||
git config --global user.email "${{ github.event.pusher.email }}"
|
|
||||||
|
|
||||||
- name: covector version or publish (publish when no change files present)
|
|
||||||
uses: jbolda/covector/packages/action@covector-v0
|
|
||||||
id: covector
|
|
||||||
env:
|
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.ORG_NPM_TOKEN }}
|
|
||||||
CARGO_AUDIT_OPTIONS: ${{ secrets.CARGO_AUDIT_OPTIONS }}
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
command: 'version-or-publish'
|
|
||||||
createRelease: true
|
|
||||||
|
|
||||||
- name: Create Pull Request With Versions Bumped
|
|
||||||
if: steps.covector.outputs.commandRan == 'version'
|
|
||||||
uses: tauri-apps/create-pull-request@v3
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
branch: release/version-updates-v1
|
|
||||||
title: Apply Version Updates From Current Changes (v1)
|
|
||||||
commit-message: 'apply version updates'
|
|
||||||
labels: 'version updates'
|
|
||||||
body: ${{ steps.covector.outputs.change }}
|
|
||||||
|
|
||||||
- name: Trigger doc update
|
|
||||||
if: |
|
|
||||||
steps.covector.outputs.successfulPublish == 'true' &&
|
|
||||||
steps.covector.outputs.packagesPublished != ''
|
|
||||||
uses: peter-evans/repository-dispatch@v1
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.ORG_TAURI_BOT_PAT }}
|
|
||||||
repository: tauri-apps/tauri-docs
|
|
||||||
event-type: update-docs
|
|
||||||
|
|
||||||
- name: Trigger `@tauri-apps/cli` publishing workflow
|
|
||||||
if: |
|
|
||||||
steps.covector.outputs.successfulPublish == 'true' &&
|
|
||||||
contains(steps.covector.outputs.packagesPublished, '@tauri-apps/cli')
|
|
||||||
uses: peter-evans/repository-dispatch@v1
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.ORG_TAURI_BOT_PAT }}
|
|
||||||
event-type: publish-js-cli
|
|
||||||
client-payload: >-
|
|
||||||
{"releaseId": "${{ steps.covector.outputs['-tauri-apps-cli-releaseId'] }}" }
|
|
||||||
|
|
||||||
- name: Trigger `tauri-cli` publishing workflow
|
|
||||||
if: |
|
|
||||||
steps.covector.outputs.successfulPublish == 'true' &&
|
|
||||||
contains(steps.covector.outputs.packagesPublished, 'tauri-cli')
|
|
||||||
uses: peter-evans/repository-dispatch@v1
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.ORG_TAURI_BOT_PAT }}
|
|
||||||
event-type: publish-clirs
|
|
||||||
@@ -24,6 +24,10 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- run: corepack enable
|
- run: corepack enable
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
- name: install stable
|
- name: install stable
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
@@ -35,13 +39,9 @@ jobs:
|
|||||||
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev libfuse2
|
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev libfuse2
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
|
||||||
workspaces: |
|
|
||||||
core -> ../target
|
|
||||||
tooling/cli
|
|
||||||
|
|
||||||
- name: build CLI
|
- name: build CLI
|
||||||
run: cargo build --manifest-path ./tooling/cli/Cargo.toml
|
run: cargo build --manifest-path ./crates/cli/Cargo.toml
|
||||||
|
|
||||||
- name: run integration tests
|
- name: run integration tests
|
||||||
run: cargo test --test '*' -- --ignored
|
run: cargo test --test '*' -- --ignored
|
||||||
@@ -49,7 +49,7 @@ jobs:
|
|||||||
- name: run CLI tests
|
- name: run CLI tests
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
run: |
|
run: |
|
||||||
cd ./tooling/cli/node
|
cd ./packages/cli
|
||||||
pnpm i --frozen-lockfile
|
pnpm i --frozen-lockfile
|
||||||
pnpm build
|
pnpm build
|
||||||
pnpm test
|
pnpm test
|
||||||
@@ -76,7 +76,7 @@ jobs:
|
|||||||
- run: corepack enable
|
- run: corepack enable
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 20
|
||||||
registry-url: 'https://registry.npmjs.org'
|
registry-url: 'https://registry.npmjs.org'
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
|||||||
8
.github/workflows/docker.yml
vendored
8
.github/workflows/docker.yml
vendored
@@ -38,13 +38,13 @@ jobs:
|
|||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: build CLI
|
- 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
|
- name: Upload CLI
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: cargo-tauri
|
name: cargo-tauri
|
||||||
path: tooling/cli/target/debug/cargo-tauri
|
path: crates/tauri-cli/target/debug/cargo-tauri
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
@@ -70,7 +70,7 @@ jobs:
|
|||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 'lts/*'
|
||||||
|
|
||||||
- name: Download cross
|
- name: Download cross
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
@@ -112,7 +112,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
cd tooling/api
|
cd packages/api
|
||||||
pnpm i --frozen-lockfile && pnpm build
|
pnpm i --frozen-lockfile && pnpm build
|
||||||
cd ../../examples/api
|
cd ../../examples/api
|
||||||
pnpm i --frozen-lockfile
|
pnpm i --frozen-lockfile
|
||||||
|
|||||||
56
.github/workflows/lint-core.yml
vendored
56
.github/workflows/lint-core.yml
vendored
@@ -1,56 +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:
|
|
||||||
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
|
|
||||||
3
.github/workflows/lint-js.yml
vendored
3
.github/workflows/lint-js.yml
vendored
@@ -8,8 +8,7 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/lint-js.yml'
|
- '.github/workflows/lint-js.yml'
|
||||||
- 'tooling/cli/node/**'
|
- 'packages/**'
|
||||||
- 'tooling/api/**'
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
|||||||
@@ -2,17 +2,16 @@
|
|||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
name: lint cli
|
name: lint rust
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- dev
|
||||||
- 1.x
|
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/lint-cli.yml'
|
- '.github/workflows/lint-cli.yml'
|
||||||
- 'tooling/cli/**'
|
- 'crates/**'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
RUST_BACKTRACE: 1
|
RUST_BACKTRACE: 1
|
||||||
@@ -23,27 +22,13 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
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:
|
clippy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: install Rust stable and clippy
|
- name: install rust stable and clippy
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
components: clippy
|
components: clippy
|
||||||
@@ -51,11 +36,8 @@ jobs:
|
|||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
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
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
|
||||||
workspaces: tooling/cli
|
|
||||||
|
|
||||||
- name: run Clippy
|
- run: cargo clippy --all-targets --all-features -- -D warnings
|
||||||
run: cargo clippy --manifest-path ./tooling/cli/Cargo.toml --all-targets --all-features -- -D warnings
|
|
||||||
36
.github/workflows/publish-cli-js.yml
vendored
36
.github/workflows/publish-cli-js.yml
vendored
@@ -18,7 +18,7 @@ on:
|
|||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: tooling/cli/node/
|
working-directory: packages/cli/
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -48,14 +48,14 @@ jobs:
|
|||||||
target: x86_64-unknown-linux-gnu
|
target: x86_64-unknown-linux-gnu
|
||||||
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
|
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
|
||||||
build: |
|
build: |
|
||||||
cd tooling/cli/node
|
cd packages/cli
|
||||||
pnpm build:release --target x86_64-unknown-linux-gnu
|
pnpm build:release --target x86_64-unknown-linux-gnu
|
||||||
strip *.node
|
strip *.node
|
||||||
- host: ubuntu-20.04
|
- host: ubuntu-20.04
|
||||||
target: x86_64-unknown-linux-musl
|
target: x86_64-unknown-linux-musl
|
||||||
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
|
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
|
||||||
build: |
|
build: |
|
||||||
cd tooling/cli/node
|
cd packages/cli
|
||||||
pnpm build:release
|
pnpm build:release
|
||||||
strip *.node
|
strip *.node
|
||||||
- host: macos-latest
|
- host: macos-latest
|
||||||
@@ -67,7 +67,7 @@ jobs:
|
|||||||
target: aarch64-unknown-linux-gnu
|
target: aarch64-unknown-linux-gnu
|
||||||
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
|
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
|
||||||
build: |
|
build: |
|
||||||
cd tooling/cli/node
|
cd packages/cli
|
||||||
pnpm build:release --target aarch64-unknown-linux-gnu
|
pnpm build:release --target aarch64-unknown-linux-gnu
|
||||||
aarch64-unknown-linux-gnu-strip *.node
|
aarch64-unknown-linux-gnu-strip *.node
|
||||||
- host: ubuntu-20.04
|
- host: ubuntu-20.04
|
||||||
@@ -84,11 +84,11 @@ jobs:
|
|||||||
target: aarch64-unknown-linux-musl
|
target: aarch64-unknown-linux-musl
|
||||||
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
|
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
|
||||||
build: |
|
build: |
|
||||||
cd tooling/cli/node
|
cd packages/cli
|
||||||
rustup target add aarch64-unknown-linux-musl
|
rustup target add aarch64-unknown-linux-musl
|
||||||
pnpm build:release --target aarch64-unknown-linux-musl
|
pnpm build:release --target aarch64-unknown-linux-musl
|
||||||
/aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node
|
/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 }}
|
runs-on: ${{ matrix.settings.host }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -97,7 +97,7 @@ jobs:
|
|||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
if: ${{ !matrix.settings.docker }}
|
if: ${{ !matrix.settings.docker }}
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 20
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
architecture: ${{ matrix.settings.architecture }}
|
architecture: ${{ matrix.settings.architecture }}
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
@@ -108,7 +108,7 @@ jobs:
|
|||||||
- uses: Swatinem/rust-cache@v1
|
- uses: Swatinem/rust-cache@v1
|
||||||
with:
|
with:
|
||||||
key: ${{ matrix.settings.target }}
|
key: ${{ matrix.settings.target }}
|
||||||
working-directory: 'tooling/cli/'
|
working-directory: 'crates/tauri-cli/'
|
||||||
if: ${{ matrix.settings.docker }}
|
if: ${{ matrix.settings.docker }}
|
||||||
- name: Setup toolchain
|
- name: Setup toolchain
|
||||||
run: ${{ matrix.settings.setup }}
|
run: ${{ matrix.settings.setup }}
|
||||||
@@ -134,7 +134,7 @@ jobs:
|
|||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: bindings-${{ matrix.settings.target }}
|
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
|
if-no-files-found: error
|
||||||
# build-freebsd:
|
# build-freebsd:
|
||||||
# runs-on: macos-10.15
|
# runs-on: macos-10.15
|
||||||
@@ -173,7 +173,7 @@ jobs:
|
|||||||
# whoami
|
# whoami
|
||||||
# env
|
# env
|
||||||
# freebsd-version
|
# freebsd-version
|
||||||
# cd ./tooling/cli/node/
|
# cd ./packages/cli/
|
||||||
# pnpm i --frozen-lockfile --ignore-scripts
|
# pnpm i --frozen-lockfile --ignore-scripts
|
||||||
# pnpm build:release
|
# pnpm build:release
|
||||||
# strip -x *.node
|
# strip -x *.node
|
||||||
@@ -183,7 +183,7 @@ jobs:
|
|||||||
# uses: actions/upload-artifact@v3
|
# uses: actions/upload-artifact@v3
|
||||||
# with:
|
# with:
|
||||||
# name: bindings-freebsd
|
# name: bindings-freebsd
|
||||||
# path: tooling/cli/node/${{ env.APP_NAME }}.*.node
|
# path: packages/cli/${{ env.APP_NAME }}.*.node
|
||||||
# if-no-files-found: error
|
# if-no-files-found: error
|
||||||
test-macOS-windows-binding:
|
test-macOS-windows-binding:
|
||||||
name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }}
|
name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }}
|
||||||
@@ -215,7 +215,7 @@ jobs:
|
|||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: bindings-${{ matrix.settings.target }}
|
name: bindings-${{ matrix.settings.target }}
|
||||||
path: 'tooling/cli/node/'
|
path: 'packages/cli/'
|
||||||
- name: List packages
|
- name: List packages
|
||||||
run: ls -R .
|
run: ls -R .
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -246,7 +246,7 @@ jobs:
|
|||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: bindings-x86_64-unknown-linux-gnu
|
name: bindings-x86_64-unknown-linux-gnu
|
||||||
path: 'tooling/cli/node/'
|
path: 'packages/cli'
|
||||||
- name: List packages
|
- name: List packages
|
||||||
run: ls -R .
|
run: ls -R .
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -283,7 +283,7 @@ jobs:
|
|||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: bindings-x86_64-unknown-linux-musl
|
name: bindings-x86_64-unknown-linux-musl
|
||||||
path: 'tooling/cli/node/'
|
path: 'packages/cli/'
|
||||||
- name: List packages
|
- name: List packages
|
||||||
run: ls -R .
|
run: ls -R .
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -322,12 +322,12 @@ jobs:
|
|||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: bindings-aarch64-unknown-linux-gnu
|
name: bindings-aarch64-unknown-linux-gnu
|
||||||
path: 'tooling/cli/node/'
|
path: 'packages/cli'
|
||||||
- name: Download armv7-gnueabihf artifacts
|
- name: Download armv7-gnueabihf artifacts
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: bindings-armv7-unknown-linux-gnueabihf
|
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
|
# TODO: actually run test, blocked by https://github.com/rust-lang/cargo/issues/8719
|
||||||
- uses: addnab/docker-run-action@v3
|
- uses: addnab/docker-run-action@v3
|
||||||
with:
|
with:
|
||||||
@@ -345,7 +345,7 @@ jobs:
|
|||||||
eval "$(fnm env --use-on-cd)"
|
eval "$(fnm env --use-on-cd)"
|
||||||
fnm install ${{ matrix.node }}
|
fnm install ${{ matrix.node }}
|
||||||
fnm use ${{ matrix.node }}
|
fnm use ${{ matrix.node }}
|
||||||
cd tooling/cli/node
|
cd packages/cli
|
||||||
node tauri.js --help
|
node tauri.js --help
|
||||||
ls -la
|
ls -la
|
||||||
publish:
|
publish:
|
||||||
@@ -373,7 +373,7 @@ jobs:
|
|||||||
- name: Download all artifacts
|
- name: Download all artifacts
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: tooling/cli/node/artifacts
|
path: packages/cli/artifacts
|
||||||
- name: Move artifacts
|
- name: Move artifacts
|
||||||
run: pnpm artifacts
|
run: pnpm artifacts
|
||||||
- name: List packages
|
- name: List packages
|
||||||
|
|||||||
6
.github/workflows/publish-cli-rs.yml
vendored
6
.github/workflows/publish-cli-rs.yml
vendored
@@ -58,13 +58,13 @@ jobs:
|
|||||||
sudo apt-get install -y libgtk-3-dev
|
sudo apt-get install -y libgtk-3-dev
|
||||||
|
|
||||||
- name: Build CLI
|
- 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
|
- name: Upload CLI
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: cargo-tauri-${{ matrix.config.rust_target }}${{ matrix.config.ext }}
|
name: cargo-tauri-${{ matrix.config.rust_target }}${{ matrix.config.ext }}
|
||||||
path: tooling/cli/target/release-size-optimized/cargo-tauri${{ matrix.config.ext }}
|
path: crates/tauri-cli/target/release-size-optimized/cargo-tauri${{ matrix.config.ext }}
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
upload:
|
upload:
|
||||||
@@ -84,7 +84,7 @@ jobs:
|
|||||||
run: ./.scripts/ci/pack-cli.sh
|
run: ./.scripts/ci/pack-cli.sh
|
||||||
|
|
||||||
- name: Get CLI version
|
- 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
|
- name: Publish release
|
||||||
uses: softprops/action-gh-release@50195ba7f6f93d1ac97ba8332a178e008ad176aa
|
uses: softprops/action-gh-release@50195ba7f6f93d1ac97ba8332a178e008ad176aa
|
||||||
|
|||||||
1
.github/workflows/supply-chain.yml
vendored
1
.github/workflows/supply-chain.yml
vendored
@@ -10,7 +10,6 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- dev
|
||||||
- 1.x
|
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/supply-chain.yml'
|
- '.github/workflows/supply-chain.yml'
|
||||||
- '**/Cargo.lock'
|
- '**/Cargo.lock'
|
||||||
|
|||||||
36
.github/workflows/test-android.yml
vendored
36
.github/workflows/test-android.yml
vendored
@@ -8,13 +8,13 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/test-android.yml'
|
- '.github/workflows/test-android.yml'
|
||||||
- 'tooling/cli/templates/mobile/android/**'
|
- 'crates/tauri-cli/templates/mobile/android/**'
|
||||||
- 'tooling/cli/src/mobile/**'
|
- 'crates/tauri-cli/src/mobile/**'
|
||||||
- '!tooling/cli/src/mobile/ios.rs'
|
- '!crates/tauri-cli/src/mobile/ios.rs'
|
||||||
- '!tooling/cli/src/mobile/ios/**'
|
- '!crates/tauri-cli/src/mobile/ios/**'
|
||||||
- 'core/tauri-build/src/mobile.rs'
|
- 'crates/tauri-build/src/mobile.rs'
|
||||||
- 'core/tauri/mobile/android/**'
|
- 'crates/tauri/mobile/android/**'
|
||||||
- 'core/tauri/mobile/android-codegen/**'
|
- 'crates/tauri/mobile/android-codegen/**'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
@@ -46,7 +46,7 @@ jobs:
|
|||||||
- name: setup node
|
- name: setup node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: lts/*
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v3
|
||||||
@@ -75,29 +75,23 @@ jobs:
|
|||||||
done
|
done
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
|
||||||
workspaces: |
|
|
||||||
tooling/cli
|
|
||||||
examples/api/src-tauri
|
|
||||||
|
|
||||||
- name: build CLI
|
- 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
|
- name: move CLI to cargo bin dir
|
||||||
if: matrix.platform != 'windows-latest'
|
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
|
- name: move CLI to cargo bin dir
|
||||||
if: matrix.platform == 'windows-latest'
|
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
|
- name: build Tauri API
|
||||||
working-directory: ./tooling/api
|
working-directory: ./packages/api
|
||||||
run: pnpm i --frozen-lockfile && pnpm build
|
run: pnpm build
|
||||||
|
|
||||||
- name: install API example dependencies
|
|
||||||
working-directory: ./examples/api
|
|
||||||
run: pnpm i --frozen-lockfile
|
|
||||||
|
|
||||||
- name: init Android Studio project
|
- name: init Android Studio project
|
||||||
working-directory: ./examples/api
|
working-directory: ./examples/api
|
||||||
|
|||||||
11
.github/workflows/test-cli-js.yml
vendored
11
.github/workflows/test-cli-js.yml
vendored
@@ -8,12 +8,11 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- dev
|
||||||
- 1.x
|
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/test-cli-js.yml'
|
- '.github/workflows/test-cli-js.yml'
|
||||||
# currently` @tauri-apps/cli` only tests the template
|
# currently` @tauri-apps/cli` only tests the template
|
||||||
- 'tooling/cli/templates/app/**'
|
- 'crates/tauri-cli/templates/app/**'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
RUST_BACKTRACE: 1
|
RUST_BACKTRACE: 1
|
||||||
@@ -42,7 +41,7 @@ jobs:
|
|||||||
- name: setup node
|
- name: setup node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 'lts/*'
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
||||||
- name: install Linux dependencies
|
- name: install Linux dependencies
|
||||||
@@ -52,15 +51,11 @@ jobs:
|
|||||||
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev
|
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
|
||||||
workspaces: |
|
|
||||||
tooling/cli
|
|
||||||
tooling/cli/node/test/jest/fixtures/empty/src-tauri
|
|
||||||
|
|
||||||
- name: test
|
- name: test
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
run: |
|
run: |
|
||||||
cd ./tooling/cli/node
|
cd ./packages/cli
|
||||||
pnpm i --frozen-lockfile
|
pnpm i --frozen-lockfile
|
||||||
pnpm build
|
pnpm build
|
||||||
pnpm test
|
pnpm test
|
||||||
|
|||||||
13
.github/workflows/test-cli-rs.yml
vendored
13
.github/workflows/test-cli-rs.yml
vendored
@@ -8,13 +8,12 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- dev
|
||||||
- 1.x
|
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/test-cli-rs.yml'
|
- '.github/workflows/test-cli-rs.yml'
|
||||||
- 'core/tauri-utils/**'
|
- 'crates/tauri-utils/**'
|
||||||
- 'tooling/bundler/**'
|
- 'crates/tauri-bundler/**'
|
||||||
- 'tooling/cli/**'
|
- 'crates/tauri-cli/**'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
RUST_BACKTRACE: 1
|
RUST_BACKTRACE: 1
|
||||||
@@ -53,11 +52,9 @@ jobs:
|
|||||||
if: matrix.platform.os == 'ubuntu-latest'
|
if: matrix.platform.os == 'ubuntu-latest'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
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
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
|
||||||
workspaces: tooling/cli
|
|
||||||
|
|
||||||
- name: test 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 }}
|
||||||
|
|||||||
32
.github/workflows/test-core.yml
vendored
32
.github/workflows/test-core.yml
vendored
@@ -8,12 +8,15 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- dev
|
||||||
- 1.x
|
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/test-core.yml'
|
- '.github/workflows/test-core.yml'
|
||||||
- 'core/**'
|
- 'crates/**'
|
||||||
- '!core/tauri/scripts/**'
|
- '!crates/tauri/scripts/**'
|
||||||
|
- '!crates/tauri-cli/**'
|
||||||
|
- '!crates/tauri-bundler/**'
|
||||||
|
- '!crates/tauri-macos-sign/**'
|
||||||
|
- '!crates/tauri-schema-generator/**'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
RUST_BACKTRACE: 1
|
RUST_BACKTRACE: 1
|
||||||
@@ -34,35 +37,35 @@ jobs:
|
|||||||
- {
|
- {
|
||||||
target: x86_64-pc-windows-msvc,
|
target: x86_64-pc-windows-msvc,
|
||||||
os: windows-latest,
|
os: windows-latest,
|
||||||
toolchain: '1.70.0',
|
toolchain: '1.71.0',
|
||||||
cross: false,
|
cross: false,
|
||||||
command: 'test'
|
command: 'test'
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
target: x86_64-unknown-linux-gnu,
|
target: x86_64-unknown-linux-gnu,
|
||||||
os: ubuntu-latest,
|
os: ubuntu-latest,
|
||||||
toolchain: '1.70.0',
|
toolchain: '1.71.0',
|
||||||
cross: false,
|
cross: false,
|
||||||
command: 'test'
|
command: 'test'
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
target: aarch64-apple-darwin,
|
target: aarch64-apple-darwin,
|
||||||
os: macos-14,
|
os: macos-14,
|
||||||
toolchain: '1.70.0',
|
toolchain: '1.71.0',
|
||||||
cross: false,
|
cross: false,
|
||||||
command: 'test'
|
command: 'test'
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
target: aarch64-apple-ios,
|
target: aarch64-apple-ios,
|
||||||
os: macos-latest,
|
os: macos-latest,
|
||||||
toolchain: '1.70.0',
|
toolchain: '1.71.0',
|
||||||
cross: false,
|
cross: false,
|
||||||
command: 'build'
|
command: 'build'
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
target: aarch64-linux-android,
|
target: aarch64-linux-android,
|
||||||
os: ubuntu-latest,
|
os: ubuntu-latest,
|
||||||
toolchain: '1.70.0',
|
toolchain: '1.71.0',
|
||||||
cross: true,
|
cross: true,
|
||||||
command: 'build'
|
command: 'build'
|
||||||
}
|
}
|
||||||
@@ -88,16 +91,15 @@ jobs:
|
|||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
prefix-key: v2
|
prefix-key: v2
|
||||||
workspaces: core -> ../target
|
|
||||||
save-if: ${{ matrix.features.key == 'all' }}
|
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)
|
- name: test (using cross)
|
||||||
if: ${{ matrix.platform.cross }}
|
if: ${{ matrix.platform.cross }}
|
||||||
# update or remove the rev once we update the MSRV from 1.70.0
|
# update or remove the rev once we update the MSRV from 1.71.0
|
||||||
run: |
|
run: |
|
||||||
cargo install cross --git https://github.com/cross-rs/cross --rev 20c73df79c9aaf78a2ad2e9fe8ae981668a729dc --locked
|
cargo install cross --git https://github.com/cross-rs/cross --rev 20c73df79c9aaf78a2ad2e9fe8ae981668a729dc --locked
|
||||||
cross ${{ matrix.platform.command }} --target ${{ matrix.platform.target }} ${{ matrix.features.args }}
|
cross ${{ matrix.platform.command }} --target ${{ matrix.platform.target }} ${{ matrix.features.args }} --manifest-path crates/tauri/Cargo.toml
|
||||||
|
|
||||||
- name: test (using cargo)
|
|
||||||
if: ${{ !matrix.platform.cross }}
|
|
||||||
run: cargo ${{ matrix.platform.command }} --target ${{ matrix.platform.target }} ${{ matrix.features.args }}
|
|
||||||
|
|||||||
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
|
|
||||||
53
.github/workflows/udeps.yml
vendored
53
.github/workflows/udeps.yml
vendored
@@ -8,7 +8,6 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- dev
|
||||||
- 1.x
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
RUST_BACKTRACE: 1
|
RUST_BACKTRACE: 1
|
||||||
@@ -33,29 +32,31 @@ jobs:
|
|||||||
cli: ${{ steps.filter.outputs.cli }}
|
cli: ${{ steps.filter.outputs.cli }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dorny/paths-filter@v2
|
- uses: dorny/paths-filter@v3
|
||||||
id: filter
|
id: filter
|
||||||
with:
|
with:
|
||||||
filters: |
|
filters: |
|
||||||
tauri:
|
tauri:
|
||||||
- 'core/tauri/**'
|
- 'crates/tauri/**'
|
||||||
- '!core/tauri/scripts/**'
|
- '!crates/tauri/scripts/**'
|
||||||
build:
|
build:
|
||||||
- 'core/tauri-build/**'
|
- 'crates/tauri-build/**'
|
||||||
codegen:
|
codegen:
|
||||||
- 'core/tauri-codegen/**'
|
- 'crates/tauri-codegen/**'
|
||||||
macros:
|
macros:
|
||||||
- 'core/tauri-macros/**'
|
- 'crates/tauri-macros/**'
|
||||||
runtime:
|
runtime:
|
||||||
- 'core/tauri-runtime/**'
|
- 'crates/tauri-runtime/**'
|
||||||
wry:
|
wry:
|
||||||
- 'core/tauri-runtime-wry/**'
|
- 'crates/tauri-runtime-wry/**'
|
||||||
utils:
|
utils:
|
||||||
- 'core/tauri-utils/**'
|
- 'crates/tauri-utils/**'
|
||||||
bundler:
|
bundler:
|
||||||
- 'tooling/bundler/**'
|
- 'crates/tauri-bundler/**'
|
||||||
cli:
|
cli:
|
||||||
- 'tooling/cli/**'
|
- 'crates/tauri-cli/**'
|
||||||
|
macossign:
|
||||||
|
- 'crates/tauri-macos-sign/**'
|
||||||
|
|
||||||
setup:
|
setup:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -69,7 +70,8 @@ jobs:
|
|||||||
needs.changes.outputs.wry == 'true' ||
|
needs.changes.outputs.wry == 'true' ||
|
||||||
needs.changes.outputs.utils == 'true' ||
|
needs.changes.outputs.utils == 'true' ||
|
||||||
needs.changes.outputs.bundler == 'true' ||
|
needs.changes.outputs.bundler == 'true' ||
|
||||||
needs.changes.outputs.cli == 'true'
|
needs.changes.outputs.cli == 'true' ||
|
||||||
|
needs.changes.outputs.macossign == 'true'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -99,17 +101,19 @@ jobs:
|
|||||||
UTILS: ${{ needs.changes.outputs.utils == 'true' }}
|
UTILS: ${{ needs.changes.outputs.utils == 'true' }}
|
||||||
BUNDLER: ${{ needs.changes.outputs.bundler == 'true' }}
|
BUNDLER: ${{ needs.changes.outputs.bundler == 'true' }}
|
||||||
CLI: ${{ needs.changes.outputs.cli == 'true' }}
|
CLI: ${{ needs.changes.outputs.cli == 'true' }}
|
||||||
|
MACOSSIGN: ${{ needs.changes.outputs.macossign == 'true' }}
|
||||||
run: |
|
run: |
|
||||||
crates=()
|
crates=()
|
||||||
if [ "${TAURI}" == "true" ]; then crates[${#crates[@]}]="\"./core/tauri\""; fi
|
if [ "${TAURI}" == "true" ]; then crates[${#crates[@]}]="\"./crates/tauri\""; fi
|
||||||
if [ "${BUILD}" == "true" ]; then crates[${#crates[@]}]="\"./core/tauri-build\""; fi
|
if [ "${BUILD}" == "true" ]; then crates[${#crates[@]}]="\"./crates/tauri-build\""; fi
|
||||||
if [ "${CODEGEN}" == "true" ]; then crates[${#crates[@]}]="\"./core/tauri-codegen\""; fi
|
if [ "${CODEGEN}" == "true" ]; then crates[${#crates[@]}]="\"./crates/tauri-codegen\""; fi
|
||||||
if [ "${MACROS}" == "true" ]; then crates[${#crates[@]}]="\"./core/tauri-macros\""; fi
|
if [ "${MACROS}" == "true" ]; then crates[${#crates[@]}]="\"./crates/tauri-macros\""; fi
|
||||||
if [ "${RUNTIME}" == "true" ]; then crates[${#crates[@]}]="\"./core/tauri-runtime\""; fi
|
if [ "${RUNTIME}" == "true" ]; then crates[${#crates[@]}]="\"./crates/tauri-runtime\""; fi
|
||||||
if [ "${WRY}" == "true" ]; then crates[${#crates[@]}]="\"./core/tauri-runtime-wry\""; fi
|
if [ "${WRY}" == "true" ]; then crates[${#crates[@]}]="\"./crates/tauri-runtime-wry\""; fi
|
||||||
if [ "${UTILS}" == "true" ]; then crates[${#crates[@]}]="\"./core/tauri-utils\""; fi
|
if [ "${UTILS}" == "true" ]; then crates[${#crates[@]}]="\"./crates/tauri-utils\""; fi
|
||||||
if [ "${BUNDLER}" == "true" ]; then crates[${#crates[@]}]="\"./tooling/bundler\""; fi
|
if [ "${BUNDLER}" == "true" ]; then crates[${#crates[@]}]="\"./crates/tauri-bundler\""; fi
|
||||||
if [ "${CLI}" == "true" ]; then crates[${#crates[@]}]="\"./tooling/cli\""; 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"
|
echo "matrix=[$crates]" >> "$GITHUB_OUTPUT"
|
||||||
outputs:
|
outputs:
|
||||||
matrix: ${{ steps.create-matrix.outputs.matrix }}
|
matrix: ${{ steps.create-matrix.outputs.matrix }}
|
||||||
@@ -132,11 +136,6 @@ jobs:
|
|||||||
sudo apt-get install -y libgtk-3-dev
|
sudo apt-get install -y libgtk-3-dev
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
|
||||||
workspaces: |
|
|
||||||
core -> ../target
|
|
||||||
tooling/cli
|
|
||||||
tooling/bundler
|
|
||||||
|
|
||||||
- name: Download udeps
|
- name: Download udeps
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
|
|||||||
7
.gitignore
vendored
7
.gitignore
vendored
@@ -26,11 +26,8 @@ target/
|
|||||||
streaming_example_test_video.mp4
|
streaming_example_test_video.mp4
|
||||||
|
|
||||||
# examples /gen directory
|
# examples /gen directory
|
||||||
/examples/**/gen/
|
/examples/**/src-tauri/gen/
|
||||||
|
/bench/**/src-tauri/gen/
|
||||||
# old cli directories
|
|
||||||
/tooling/cli.js
|
|
||||||
/tooling/cli.rs
|
|
||||||
|
|
||||||
# logs
|
# logs
|
||||||
logs
|
logs
|
||||||
|
|||||||
@@ -12,20 +12,20 @@ dist/
|
|||||||
pnpm-lock.yaml
|
pnpm-lock.yaml
|
||||||
|
|
||||||
# autogenerated and minimized js file
|
# autogenerated and minimized js file
|
||||||
core/tauri/scripts/bundle.global.js
|
crates/tauri/scripts/bundle.global.js
|
||||||
|
|
||||||
# this file is an IIFE, shouldn't be formatted
|
# this file is an IIFE, shouldn't be formatted
|
||||||
core/tauri/scripts/process-ipc-message-fn.js
|
crates/tauri/scripts/process-ipc-message-fn.js
|
||||||
|
|
||||||
# cli templates should be formatted manually
|
# cli templates should be formatted manually
|
||||||
# it also includes invalid json files that
|
# it also includes invalid json files that
|
||||||
# prettier can't handle
|
# prettier can't handle
|
||||||
tooling/cli/templates
|
crates/tauri-cli/templates
|
||||||
|
|
||||||
# autogenerated files
|
# autogenerated files
|
||||||
**/autogenerated/**/*.md
|
**/autogenerated/**/*.md
|
||||||
tooling/cli/node/index.js
|
packages/cli/index.js
|
||||||
tooling/cli/node/index.d.ts
|
packages/cli/index.d.ts
|
||||||
CHANGELOG.md
|
CHANGELOG.md
|
||||||
*schema.json
|
*schema.json
|
||||||
|
|
||||||
@@ -34,3 +34,4 @@ CHANGELOG.md
|
|||||||
|
|
||||||
# examples /gen directory
|
# examples /gen directory
|
||||||
examples/**/src-tauri/gen
|
examples/**/src-tauri/gen
|
||||||
|
bench/**/src-tauri/gen
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ for o in outputs/*; do
|
|||||||
pushd "$o"
|
pushd "$o"
|
||||||
|
|
||||||
chmod +x cargo-tauri*
|
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)
|
target=$(basename "$o" | cut -d. -f1)
|
||||||
if grep -qE '(apple|windows)' <<< "$target"; then
|
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
|
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.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
|
we should look to find a more "rusty way" to import / "pin" a version value in our tauri-cli
|
||||||
rust binaries.
|
rust binaries.
|
||||||
*/
|
*/
|
||||||
@@ -17,8 +17,8 @@ const { resolve } = require('path')
|
|||||||
const packageNickname = process.argv[2]
|
const packageNickname = process.argv[2]
|
||||||
const filePath =
|
const filePath =
|
||||||
packageNickname === '@tauri-apps/cli'
|
packageNickname === '@tauri-apps/cli'
|
||||||
? `../../../tooling/cli/metadata-v2.json`
|
? `../../../crates/tauri-cli/metadata-v2.json`
|
||||||
: `../../tooling/cli/metadata-v2.json`
|
: `../../crates/tauri-cli/metadata-v2.json`
|
||||||
const bump = process.argv[3]
|
const bump = process.argv[3]
|
||||||
let index = null
|
let index = null
|
||||||
|
|
||||||
|
|||||||
@@ -21,50 +21,50 @@ The following section briefly describes the roles of the various parts of Tauri.
|
|||||||
|
|
||||||
### Tauri Core [STABLE RUST]
|
### 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.
|
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`.
|
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.
|
- 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.
|
- 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.
|
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.
|
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.
|
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.
|
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 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.
|
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.
|
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.
|
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.
|
||||||
|
|
||||||
|
|||||||
4719
Cargo.lock
generated
4719
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
62
Cargo.toml
62
Cargo.toml
@@ -1,36 +1,37 @@
|
|||||||
[workspace]
|
[workspace]
|
||||||
resolver = "2"
|
|
||||||
members = [
|
members = [
|
||||||
# core
|
"crates/tauri",
|
||||||
"core/tauri",
|
"crates/tauri-runtime",
|
||||||
"core/tauri-runtime",
|
"crates/tauri-runtime-wry",
|
||||||
"core/tauri-runtime-wry",
|
"crates/tauri-macros",
|
||||||
"core/tauri-macros",
|
"crates/tauri-utils",
|
||||||
"core/tauri-utils",
|
"crates/tauri-build",
|
||||||
"core/tauri-build",
|
"crates/tauri-codegen",
|
||||||
"core/tauri-codegen",
|
"crates/tauri-plugin",
|
||||||
"core/tauri-config-schema",
|
"crates/tauri-schema-generator",
|
||||||
"core/tauri-acl-schema",
|
"crates/tauri-cli",
|
||||||
"core/tauri-plugin",
|
"crates/tauri-bundler",
|
||||||
|
"crates/tauri-macos-sign",
|
||||||
|
"crates/tauri-driver",
|
||||||
|
|
||||||
|
# @tauri-apps/cli rust project
|
||||||
|
"packages/cli",
|
||||||
|
|
||||||
# integration tests
|
# integration tests
|
||||||
"core/tests/restart",
|
"crates/tests/restart",
|
||||||
"core/tests/acl",
|
"crates/tests/acl",
|
||||||
|
|
||||||
|
# bench
|
||||||
|
"bench",
|
||||||
|
"bench/tests/cpu_intensive/src-tauri",
|
||||||
|
"bench/tests/files_transfer/src-tauri",
|
||||||
|
"bench/tests/helloworld/src-tauri",
|
||||||
|
|
||||||
# examples
|
# examples
|
||||||
"examples/file-associations/src-tauri",
|
"examples/file-associations/src-tauri",
|
||||||
"examples/api/src-tauri",
|
"examples/api/src-tauri",
|
||||||
]
|
]
|
||||||
|
resolver = "2"
|
||||||
exclude = [
|
|
||||||
# examples that need to be compiled with the tauri CLI
|
|
||||||
"examples/api/src-tauri",
|
|
||||||
"examples/resources/src-tauri",
|
|
||||||
"examples/web/core",
|
|
||||||
"examples/file-associations/src-tauri",
|
|
||||||
"examples/workspace",
|
|
||||||
"examples/plugins/tauri-plugin-example",
|
|
||||||
]
|
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
authors = ["Tauri Programme within The Commons Conservancy"]
|
authors = ["Tauri Programme within The Commons Conservancy"]
|
||||||
@@ -39,7 +40,7 @@ repository = "https://github.com/tauri-apps/tauri"
|
|||||||
categories = ["gui", "web-programming"]
|
categories = ["gui", "web-programming"]
|
||||||
license = "Apache-2.0 OR MIT"
|
license = "Apache-2.0 OR MIT"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = "1.70"
|
rust-version = "1.71"
|
||||||
|
|
||||||
# default to small, optimized workspace release binaries
|
# default to small, optimized workspace release binaries
|
||||||
[profile.release]
|
[profile.release]
|
||||||
@@ -49,6 +50,17 @@ lto = true
|
|||||||
incremental = false
|
incremental = false
|
||||||
opt-level = "s"
|
opt-level = "s"
|
||||||
|
|
||||||
|
# profiles for tauri-cli
|
||||||
|
[profile.dev.package.miniz_oxide]
|
||||||
|
opt-level = 3
|
||||||
|
|
||||||
|
[profile.release-size-optimized]
|
||||||
|
inherits = "release"
|
||||||
|
codegen-units = 1
|
||||||
|
lto = true
|
||||||
|
incremental = false
|
||||||
|
opt-level = "s"
|
||||||
|
|
||||||
# Temporary patch to schemars to preserve newlines in docstrings for our reference docs schemas
|
# Temporary patch to schemars to preserve newlines in docstrings for our reference docs schemas
|
||||||
# See https://github.com/GREsau/schemars/issues/120 for reference
|
# See https://github.com/GREsau/schemars/issues/120 for reference
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
workspace = {}
|
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "tauri_bench"
|
name = "tauri_bench"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["Tauri Programme within The Commons Conservancy"]
|
authors = ["Tauri Programme within The Commons Conservancy"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = "1.70"
|
rust-version = "1.71"
|
||||||
license = "Apache-2.0 OR MIT"
|
license = "Apache-2.0 OR MIT"
|
||||||
description = "Cross-platform WebView rendering library"
|
description = "Cross-platform WebView rendering library"
|
||||||
repository = "https://github.com/tauri-apps/wry"
|
repository = "https://github.com/tauri-apps/wry"
|
||||||
@@ -28,22 +28,19 @@ fn get_all_benchmarks() -> Vec<(String, String)> {
|
|||||||
vec![
|
vec![
|
||||||
(
|
(
|
||||||
"tauri_hello_world".into(),
|
"tauri_hello_world".into(),
|
||||||
format!(
|
format!("../target/{}/release/bench_helloworld", utils::get_target()),
|
||||||
"tests/target/{}/release/bench_helloworld",
|
|
||||||
utils::get_target()
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"tauri_cpu_intensive".into(),
|
"tauri_cpu_intensive".into(),
|
||||||
format!(
|
format!(
|
||||||
"tests/target/{}/release/bench_cpu_intensive",
|
"../target/{}/release/bench_cpu_intensive",
|
||||||
utils::get_target()
|
utils::get_target()
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"tauri_3mb_transfer".into(),
|
"tauri_3mb_transfer".into(),
|
||||||
format!(
|
format!(
|
||||||
"tests/target/{}/release/bench_files_transfer",
|
"../target/{}/release/bench_files_transfer",
|
||||||
utils::get_target()
|
utils::get_target()
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -191,7 +188,7 @@ fn cargo_deps() -> HashMap<String, usize> {
|
|||||||
cmd.args(["--edges", "normal"]);
|
cmd.args(["--edges", "normal"]);
|
||||||
cmd.args(["--prefix", "none"]);
|
cmd.args(["--prefix", "none"]);
|
||||||
cmd.args(["--target", target]);
|
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 = cmd.output().expect("failed to run cargo tree").stdout;
|
||||||
let full_deps = String::from_utf8(full_deps).expect("cargo tree output not utf-8");
|
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 {
|
} else {
|
||||||
"x86_64-apple-darwin"
|
"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")]
|
#[cfg(target_os = "linux")]
|
||||||
return "x86_64-unknown-linux-gnu";
|
return "x86_64-unknown-linux-gnu";
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
@@ -50,7 +56,7 @@ pub fn get_target() -> &'static str {
|
|||||||
|
|
||||||
pub fn target_dir() -> PathBuf {
|
pub fn target_dir() -> PathBuf {
|
||||||
bench_root_path()
|
bench_root_path()
|
||||||
.join("tests")
|
.join("..")
|
||||||
.join("target")
|
.join("target")
|
||||||
.join(get_target())
|
.join(get_target())
|
||||||
.join("release")
|
.join("release")
|
||||||
@@ -62,7 +68,7 @@ pub fn bench_root_path() -> PathBuf {
|
|||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub fn home_path() -> PathBuf {
|
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"));
|
return PathBuf::from(env!("HOME"));
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
return PathBuf::from(env!("HOMEPATH"));
|
return PathBuf::from(env!("HOMEPATH"));
|
||||||
@@ -70,12 +76,7 @@ pub fn home_path() -> PathBuf {
|
|||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub fn tauri_root_path() -> PathBuf {
|
pub fn tauri_root_path() -> PathBuf {
|
||||||
bench_root_path()
|
bench_root_path().parent().unwrap().to_path_buf()
|
||||||
.parent()
|
|
||||||
.unwrap()
|
|
||||||
.parent()
|
|
||||||
.unwrap()
|
|
||||||
.to_path_buf()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
@@ -108,7 +109,7 @@ pub fn parse_max_mem(file_path: &str) -> Option<u64> {
|
|||||||
let output = BufReader::new(file);
|
let output = BufReader::new(file);
|
||||||
let mut highest: u64 = 0;
|
let mut highest: u64 = 0;
|
||||||
// MEM 203.437500 1621617192.4123
|
// MEM 203.437500 1621617192.4123
|
||||||
for line in output.lines().flatten() {
|
for line in output.lines().map_while(Result::ok) {
|
||||||
// split line by space
|
// split line by space
|
||||||
let split = line.split(' ').collect::<Vec<_>>();
|
let split = line.split(' ').collect::<Vec<_>>();
|
||||||
if split.len() == 3 {
|
if split.len() == 3 {
|
||||||
@@ -3,12 +3,14 @@ name = "bench_cpu_intensive"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "A very simple Tauri Application"
|
description = "A very simple Tauri Application"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = "1.70"
|
rust-version = "1.71"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
tauri-build = { path = "../../../../../core/tauri-build", features = ["codegen"] }
|
tauri-build = { path = "../../../../crates/tauri-build", features = [
|
||||||
|
"codegen",
|
||||||
|
] }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
tauri = { path = "../../../../../core/tauri", features = [] }
|
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",
|
"identifier": "com.tauri.dev",
|
||||||
"build": {
|
"build": {
|
||||||
"frontendDist": "../public"
|
"frontendDist": "../public"
|
||||||
@@ -23,11 +23,11 @@
|
|||||||
"active": true,
|
"active": true,
|
||||||
"targets": "all",
|
"targets": "all",
|
||||||
"icon": [
|
"icon": [
|
||||||
"../../../../../examples/.icons/32x32.png",
|
"../../../../examples/.icons/32x32.png",
|
||||||
"../../../../../examples/.icons/128x128.png",
|
"../../../../examples/.icons/128x128.png",
|
||||||
"../../../../../examples/.icons/128x128@2x.png",
|
"../../../../examples/.icons/128x128@2x.png",
|
||||||
"../../../../../examples/.icons/icon.icns",
|
"../../../../examples/.icons/icon.icns",
|
||||||
"../../../../../examples/.icons/icon.ico"
|
"../../../../examples/.icons/icon.ico"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,12 +3,14 @@ name = "bench_files_transfer"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "A very simple Tauri Application"
|
description = "A very simple Tauri Application"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = "1.70"
|
rust-version = "1.71"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
tauri-build = { path = "../../../../../core/tauri-build", features = ["codegen"] }
|
tauri-build = { path = "../../../../crates/tauri-build", features = [
|
||||||
|
"codegen",
|
||||||
|
] }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
tauri = { path = "../../../../../core/tauri", features = [] }
|
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",
|
"identifier": "com.tauri.dev",
|
||||||
"build": {
|
"build": {
|
||||||
"frontendDist": "../public"
|
"frontendDist": "../public"
|
||||||
@@ -23,11 +23,11 @@
|
|||||||
"active": true,
|
"active": true,
|
||||||
"targets": "all",
|
"targets": "all",
|
||||||
"icon": [
|
"icon": [
|
||||||
"../../../../../examples/.icons/32x32.png",
|
"../../../../examples/.icons/32x32.png",
|
||||||
"../../../../../examples/.icons/128x128.png",
|
"../../../../examples/.icons/128x128.png",
|
||||||
"../../../../../examples/.icons/128x128@2x.png",
|
"../../../../examples/.icons/128x128@2x.png",
|
||||||
"../../../../../examples/.icons/icon.icns",
|
"../../../../examples/.icons/icon.icns",
|
||||||
"../../../../../examples/.icons/icon.ico"
|
"../../../../examples/.icons/icon.ico"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,12 +3,14 @@ name = "bench_helloworld"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "A very simple Tauri Application"
|
description = "A very simple Tauri Application"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = "1.70"
|
rust-version = "1.71"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
tauri-build = { path = "../../../../../core/tauri-build", features = ["codegen"] }
|
tauri-build = { path = "../../../../crates/tauri-build", features = [
|
||||||
|
"codegen",
|
||||||
|
] }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
tauri = { path = "../../../../../core/tauri", features = [] }
|
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",
|
"identifier": "com.tauri.dev",
|
||||||
"build": {
|
"build": {
|
||||||
"frontendDist": "../public",
|
"frontendDist": "../public",
|
||||||
@@ -25,11 +25,11 @@
|
|||||||
"active": true,
|
"active": true,
|
||||||
"targets": "all",
|
"targets": "all",
|
||||||
"icon": [
|
"icon": [
|
||||||
"../../../../../examples/.icons/32x32.png",
|
"../../../../examples/.icons/32x32.png",
|
||||||
"../../../../../examples/.icons/128x128.png",
|
"../../../../examples/.icons/128x128.png",
|
||||||
"../../../../../examples/.icons/128x128@2x.png",
|
"../../../../examples/.icons/128x128@2x.png",
|
||||||
"../../../../../examples/.icons/icon.icns",
|
"../../../../examples/.icons/icon.icns",
|
||||||
"../../../../../examples/.icons/icon.ico"
|
"../../../../examples/.icons/icon.ico"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
[package]
|
|
||||||
name = "tauri-config-schema"
|
|
||||||
version = "0.0.0"
|
|
||||||
edition = "2021"
|
|
||||||
publish = false
|
|
||||||
|
|
||||||
[build-dependencies]
|
|
||||||
tauri-utils = { features = ["schema"], path = "../tauri-utils" }
|
|
||||||
schemars = { version = "0.8.18", features = ["url", "preserve_order"] }
|
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
|
||||||
serde_json = "1.0"
|
|
||||||
url = { version = "2.3", features = ["serde"] }
|
|
||||||
@@ -1,17 +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 tauri_utils::{config::Config, write_if_changed};
|
|
||||||
|
|
||||||
pub fn main() -> Result<(), Box<dyn Error>> {
|
|
||||||
let schema = schemars::schema_for!(Config);
|
|
||||||
let schema = serde_json::to_string_pretty(&schema)?;
|
|
||||||
let out = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR")?);
|
|
||||||
for path in ["schema.json", "../../tooling/cli/schema.json"] {
|
|
||||||
write_if_changed(out.join(path), &schema)?;
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
|
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
|
||||||
// SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
//! [](https://tauri.app)
|
|
||||||
//!
|
|
||||||
//! Hosts the schema for the Tauri configuration file.
|
|
||||||
|
|
||||||
#![doc(
|
|
||||||
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"
|
|
||||||
)]
|
|
||||||
|
|
||||||
fn main() {}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Versions/Current/Headers
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Versions/Current/Modules
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Versions/Current/Resources
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
A
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../../LICENSE.spdx
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../../LICENSE_APACHE-2.0
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../../LICENSE_MIT
|
|
||||||
@@ -29,7 +29,10 @@ rustdoc-args = ["--cfg", "docsrs"]
|
|||||||
anyhow = "1"
|
anyhow = "1"
|
||||||
quote = { version = "1", optional = true }
|
quote = { version = "1", optional = true }
|
||||||
tauri-codegen = { version = "2.0.0-rc.6", path = "../tauri-codegen", optional = true }
|
tauri-codegen = { version = "2.0.0-rc.6", path = "../tauri-codegen", optional = true }
|
||||||
tauri-utils = { version = "2.0.0-rc.6", path = "../tauri-utils", features = ["build", "resources"] }
|
tauri-utils = { version = "2.0.0-rc.6", path = "../tauri-utils", features = [
|
||||||
|
"build",
|
||||||
|
"resources",
|
||||||
|
] }
|
||||||
cargo_toml = "0.17"
|
cargo_toml = "0.17"
|
||||||
serde = "1"
|
serde = "1"
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
@@ -1,20 +1,23 @@
|
|||||||
workspace = {}
|
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "tauri-bundler"
|
name = "tauri-bundler"
|
||||||
version = "2.0.1-rc.5"
|
version = "2.0.1-rc.5"
|
||||||
authors = ["George Burton <burtonageo@gmail.com>", "Tauri Programme within The Commons Conservancy"]
|
authors = [
|
||||||
|
"George Burton <burtonageo@gmail.com>",
|
||||||
|
"Tauri Programme within The Commons Conservancy",
|
||||||
|
]
|
||||||
categories = ["command-line-utilities", "development-tools::cargo-plugins"]
|
categories = ["command-line-utilities", "development-tools::cargo-plugins"]
|
||||||
license = "Apache-2.0 OR MIT"
|
license = "Apache-2.0 OR MIT"
|
||||||
keywords = ["bundle", "cargo", "tauri"]
|
keywords = ["bundle", "cargo", "tauri"]
|
||||||
repository = "https://github.com/tauri-apps/tauri"
|
repository = "https://github.com/tauri-apps/tauri"
|
||||||
description = "Wrap rust executables in OS-specific app bundles for Tauri"
|
description = "Wrap rust executables in OS-specific app bundles for Tauri"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = "1.70"
|
rust-version = "1.71"
|
||||||
exclude = ["CHANGELOG.md", "/target", "rustfmt.toml"]
|
exclude = ["CHANGELOG.md", "/target", "rustfmt.toml"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tauri-utils = { version = "2.0.0-rc.6", path = "../../core/tauri-utils", features = ["resources"] }
|
tauri-utils = { version = "2.0.0-rc.6", path = "../tauri-utils", features = [
|
||||||
|
"resources",
|
||||||
|
] }
|
||||||
image = "0.25.0"
|
image = "0.25.0"
|
||||||
flate2 = "1.0"
|
flate2 = "1.0"
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
@@ -29,7 +32,9 @@ tempfile = "3.10.1"
|
|||||||
log = { version = "0.4.21", features = ["kv"] }
|
log = { version = "0.4.21", features = ["kv"] }
|
||||||
dirs = "5"
|
dirs = "5"
|
||||||
os_pipe = "1"
|
os_pipe = "1"
|
||||||
ureq = { version = "2.9.6", default-features = false, features = ["socks-proxy"] }
|
ureq = { version = "2.9.6", default-features = false, features = [
|
||||||
|
"socks-proxy",
|
||||||
|
] }
|
||||||
native-tls = { version = "0.2", optional = true }
|
native-tls = { version = "0.2", optional = true }
|
||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
semver = "1"
|
semver = "1"
|
||||||
@@ -52,7 +57,7 @@ features = ["Win32_System_SystemInformation", "Win32_System_Diagnostics_Debug"]
|
|||||||
icns = { package = "tauri-icns", version = "0.1" }
|
icns = { package = "tauri-icns", version = "0.1" }
|
||||||
time = { version = "0.3", features = ["formatting"] }
|
time = { version = "0.3", features = ["formatting"] }
|
||||||
plist = "1"
|
plist = "1"
|
||||||
tauri-macos-sign = { version = "0.1.1-rc.0", path = "../macos-sign" }
|
tauri-macos-sign = { version = "0.1.1-rc.0", path = "../tauri-macos-sign" }
|
||||||
|
|
||||||
[target."cfg(any(target_os = \"macos\", target_os = \"windows\"))".dependencies]
|
[target."cfg(any(target_os = \"macos\", target_os = \"windows\"))".dependencies]
|
||||||
regex = "1"
|
regex = "1"
|
||||||
@@ -58,13 +58,14 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
|
|||||||
sh_map.insert("arch", settings.target().split('-').next().unwrap());
|
sh_map.insert("arch", settings.target().split('-').next().unwrap());
|
||||||
sh_map.insert("crate_name", settings.main_binary_name());
|
sh_map.insert("crate_name", settings.main_binary_name());
|
||||||
sh_map.insert("appimage_filename", &appimage_filename);
|
sh_map.insert("appimage_filename", &appimage_filename);
|
||||||
let tauri_tools_path = dirs::cache_dir().map_or_else(
|
|
||||||
|| output_path.to_path_buf(),
|
let tauri_tools_path = settings
|
||||||
|mut p| {
|
.local_tools_directory()
|
||||||
p.push("tauri");
|
.map(|d| d.join(".tauri"))
|
||||||
p
|
.unwrap_or_else(|| {
|
||||||
},
|
dirs::cache_dir().map_or_else(|| output_path.to_path_buf(), |p| p.join("tauri"))
|
||||||
);
|
});
|
||||||
|
|
||||||
std::fs::create_dir_all(&tauri_tools_path)?;
|
std::fs::create_dir_all(&tauri_tools_path)?;
|
||||||
let tauri_tools_path_str = tauri_tools_path.to_string_lossy();
|
let tauri_tools_path_str = tauri_tools_path.to_string_lossy();
|
||||||
sh_map.insert("tauri_tools_path", &tauri_tools_path_str);
|
sh_map.insert("tauri_tools_path", &tauri_tools_path_str);
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user