* perf(draft): optimize memory layout by removing double indirection
- Replace `Arc<Box<T>>` with `Arc<T>` to reduce pointer chasing and memory overhead.
- Leverage `Arc::from(Box<T>)` in async modify path for efficient ownership transfer.
- Fix race conditions in `edit_draft` by ensuring atomicity under write lock.
- Performance improved by ~16-24% across all operations (based on Criterion bench).
Benchmarks:
- latest_arc: 41.1ns (-24.2%)
- edit_draft: 92.2ns (-17.6%)
- apply: 89.8ns (-17.7%)
- async_modify: 66.0ns (-16.6%)
* perf(draft): implemented optimistic locking via Arc::ptr_eq for with_data_modify
Benchmarks confirm only a negligible ~2% (1.3ns) overhead for async operations, ensuring total data integrity during concurrent updates.
* refactor(signal): migrate signal to handling async in windows and remove signal-hook dependency
* refactor(signal): enhance Windows signal handling with improved cleanup logic
* refactor(signal): improve exit handling in run function for async compatibility
* fix: receive shutdown signal failed on windows
* docs: update Changelog.md
* chore: update
* fix: use tokio runtime to handle shutdown signal
* docs: update Changelog.md
* fix: move tauri dependency to the correct section in Cargo.toml
* fix: remove unused exit handling code in run function
* fix(clash-verge-signal): use global runtime to avoid tokio runtime panic on unix
* chore: update tauri-plugin-mihomo deps
* fix: handle macOS exit event to ensure proper application termination
---------
Co-authored-by: Tunglies <77394545+Tunglies@users.noreply.github.com>
* feat(sysinfo): add tauri-plugin-clash-verge-sysinfo for system information retrieval
* feat(sysinfo): add tauri-plugin-clash-verge-sysinfo for system information retrieval
* fix(service): import Manager trait for app handle in linux_running_as_root function
- Add Cargo.toml for workspace management, including dependencies and profiles.
- Create clash-verge-draft crate with basic structure, including a benchmark for Draft functionality.
- Implement Draft management with shared state and asynchronous modifications.
- Add tests for Draft functionality to ensure correctness.
- Create clash-verge-logging crate for logging utilities with structured log types and macros.
- Update src-tauri to use new crates and remove unnecessary configurations.
- Refactor existing code to utilize the new Draft and logging functionalities.