feat: Tauri-2-Gerüst mit Svelte und TypeScript anlegen
create-tauri-app, Template svelte-ts. npm run build und cargo check laufen durch. App nicht gestartet, Datenordner und TOML-Config folgen (#1018). Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
14
src-tauri/src/lib.rs
Normal file
14
src-tauri/src/lib.rs
Normal file
@ -0,0 +1,14 @@
|
||||
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
|
||||
#[tauri::command]
|
||||
fn greet(name: &str) -> String {
|
||||
format!("Hello, {}! You've been greeted from Rust!", name)
|
||||
}
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_opener::init())
|
||||
.invoke_handler(tauri::generate_handler![greet])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
||||
Reference in New Issue
Block a user