tauri/examples/helloworld/src-tauri/src/main.rs

17 lines
390 B
Rust
Raw Normal View History

#![cfg_attr(
all(not(debug_assertions), target_os = "windows"),
windows_subsystem = "windows"
)]
#[tauri::command]
fn my_custom_command(argument: String) {
println!("{}", argument);
}
fn main() {
tauri::Builder::default()
.invoke_handler(tauri::generate_handler![my_custom_command])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}