chore: initial commit
This commit is contained in:
21
src-tauri/src/lib.rs
Normal file
21
src-tauri/src/lib.rs
Normal file
@@ -0,0 +1,21 @@
|
||||
//! Core TauClock backend that wires plugins and exposes Rust commands.
|
||||
//!
|
||||
//! The UI currently uses only frontend logic, but the scaffold is documented
|
||||
//! so contributors know where to extend native capabilities (timers, IPC, etc).
|
||||
|
||||
/// Example command exposed to the frontend. Extend or replace as needed.
|
||||
#[tauri::command]
|
||||
fn greet(name: &str) -> String {
|
||||
format!("Hello, {}! You've been greeted from Rust!", name)
|
||||
}
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
/// Build the Tauri application, attach plugins, and start the runtime loop.
|
||||
pub fn run() {
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_log::Builder::new().build())
|
||||
.plugin(tauri_plugin_opener::init())
|
||||
.invoke_handler(tauri::generate_handler![greet])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
||||
7
src-tauri/src/main.rs
Normal file
7
src-tauri/src/main.rs
Normal file
@@ -0,0 +1,7 @@
|
||||
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
|
||||
/// Thin entry point that simply delegates to the shared library run routine.
|
||||
fn main() {
|
||||
tauclock_lib::run()
|
||||
}
|
||||
Reference in New Issue
Block a user