Add utility functions and configurations for rustfs-gui (#220)

* Initialize rustfs-gui crate

- Set up the `rustfs-gui` package in the workspace.
- Add `dioxus` dependency with `router` feature.
- Configure workspace settings for edition, license, repository, and rust-version.
- Include lints configuration for the workspace.

* Add utility functions and configurations for rustfs-gui

- Implement `RustFSConfig` struct with default values and methods for loading, saving, and clearing configurations.
- Add `ServiceCommand` enum for managing service commands.
- Implement `ServiceManager` struct for starting, stopping, and restarting the service.
- Include helper functions for checking service status, preparing the service, downloading files, and unzipping files.
- Add logging and error handling for service operations.
This commit is contained in:
houseme
2025-02-18 00:55:34 +08:00
committed by GitHub
parent f8cc6f45b8
commit 624889bae5
9 changed files with 4827 additions and 270 deletions
+35
View File
@@ -7,7 +7,42 @@ rust-version.workspace = true
version.workspace = true
[dependencies]
chrono = { workspace = true }
dioxus = { workspace = true, features = ["router"] }
dirs = { workspace = true }
futures-util = { workspace = true }
keyring = { workspace = true }
reqwest = { workspace = true }
rfd = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
tokio = { workspace = true, features = ["io-util", "net", "process", "sync"] }
zip = { workspace = true }
[features]
default = ["desktop"]
web = ["dioxus/web"]
desktop = ["dioxus/desktop"]
mobile = ["dioxus/mobile"]
[profile]
[profile.wasm-dev]
inherits = "dev"
opt-level = 1
[profile.server-dev]
inherits = "dev"
[profile.android-dev]
inherits = "dev"
[profile.release]
opt-level = 3 # 优化级别(0-3
lto = true # 启用链接时优化
codegen-units = 1 # 减少代码生成单元以提高优化效果
[lints]
workspace = true