lib.rs 494 B

1234567891011121314
  1. // Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
  2. #[tauri::command]
  3. fn greet(name: &str) -> String {
  4. format!("Hello, {}! You've been greeted from Rust!", name)
  5. }
  6. #[cfg_attr(mobile, tauri::mobile_entry_point)]
  7. pub fn run() {
  8. tauri::Builder::default()
  9. .plugin(tauri_plugin_shell::init())
  10. .invoke_handler(tauri::generate_handler![greet])
  11. .run(tauri::generate_context!())
  12. .expect("error while running tauri application");
  13. }