first
This commit is contained in:
@@ -1,14 +1,27 @@
|
||||
// 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)
|
||||
}
|
||||
// filepath: src-tauri/src/lib.rs
|
||||
mod ytdlp;
|
||||
mod downloader;
|
||||
mod storage;
|
||||
mod commands;
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_opener::init())
|
||||
.invoke_handler(tauri::generate_handler![greet])
|
||||
.plugin(tauri_plugin_dialog::init())
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
commands::init_ytdlp,
|
||||
commands::update_ytdlp,
|
||||
commands::get_ytdlp_version,
|
||||
commands::fetch_metadata,
|
||||
commands::start_download,
|
||||
commands::get_settings,
|
||||
commands::save_settings,
|
||||
commands::get_history,
|
||||
commands::clear_history,
|
||||
commands::delete_history_item,
|
||||
commands::open_in_explorer
|
||||
])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user