feature/share-libs
rs 17 lines 509 Bytes
Raw
1 #![cfg_attr(
2 all(not(debug_assertions), target_os = "windows"),
3 windows_subsystem = "windows"
4 )]
5
6 // Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
7 #[tauri::command]
8 fn greet(name: &str) -> String {
9 format!("Hello, {}! You've been greeted from Rust!!!!", name)
10 }
11
12 fn main() {
13 tauri::Builder::default()
14 .invoke_handler(tauri::generate_handler![greet])
15 .run(tauri::generate_context!())
16 .expect("error while running tauri application");
17 }