diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 3d3d0dc..effc37c 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -7,9 +7,14 @@ fn greet(name: &str) -> String { format!("Gokigen'you, {}-san! You've been greeted from Rust!", name) } +#[tauri::command] +fn bash(name: &str) -> String { + format!("/me bashes {name} with a hammer!") +} + fn main() { tauri::Builder::default() - .invoke_handler(tauri::generate_handler![greet]) + .invoke_handler(tauri::generate_handler![greet, bash]) .run(tauri::generate_context!()) .expect("error while running tauri application"); } diff --git a/src/index.html b/src/index.html index 3b7e70d..0bb97a0 100644 --- a/src/index.html +++ b/src/index.html @@ -28,13 +28,18 @@ -
Click on the Tauri logo to learn more about the framework
+Always be closin'
+ +