clash-verge-rev/Cargo.toml
Tunglies 6fea76f7e3
feat(core): enable enhanced panic diagnostics and observability
Transitioned panic strategy from 'abort' to 'unwind' and integrated a
global panic hook into the logging framework.

This change allows the application to capture critical failure metadata—
including specific file locations, line numbers, and panic payloads—
persisting them to local logs before exit.

Note: We prioritize troubleshooting capability and long-term stability
at this stage. Reverting to 'panic = abort', `debug = false`,
`strip = true`, `remove split-debuginfo` for peak performance and
minimal binary size will only be considered once the project reaches
a mature state with near-zero community-reported crashes.
2026-04-12 03:26:48 +08:00

140 lines
3.6 KiB
TOML

[workspace]
members = [
"src-tauri",
"crates/clash-verge-draft",
"crates/clash-verge-logging",
"crates/clash-verge-signal",
"crates/tauri-plugin-clash-verge-sysinfo",
"crates/clash-verge-i18n",
"crates/clash-verge-limiter",
]
resolver = "2"
[profile.release]
panic = "unwind"
codegen-units = 1
lto = "thin"
opt-level = 3
debug = 1
strip = "none"
overflow-checks = false
split-debuginfo = "unpacked"
rpath = false
[profile.dev]
incremental = true
codegen-units = 64
opt-level = 0
debug = true
strip = "none"
overflow-checks = true
lto = false
rpath = false
[profile.fast-release]
inherits = "release"
codegen-units = 64
incremental = true
lto = false
opt-level = 0
debug = true
strip = false
[profile.debug-release]
inherits = "fast-release"
codegen-units = 1
split-debuginfo = "unpacked"
[workspace.dependencies]
clash-verge-draft = { path = "crates/clash-verge-draft" }
clash-verge-logging = { path = "crates/clash-verge-logging" }
clash-verge-signal = { path = "crates/clash-verge-signal" }
clash-verge-i18n = { path = "crates/clash-verge-i18n" }
clash-verge-limiter = { path = "crates/clash-verge-limiter" }
tauri-plugin-clash-verge-sysinfo = { path = "crates/tauri-plugin-clash-verge-sysinfo" }
tauri = { version = "2.10.3" }
tauri-plugin-clipboard-manager = "2.3.2"
parking_lot = { version = "0.12.5", features = ["hardware-lock-elision"] }
anyhow = "1.0.102"
criterion = { version = "0.8.2", features = ["async_tokio"] }
tokio = { version = "1.50.0", features = [
"rt-multi-thread",
"macros",
"time",
"sync",
] }
flexi_logger = "0.31.8"
log = "0.4.29"
smartstring = { version = "1.0.1" }
compact_str = { version = "0.9.0", features = ["serde"] }
serde = { version = "1.0.228" }
serde_json = { version = "1.0.149" }
serde_yaml_ng = { version = "0.10.0" }
bitflags = { version = "2.11.0" }
# *** For Windows platform only ***
deelevate = "0.2.0"
# *********************************
[workspace.lints.clippy]
correctness = { level = "deny", priority = -1 }
suspicious = { level = "deny", priority = -1 }
unwrap_used = "warn"
expect_used = "warn"
panic = "deny"
unimplemented = "deny"
todo = "warn"
dbg_macro = "warn"
clone_on_ref_ptr = "warn"
rc_clone_in_vec_init = "warn"
large_stack_arrays = "warn"
large_const_arrays = "warn"
async_yields_async = "deny"
mutex_atomic = "deny"
mutex_integer = "deny"
rc_mutex = "deny"
unused_async = "deny"
await_holding_lock = "deny"
large_futures = "deny"
future_not_send = "deny"
redundant_else = "deny"
needless_continue = "deny"
needless_raw_string_hashes = "deny"
or_fun_call = "deny"
cognitive_complexity = "deny"
useless_let_if_seq = "deny"
use_self = "deny"
tuple_array_conversions = "deny"
trait_duplication_in_bounds = "deny"
suspicious_operation_groupings = "deny"
string_lit_as_bytes = "deny"
significant_drop_tightening = "deny"
significant_drop_in_scrutinee = "deny"
redundant_clone = "deny"
# option_if_let_else = "deny" // 过于激进,暂时不开启
needless_pass_by_ref_mut = "deny"
needless_collect = "deny"
missing_const_for_fn = "deny"
iter_with_drain = "deny"
iter_on_single_items = "deny"
iter_on_empty_collections = "deny"
# fallible_impl_from = "deny" // 过于激进,暂时不开启
equatable_if_let = "deny"
collection_is_never_read = "deny"
branches_sharing_code = "deny"
pathbuf_init_then_push = "deny"
option_as_ref_cloned = "deny"
large_types_passed_by_value = "deny"
# implicit_clone = "deny" // 可能会造成额外开销,暂时不开启
expl_impl_clone_on_copy = "deny"
copy_iterator = "deny"
cloned_instead_of_copied = "deny"
# self_only_used_in_recursion = "deny" // Since 1.92.0
unnecessary_self_imports = "deny"
unused_trait_names = "deny"
wildcard_imports = "deny"
unnecessary_wraps = "deny"