slow going

This commit is contained in:
Bel LaPointe
2023-12-27 09:11:04 -05:00
parent f7ca241cbc
commit 62eefeea0f
6 changed files with 145 additions and 67 deletions

View File

@@ -13,6 +13,7 @@ edition = "2021"
tauri-build = { version = "1.5", features = [] }
[dependencies]
lib = { path = "../src-lib" }
tauri = { version = "1.5", features = ["shell-open"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

View File

@@ -1,15 +1,21 @@
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
use lib;
#[tauri::command]
fn greet(name: &str) -> String {
format!("Hello, {}! You've been greeted from Rust!", name)
fn analyze(file: &str) -> String {
lib::analyze(file)
}
#[tauri::command]
fn clipify(file: &str) -> String {
lib::clipify(file)
}
fn main() {
tauri::Builder::default()
.invoke_handler(tauri::generate_handler![greet])
.invoke_handler(tauri::generate_handler![analyze, clipify])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}