From 1faf59debb44ba7d2b2b292fea16b4f5ea568362 Mon Sep 17 00:00:00 2001 From: DavidHerran Date: Tue, 24 Mar 2026 09:47:32 -0500 Subject: [PATCH] commit inicial: scaffolding de Origin World Navigator con Tauri y Rust --- lib.rs | 14 ++++++++++++++ main.rs | 6 ++++++ 2 files changed, 20 insertions(+) create mode 100644 lib.rs create mode 100644 main.rs diff --git a/lib.rs b/lib.rs new file mode 100644 index 0000000..4a277ef --- /dev/null +++ b/lib.rs @@ -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"); +} diff --git a/main.rs b/main.rs new file mode 100644 index 0000000..5f5000e --- /dev/null +++ b/main.rs @@ -0,0 +1,6 @@ +// Prevents additional console window on Windows in release, DO NOT REMOVE!! +#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] + +fn main() { + worldnavigator_lib::run() +}