11mod errors;
22mod funcs;
33
4- use uuid:: Uuid ;
54use std:: env;
5+ use uuid:: Uuid ;
66
77// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
88// #[tauri::command]
@@ -52,26 +52,33 @@ async fn get_device_id() -> Result<String, String> {
5252async fn get_platform ( ) -> Result < String , String > {
5353 #[ cfg( target_os = "android" ) ]
5454 return Ok ( "android" . to_string ( ) ) ;
55-
55+
5656 #[ cfg( target_os = "ios" ) ]
5757 return Ok ( "ios" . to_string ( ) ) ;
58-
58+
5959 #[ cfg( target_os = "windows" ) ]
6060 return Ok ( "windows" . to_string ( ) ) ;
61-
61+
6262 #[ cfg( target_os = "macos" ) ]
6363 return Ok ( "macos" . to_string ( ) ) ;
64-
64+
6565 #[ cfg( target_os = "linux" ) ]
6666 return Ok ( "linux" . to_string ( ) ) ;
67-
68- #[ cfg( not( any( target_os = "android" , target_os = "ios" , target_os = "windows" , target_os = "macos" , target_os = "linux" ) ) ) ]
67+
68+ #[ cfg( not( any(
69+ target_os = "android" ,
70+ target_os = "ios" ,
71+ target_os = "windows" ,
72+ target_os = "macos" ,
73+ target_os = "linux"
74+ ) ) ) ]
6975 return Ok ( "unknown" . to_string ( ) ) ;
7076}
7177
7278#[ cfg_attr( mobile, tauri:: mobile_entry_point) ]
7379pub fn run ( ) {
7480 tauri:: Builder :: default ( )
81+ . plugin ( tauri_plugin_process:: init ( ) )
7582 . plugin ( tauri_plugin_opener:: init ( ) )
7683 . plugin ( tauri_plugin_store:: Builder :: new ( ) . build ( ) )
7784 . plugin ( tauri_plugin_deep_link:: init ( ) )
@@ -86,7 +93,12 @@ pub fn run() {
8693 Ok ( ( ) )
8794 } )
8895 // Register the commands with Tauri.
89- . invoke_handler ( tauri:: generate_handler![ hash, verify, get_device_id, get_platform] )
96+ . invoke_handler ( tauri:: generate_handler![
97+ hash,
98+ verify,
99+ get_device_id,
100+ get_platform
101+ ] )
90102 . run ( tauri:: generate_context!( ) )
91103 . expect ( "error while running tauri application" ) ;
92104}
0 commit comments