add tauri-sqlite and guest module

This commit is contained in:
HorizonCode committed 2024-12-09 23:16:29 +01:00
1 parent ce8c259d1b
commit da2f4c5e06
8 files changed
+779 -7

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
#[tauri::command]
pub fn wave(name: &str) -> String {
format!("Hello, {}! You've been waved from Rust, with a different file!", name)
}
#[tauri::command]
pub fn greet(name: &str) -> String {
format!("Hello, {}! You've been greeted from Rust, with a different file!", name)
}
-4
View File
@@ -1,4 +0,0 @@
#[tauri::command]
pub fn greet(name: &str) -> String {
format!("Hello, {}! You've been greeted from Rust, with a different file!", name)
}
+3 -2
View File
@@ -1,11 +1,12 @@
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
mod handlers;
mod actions;
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_shell::init())
.invoke_handler(tauri::generate_handler![handlers::greet])
.plugin(tauri_plugin_sql::Builder::default().build())
.invoke_handler(tauri::generate_handler![actions::greet, actions::wave])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}