use mp_elements; use tokio::runtime::Runtime; pub mod app; pub mod windows_manager; pub use makepad_widgets; pub use makepad_widgets::makepad_draw; pub use makepad_widgets::makepad_platform; pub mod app_ui; pub mod errors; pub mod file; pub mod menu; pub mod render_task; pub mod widgets; use mp_core::{config::Setting, datapool::DataPool, plugin_system::PluginManager}; use once_cell::sync::Lazy; use std::env; pub static RUNTIME: Lazy = Lazy::new(|| Runtime::new().unwrap()); pub static CONFIG: Lazy = Lazy::new(|| Setting::new()); pub static PLUGIN_MANAGER: Lazy = Lazy::new(|| { PluginManager::new( env::current_dir().unwrap().join( (CONFIG.common.plugins) .as_ref() .unwrap_or(&"loaders".into()), ), ) .unwrap() }); pub static DATAPOOL: Lazy = Lazy::new(|| DataPool::new(&PLUGIN_MANAGER, 10)); pub static GIAPP: Lazy = Lazy::new(|| { RUNTIME.block_on(async { let mut app = mp_elements::App::instant().await; app.init().await; app }) });