paw-gui/src-tauri/Cargo.toml
2025-04-14 19:17:53 +08:00

85 lines
2.4 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[workspace]
members = [
"common", # 共享工具库
"system-service", # 服务相关 crate
".", # GUI 主程序
]
[workspace.package]
version = "0.1.0" # 所有程序的版本号包括tauri的
authors = ["you"]
edition = "2021"
description = "Paw Project"
# 在workspace层面定义共享依赖
[workspace.dependencies]
anyhow = "1.0.93"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tokio = { version = "1.41.1", features = ["full"] }
tracing = "0.1.41"
tracing-subscriber = { version = "0.3.18", features = ["local-time"] }
# specta用于将Rust类型、函数导出到TypeScript
specta = "=2.0.0-rc.20"
specta-typescript = "0.0.7"
tauri-specta = { version = "=2.0.0-rc.20", features = ["derive", "typescript"] }
futures-util = "0.3.30"
bytes = "1.7.2"
# Tauri主程序
[package]
name = "paw-gui"
edition.workspace = true
version.workspace = true
authors.workspace = true
description.workspace = true
[lib]
name = "paw_gui_lib"
crate-type = ["staticlib", "cdylib", "rlib"]
[build-dependencies]
tauri-build = { version = "2", features = [] }
[dependencies]
# 子package尽量使用workspace中定义的公共依赖以保证版本一致
anyhow.workspace = true
serde.workspace = true
serde_json.workspace = true
tokio = { workspace = true, features = ["process"] }
tracing.workspace = true
tracing-subscriber.workspace = true
specta.workspace = true
specta-typescript.workspace = true
tauri-specta.workspace = true
futures-util.workspace = true
bytes.workspace = true
# 特定于GUI的依赖
tauri = { version = "2.1.1", features = [ "protocol-asset", "tray-icon", "image-ico", "image-png"] }
tauri-plugin-shell = "2"
reqwest = "0.12.9"
elevated-command = "1.1.2"
paw-common = { path = "./common" }
tauri-plugin-dialog = "2"
tauri-plugin-os = "2"
tauri-plugin-process = "2"
tauri-plugin-http = "2"
tauri-plugin-store = "2"
tauri-plugin-websocket = "2"
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
tauri-plugin-global-shortcut = "2"
tauri-plugin-single-instance = "2"
[profile.dev]
incremental = true # Compile your binary in smaller steps.
[profile.release]
codegen-units = 1 # Allows LLVM to perform better optimization.
lto = true # Enables link-time-optimizations.
opt-level = "s" # Prioritizes small binary size. Use `3` if you prefer speed.
strip = true # Ensures debug symbols are removed.