~/hooky

hooky/command/src-tauri/src/main.rs -rw-r--r-- 506 B
89bc4b52 — Arthur Melton init command 2 years ago
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![cfg_attr(
    all(not(debug_assertions), target_os = "windows"),
    windows_subsystem = "windows"
)]

// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
#[tauri::command]
fn greet(name: &str) -> String {
    format!("Hello, {}! You've been greeted from Rust!", name)
}

fn main() {
    tauri::Builder::default()
        .invoke_handler(tauri::generate_handler![greet])
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}