mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-08-15 19:00:35 +03:00
refactor: move tauri crates to /core folder (#1444)
This commit is contained in:
parent
0648bc4184
commit
8b36fe0c5d
@ -170,25 +170,33 @@
|
||||
]
|
||||
},
|
||||
"tauri-utils": {
|
||||
"path": "./tauri-utils",
|
||||
"path": "./core/tauri-utils",
|
||||
"manager": "rust"
|
||||
},
|
||||
"tauri-api": {
|
||||
"path": "./tauri-api",
|
||||
"path": "./core/tauri-api",
|
||||
"manager": "rust",
|
||||
"dependencies": ["tauri-utils"]
|
||||
},
|
||||
"tauri-macros": {
|
||||
"path": "./tauri-macros",
|
||||
"path": "./core/tauri-macros",
|
||||
"manager": "rust",
|
||||
"dependencies": ["tauri-utils"]
|
||||
},
|
||||
"tauri-updater": {
|
||||
"path": "./tauri-updater",
|
||||
"path": "./core/tauri-updater",
|
||||
"manager": "rust"
|
||||
},
|
||||
"tauri-build": {
|
||||
"path": "./core/tauri-build",
|
||||
"manager": "rust"
|
||||
},
|
||||
"tauri-codegen": {
|
||||
"path": "./core/tauri-codegen",
|
||||
"manager": "rust"
|
||||
},
|
||||
"tauri": {
|
||||
"path": "./tauri",
|
||||
"path": "./core/tauri",
|
||||
"manager": "rust",
|
||||
"dependencies": ["api", "tauri-api", "tauri-macros", "tauri-updater"]
|
||||
}
|
||||
|
8
.github/CONTRIBUTING.md
vendored
8
.github/CONTRIBUTING.md
vendored
@ -53,12 +53,12 @@ Some Tauri packages will be automatically built when running one of the examples
|
||||
### Packages Overview
|
||||
|
||||
- The JS API (`/api`) contains JS bindings to the builtin Rust functions in the Rust API.
|
||||
- The Rust API (`/tauri-api`) contains the Rust functions used by the JS API.
|
||||
- The Rust API (`/core/tauri-api`) contains the Rust functions used by the JS API.
|
||||
- Tauri.js (`/cli/tauri.js`) is the primary CLI for creating and developing Tauri apps.
|
||||
- The Rust CLI (`/cli/core`) is a new version of the CLI that will replace Tauri.js, but now it only supports build and dev commands. Tauri.js will automatically use the Rust CLI for these commands.
|
||||
- Tauri Bundler (`/cli/tauri-bundler`) is used by the Rust CLI to package executables into installers.
|
||||
- Tauri Core (`/tauri`) is the heart of Tauri. It contains the code that starts the app, configures communication between Rust and the Webview, and ties all the other packages together.
|
||||
- The Macros (`/tauri-macros`) are used by Tauri Core for various functions.
|
||||
- Tauri Core (`/core/tauri`) is the heart of Tauri. It contains the code that starts the app, configures communication between Rust and the Webview, and ties all the other packages together.
|
||||
- The Macros (`/core/tauri-macros`) are used by Tauri Core for various functions.
|
||||
|
||||
### Developing The Node.js CLI (Tauri.js)
|
||||
|
||||
@ -79,7 +79,7 @@ The code for the bundler is located in `[Tauri repo root]/cli/tauri-bundler`, an
|
||||
|
||||
### Developing Tauri Core and Related Components (Rust API, Macros, and Utils)
|
||||
|
||||
The code for Tauri Core is located in `[Tauri repo root]/tauri`, and the Rust API, Macros, and Utils are in `[Tauri repo root]/tauri-(api/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 `yarn tauri build` or `yarn tauri dev` in the helloworld app directory after making changes to test them out. To use your local changes in another project, edit its `src-tauri/Cargo.toml` file so that the `tauri` key looks like `tauri = { path = "PATH", features = [ "api-all", "cli" ] }`, where `PATH` is the relative path to `[Tauri repo root]/tauri`. Then, your local copy of the Tauri core packages will be rebuilt and used whenever you build that project.
|
||||
The code for Tauri Core is located in `[Tauri repo root]/core/tauri`, and the Rust API, Macros, and Utils are in `[Tauri repo root]/core/tauri-(api/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 `yarn tauri build` or `yarn tauri dev` in the helloworld app directory after making changes to test them out. To use your local changes in another project, edit its `src-tauri/Cargo.toml` file so that the `tauri` key looks like `tauri = { path = "PATH", features = [ "api-all", "cli" ] }`, where `PATH` is the relative path to `[Tauri repo root]/core/tauri`. Then, your local copy of the Tauri core packages will be rebuilt and used whenever you build that project.
|
||||
|
||||
### Developing the JS API
|
||||
|
||||
|
4
.github/workflows/artifacts-updater.yml
vendored
4
.github/workflows/artifacts-updater.yml
vendored
@ -3,8 +3,8 @@ on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/artifacts-updater.yml'
|
||||
- 'tauri/**'
|
||||
- 'tauri-updater/**'
|
||||
- 'core/tauri/**'
|
||||
- 'core/tauri-updater/**'
|
||||
- 'cli/core/**'
|
||||
- 'cli/tauri-bundler/**'
|
||||
- 'examples/updater/**'
|
||||
|
7
.github/workflows/core-lint-fmt.yml
vendored
7
.github/workflows/core-lint-fmt.yml
vendored
@ -6,11 +6,6 @@ on:
|
||||
- '.github/workflows/core-lint-fmt.yml'
|
||||
- 'core/**'
|
||||
- 'examples/**'
|
||||
- 'tauri/**'
|
||||
- 'tauri-utils/**'
|
||||
- 'tauri-api/**'
|
||||
- 'tauri-macros/**'
|
||||
- 'tauri-updater/**'
|
||||
- 'cli/core/**'
|
||||
|
||||
jobs:
|
||||
@ -78,5 +73,5 @@ jobs:
|
||||
- uses: actions-rs/clippy-check@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
args: --manifest-path ./tauri/Cargo.toml --all-targets --features ${{ matrix.feature }} -- -D warnings
|
||||
args: --manifest-path ./core/tauri/Cargo.toml --all-targets --features ${{ matrix.feature }} -- -D warnings
|
||||
name: core
|
||||
|
@ -68,7 +68,7 @@ jobs:
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y webkit2gtk-4.0
|
||||
- name: generate rust docs
|
||||
working-directory: tauri
|
||||
working-directory: core/tauri
|
||||
run: cargo doc --no-deps
|
||||
- name: run rustdocusaurus
|
||||
uses: tauri-apps/rustdocusaurus/github-action@v1
|
||||
|
10
.github/workflows/test-core.yml
vendored
10
.github/workflows/test-core.yml
vendored
@ -6,11 +6,6 @@ on:
|
||||
- '.github/workflows/test-core.yml'
|
||||
- 'core/**'
|
||||
- 'examples/**'
|
||||
- 'tauri/**'
|
||||
- 'tauri-utils/**'
|
||||
- 'tauri-api/**'
|
||||
- 'tauri-macros/**'
|
||||
- 'tauri-updater/**'
|
||||
- 'cli/**'
|
||||
|
||||
env:
|
||||
@ -36,10 +31,6 @@ jobs:
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y webkit2gtk-4.0
|
||||
- name: build
|
||||
run: |
|
||||
cd ./tauri
|
||||
cargo build
|
||||
- name: test
|
||||
run: |
|
||||
cargo test
|
||||
@ -93,4 +84,3 @@ jobs:
|
||||
timeout-minutes: 15
|
||||
working-directory: cli/tauri.js
|
||||
run: yarn build-release
|
||||
|
||||
|
5
.github/workflows/udeps.yml
vendored
5
.github/workflows/udeps.yml
vendored
@ -5,11 +5,6 @@ on:
|
||||
paths:
|
||||
- '.github/workflows/udeps.yml'
|
||||
- 'core/**'
|
||||
- 'tauri/**'
|
||||
- 'tauri-utils/**'
|
||||
- 'tauri-api/**'
|
||||
- 'tauri-macros/**'
|
||||
- 'tauri-updater/**'
|
||||
- 'cli/tauri-bundler/**'
|
||||
- 'cli/core/**'
|
||||
|
||||
|
2
.github/workflows/update-docs.yml
vendored
2
.github/workflows/update-docs.yml
vendored
@ -30,7 +30,7 @@ jobs:
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y webkit2gtk-4.0
|
||||
- name: generate rust docs
|
||||
working-directory: tauri
|
||||
working-directory: core/tauri
|
||||
run: cargo doc --no-deps
|
||||
- name: run rustdocusaurus
|
||||
uses: tauri-apps/rustdocusaurus/github-action@v1
|
||||
|
@ -1,11 +1,10 @@
|
||||
[workspace]
|
||||
members = [
|
||||
"tauri",
|
||||
"tauri-api",
|
||||
"tauri-macros",
|
||||
"tauri-utils",
|
||||
|
||||
# core
|
||||
"core/tauri",
|
||||
"core/tauri-api",
|
||||
"core/tauri-macros",
|
||||
"core/tauri-utils",
|
||||
"core/tauri-build",
|
||||
"core/tauri-codegen",
|
||||
|
||||
|
@ -99,7 +99,7 @@ impl Init {
|
||||
(
|
||||
format!(
|
||||
"{{ path = {:?} }}",
|
||||
resolve_tauri_path(&tauri_path, "tauri")
|
||||
resolve_tauri_path(&tauri_path, "core/tauri")
|
||||
),
|
||||
format!(
|
||||
"{{ path = {:?} }}",
|
||||
@ -108,7 +108,7 @@ impl Init {
|
||||
)
|
||||
} else {
|
||||
let tauri_manifest: Manifest =
|
||||
toml::from_str(include_str!("../../../tauri/Cargo.toml")).unwrap();
|
||||
toml::from_str(include_str!("../../../core/tauri/Cargo.toml")).unwrap();
|
||||
let tauri_build_manifest: Manifest =
|
||||
toml::from_str(include_str!("../../../core/tauri-build/Cargo.toml")).unwrap();
|
||||
(
|
||||
|
@ -24,7 +24,7 @@ icon = [
|
||||
serde_json = "1.0.64"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
tauri = { path = "../../../../../../../tauri", features =["api-all"]}
|
||||
tauri = { path = "../../../../../../../core/tauri", features =["api-all"]}
|
||||
|
||||
[features]
|
||||
custom-protocol = [ "tauri/custom-protocol" ]
|
||||
|
@ -15,7 +15,7 @@ proc-macro2 = "1"
|
||||
quote = "1"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
tauri-api = { path = "../../tauri-api", features = ["build"] }
|
||||
tauri-api = { path = "../tauri-api", features = ["build"] }
|
||||
thiserror = "1"
|
||||
walkdir = "2"
|
||||
zstd = "0.7"
|
||||
|
@ -16,7 +16,7 @@ proc-macro = true
|
||||
proc-macro2 = "1"
|
||||
quote = "1"
|
||||
syn = { version = "1", features = [ "full" ] }
|
||||
tauri-codegen = { path = "../core/tauri-codegen" }
|
||||
tauri-codegen = { path = "../tauri-codegen" }
|
||||
|
||||
[features]
|
||||
custom-protocol = []
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
@ -10,7 +10,7 @@ tauri-build = { path = "../../../core/tauri-build" }
|
||||
[dependencies]
|
||||
serde_json = "1.0"
|
||||
serde = { version = "1.0", features = [ "derive" ] }
|
||||
tauri = { path = "../../../tauri", features =["api-all", "cli"]}
|
||||
tauri = { path = "../../../core/tauri", features =["api-all", "cli"]}
|
||||
|
||||
[features]
|
||||
default = [ "custom-protocol" ]
|
||||
|
@ -10,7 +10,7 @@ tauri-build = { path = "../../../core/tauri-build", features = [ "codegen" ]}
|
||||
[dependencies]
|
||||
serde_json = "1.0"
|
||||
serde = { version = "1.0", features = [ "derive" ] }
|
||||
tauri = { path = "../../../tauri", features =["api-all"]}
|
||||
tauri = { path = "../../../core/tauri", features =["api-all"]}
|
||||
|
||||
[features]
|
||||
default = [ "custom-protocol" ]
|
||||
|
@ -8,7 +8,7 @@ edition = "2018"
|
||||
tauri-build = { path = "../../../core/tauri-build" }
|
||||
|
||||
[dependencies]
|
||||
tauri = { path = "../../../tauri", features =["api-all"]}
|
||||
tauri = { path = "../../../core/tauri", features =["api-all"]}
|
||||
|
||||
[features]
|
||||
default = [ "custom-protocol" ]
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user