#![cfg_attr( all(not(debug_assertions), target_os = "windows"), windows_subsystem = "windows" )] use std::str::FromStr; // use tokio::runtime::Runtime; mod storage; mod http; fn main() { tauri::Builder::default() .setup(|app| { let addr = std::net::SocketAddrV4::from_str("127.0.0.1:12345").unwrap(); tauri::async_runtime::spawn(http::serve(addr, app.handle())); Ok(()) }) .run(tauri::generate_context!()) .expect("error while running tauri application"); // let addr = std::net::SocketAddrV4::from_str("127.0.0.1:12345").unwrap(); // let rt = Runtime::new().unwrap(); // rt.block_on(http::serve(addr)).unwrap(); // let creds = std::fs::read_to_string("credentials.json").unwrap(); // storage::save(&creds, "correct horse battery staple"); }