mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-27 15:37:02 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user