بنقرة واحدة
tauri-command
Create a new Rust Tauri v2 command following Hope:RE error handling and module conventions
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Create a new Rust Tauri v2 command following Hope:RE error handling and module conventions
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Primary skill for the Hope:RE AI art protection desktop application. Covers project overview, Zen design language, key conventions, and common workflows.
UI/UX design intelligence for web and mobile. Includes 50+ styles, 161 color palettes, 57 font pairings, 161 product types, 99 UX guidelines, and 25 chart types across 10 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui, and HTML/CSS). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, and check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, and mobile app. Elements: button, modal, navbar, sidebar, card, table, form, and chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, and flat design. Topics: color systems, accessibility, animation, layout, typography, font pairing, spacing, interaction states, shadow, and gradient. Integrations: shadcn/ui MCP for component search and examples.
Handle ONNX model distribution via Git LFS, GitHub Releases, and runtime downloading in Hope:RE
Convert JAX/Python ML models to ONNX format following the Hope:RE notebook pipeline for Google Colab
Load and run ONNX models in the Rust Tauri backend using the ort crate with platform-specific execution providers
Implement the SPSA-PGD adversarial perturbation pipeline for image protection in Rust
| name | tauri-command |
| description | Create a new Rust Tauri v2 command following Hope:RE error handling and module conventions |
When creating a new Tauri command in Hope:RE, follow these conventions:
#[tauri::command]
pub async fn my_command(
app: tauri::AppHandle,
input_param: String,
) -> Result<MyOutput, String> {
let result = some_operation(&input_param)
.map_err(|e| format!("Failed to do operation: {}", e))?;
let _ = app.emit("my-event", &result);
log::info!("Operation completed successfully");
Ok(result)
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct MyOutput {
pub field: String,
pub optional_field: Option<u32>,
}
lib.rsAdd the command to the tauri::Builder invoke handler:
.invoke_handler(tauri::generate_handler![
commands::my_command,
])
Result<T, String> -- no custom error enums.map_err(|e| format!("Descriptive message: {}", e))? for error propagationlog::info!, log::error! for logging (Tauri log plugin)let _ = app.emit(...) for non-critical event emissionsDebug, Clone, serde::Serialize, serde::Deserialize on data transfer structsOption<T> for optional fields#[cfg(...)] for platform-specific code