mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 03:53:43 +08:00
chore: remove fast-dev profile and enhance dev profile settings
This commit is contained in:
parent
7383459b9a
commit
9d9dd73790
@ -3,8 +3,8 @@
|
|||||||
"version": "2.2.4-alpha.2",
|
"version": "2.2.4-alpha.2",
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "cross-env RUST_BACKTRACE=1 tauri dev -f verge-dev -- --profile fast-dev",
|
"dev": "cross-env RUST_BACKTRACE=1 tauri dev -f verge-dev",
|
||||||
"dev:diff": "cross-env RUST_BACKTRACE=1 tauri dev -f verge-dev -- --profile fast-dev",
|
"dev:diff": "cross-env RUST_BACKTRACE=1 tauri dev -f verge-dev",
|
||||||
"build": "cross-env NODE_OPTIONS='--max-old-space-size=4096' tauri build",
|
"build": "cross-env NODE_OPTIONS='--max-old-space-size=4096' tauri build",
|
||||||
"build:fast": "cross-env NODE_OPTIONS='--max-old-space-size=4096' tauri build -- --profile fast-release",
|
"build:fast": "cross-env NODE_OPTIONS='--max-old-space-size=4096' tauri build -- --profile fast-release",
|
||||||
"tauri": "tauri",
|
"tauri": "tauri",
|
||||||
|
@ -104,6 +104,10 @@ strip = true
|
|||||||
|
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
incremental = true
|
incremental = true
|
||||||
|
codegen-units = 256 # 增加编译单元,提升编译速度
|
||||||
|
opt-level = 0 # 禁用优化,进一步提升编译速度
|
||||||
|
debug = true # 保留调试信息
|
||||||
|
strip = false # 不剥离符号,保留调试信息
|
||||||
|
|
||||||
[profile.fast-release]
|
[profile.fast-release]
|
||||||
inherits = "release" # 继承 release 的配置
|
inherits = "release" # 继承 release 的配置
|
||||||
@ -114,14 +118,6 @@ opt-level = 0 # 禁用优化,大幅提升编译速度
|
|||||||
debug = true # 保留调试信息
|
debug = true # 保留调试信息
|
||||||
strip = false # 不剥离符号,保留调试信息
|
strip = false # 不剥离符号,保留调试信息
|
||||||
|
|
||||||
[profile.fast-dev]
|
|
||||||
inherits = "dev" # 继承 dev 的配置
|
|
||||||
codegen-units = 256 # 增加编译单元,提升编译速度
|
|
||||||
opt-level = 0 # 禁用优化,进一步提升编译速度
|
|
||||||
incremental = true # 启用增量编译
|
|
||||||
debug = true # 保留调试信息
|
|
||||||
strip = false # 不剥离符号,保留调试信息
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "app_lib"
|
name = "app_lib"
|
||||||
crate-type = ["staticlib", "cdylib", "rlib"]
|
crate-type = ["staticlib", "cdylib", "rlib"]
|
||||||
|
@ -9,5 +9,4 @@ pub mod timer;
|
|||||||
pub mod tray;
|
pub mod tray;
|
||||||
pub mod win_uwp;
|
pub mod win_uwp;
|
||||||
|
|
||||||
pub use self::core::*;
|
pub use self::{core::*, timer::Timer};
|
||||||
pub use self::timer::Timer;
|
|
||||||
|
@ -79,16 +79,16 @@ pub fn clean() -> bool {
|
|||||||
// 1. 处理TUN模式
|
// 1. 处理TUN模式
|
||||||
let tun_success = if Config::verge().data().enable_tun_mode.unwrap_or(false) {
|
let tun_success = if Config::verge().data().enable_tun_mode.unwrap_or(false) {
|
||||||
let disable_tun = serde_json::json!({
|
let disable_tun = serde_json::json!({
|
||||||
"tun": {
|
"tun": {
|
||||||
"enable": false
|
"enable": false
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
timeout(
|
timeout(
|
||||||
Duration::from_secs(1),
|
Duration::from_secs(1),
|
||||||
MihomoManager::global().patch_configs(disable_tun),
|
MihomoManager::global().patch_configs(disable_tun),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
.is_ok()
|
.is_ok()
|
||||||
} else {
|
} else {
|
||||||
true
|
true
|
||||||
};
|
};
|
||||||
@ -98,7 +98,7 @@ pub fn clean() -> bool {
|
|||||||
Duration::from_secs(1),
|
Duration::from_secs(1),
|
||||||
sysopt::Sysopt::global().reset_sysproxy(),
|
sysopt::Sysopt::global().reset_sysproxy(),
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
let core_res = timeout(Duration::from_secs(1), CoreManager::global().stop_core()).await;
|
let core_res = timeout(Duration::from_secs(1), CoreManager::global().stop_core()).await;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user