mirror of
https://github.com/LHY0125/PathEditor.git
synced 2026-06-29 01:45:54 +08:00
cd896d389b
- 创建 Cargo workspace(core / src-tauri / cli 三 crate) - core: 纯 Rust 库,零 Tauri 依赖,包含所有业务逻辑 - src-tauri/commands: 改为薄包装,调用 core 函数 - cli: 基于 clap 的命令行工具,支持 JSON 输出 - CLI 命令: list, add, remove, conflicts, scan, profile, check-admin Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
11 lines
375 B
Rust
11 lines
375 B
Rust
use path_editor_core::system;
|
|
|
|
#[tauri::command]
|
|
pub fn check_admin() -> bool { system::check_admin() }
|
|
#[tauri::command]
|
|
pub fn validate_path(path: &str) -> bool { system::validate_path(path) }
|
|
#[tauri::command]
|
|
pub fn expand_env_vars(path: &str) -> String { system::expand_env_vars(path) }
|
|
#[tauri::command]
|
|
pub fn broadcast_env_change() { system::broadcast_env_change() }
|