You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tauri-plugins-workspace/src/lib.rs

24 lines
597 B

use tauri::{plugin::TauriPlugin, Runtime};
#[cfg(target_os = "windows")]
#[path = "platform_impl/windows.rs"]
mod platform_impl;
#[cfg(target_os = "linux")]
#[path = "platform_impl/linux.rs"]
mod platform_impl;
#[cfg(target_os = "macos")]
#[path = "platform_impl/macos.rs"]
mod platform_impl;
pub(crate) type SingleInstanceCallback =
dyn FnMut(Vec<String>, String, Box<dyn FnOnce()>) + Send + Sync + 'static;
pub fn init<
R: Runtime,
F: FnMut(Vec<String>, String, Box<dyn FnOnce()>) + Send + Sync + 'static,
>(
f: F,
) -> TauriPlugin<R> {
platform_impl::init(Box::new(f))
}