mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
29 lines
613 B
Rust
29 lines
613 B
Rust
use super::CmdResult;
|
|
|
|
/// Platform-specific implementation for UWP functionality
|
|
#[cfg(windows)]
|
|
mod platform {
|
|
use super::CmdResult;
|
|
use crate::{core::win_uwp, wrap_err};
|
|
|
|
pub async fn invoke_uwp_tool() -> CmdResult {
|
|
wrap_err!(win_uwp::invoke_uwptools().await)
|
|
}
|
|
}
|
|
|
|
/// Stub implementation for non-Windows platforms
|
|
#[cfg(not(windows))]
|
|
mod platform {
|
|
use super::CmdResult;
|
|
|
|
pub async fn invoke_uwp_tool() -> CmdResult {
|
|
Ok(())
|
|
}
|
|
}
|
|
|
|
/// Command exposed to Tauri
|
|
#[tauri::command]
|
|
pub async fn invoke_uwp_tool() -> CmdResult {
|
|
platform::invoke_uwp_tool().await
|
|
}
|