mod commands; mod error; mod graph_stream; mod repository_actor; mod workspace; pub use error::Error; pub use graph_stream::GraphEvent; pub use workspace::{OpenedRepository, RepositoryId, WorkspaceHandle}; #[cfg_attr(mobile, tauri::mobile_entry_point)] pub fn run() { let (workspace, actor) = WorkspaceHandle::new(); tauri::async_runtime::spawn(actor); tauri::Builder::default() .plugin(tauri_plugin_opener::init()) // The only shared state is the workspace handle, which is a channel // sender. Nothing here is behind a lock. .manage(workspace) .invoke_handler(tauri::generate_handler![ commands::open_repository, commands::close_repository, commands::repository_summary, commands::list_references, commands::stream_graph, commands::request_more_rows, ]) .run(tauri::generate_context!()) .expect("error while running tauri application"); }