mirror of
https://github.com/tonytins/amtkstat.git
synced 2025-03-20 05:51:21 +00:00
16 lines
539 B
Rust
16 lines
539 B
Rust
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
|
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
|
use webbrowser;
|
|
|
|
#[tauri::command]
|
|
fn open_browser(address: &str) {
|
|
webbrowser::open(address).expect("Failed to open defualt browser.");
|
|
}
|
|
|
|
fn main() {
|
|
tauri::Builder::default()
|
|
.plugin(tauri_plugin_shell::init())
|
|
.invoke_handler(tauri::generate_handler![open_browser])
|
|
.run(tauri::generate_context!())
|
|
.expect("error while running tauri application");
|
|
}
|