feat: add a function to init properly app library

This commit is contained in:
2024-09-16 22:54:02 +02:00
parent 8fdb74dbae
commit caa3ce71ec
4 changed files with 28 additions and 1 deletions

View File

@ -10,6 +10,8 @@ use thiserror::Error;
use tokio::sync::{Mutex, MutexGuard};
use tower::{Service, ServiceExt};
use ::app::init;
#[derive(Error, Debug)]
pub enum DesktopError {
#[error("Axum error:\n{0}")]
@ -46,6 +48,8 @@ async fn process_tauri_request(
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
init().expect("Failed to initialize the application");
tauri::Builder::default()
.setup(|app| {
let assets_path: PathBuf = app