qorzen_oxide/
lib.rs

1// src/lib.rs
2
3//! Qorzen Core - A modular plugin-based system with async core managers
4
5#![cfg_attr(debug_assertions, allow(unsafe_code))]
6#![deny(unsafe_code)]
7#![cfg_attr(test, allow(unsafe_code))]
8#![warn(clippy::all)]
9#![allow(clippy::module_name_repetitions)]
10#![allow(clippy::result_large_err)]
11#![allow(clippy::type_complexity)]
12#![allow(clippy::large_enum_variant)]
13
14#[cfg(target_arch = "wasm32")]
15use wasm_bindgen::prelude::*;
16#[cfg(target_arch = "wasm32")]
17#[wasm_bindgen(start)]
18pub fn main() {
19    // SETUP PANIC HOOK FIRST
20    console_error_panic_hook::set_once();
21
22    // SETUP WASM LOGGING
23    tracing_wasm::set_as_global_default();
24
25    // NOW YOUR LOGS WILL WORK
26    web_sys::console::error_1(&"🚀 WASM ENTRY POINT CALLED".into());
27    web_sys::console::log_1(&"🚀 WASM ENTRY POINT CALLED".into());
28    web_sys::console::warn_1(&"🚀 WASM ENTRY POINT CALLED".into());
29    web_sys::console::info_1(&"🚀 WASM ENTRY POINT CALLED".into());
30
31    // TRACING LOGS
32    tracing::error!("🚀 TRACING ERROR LOG");
33    tracing::warn!("🚀 TRACING WARN LOG");
34    tracing::info!("🚀 TRACING INFO LOG");
35    tracing::debug!("🚀 TRACING DEBUG LOG");
36
37    // Just launch a simple div - DON'T use your complex App yet
38    // Launch the Dioxus application for web
39    dioxus::launch(ui::App);
40}
41
42// Core modules (always available)
43pub mod app;
44pub mod auth;
45pub mod config;
46pub mod error;
47pub mod event;
48pub mod manager;
49pub mod platform;
50pub mod plugin;
51pub mod types;
52pub mod ui;
53pub mod utils;
54pub mod utils_general;
55
56// Native-only modules
57#[cfg(not(target_arch = "wasm32"))]
58pub mod concurrency;
59#[cfg(not(target_arch = "wasm32"))]
60pub mod file;
61#[cfg(not(target_arch = "wasm32"))]
62pub mod logging;
63#[cfg(not(target_arch = "wasm32"))]
64pub mod task;
65
66// Re-export commonly used types
67pub use app::ApplicationCore;
68pub use error::{Error, ErrorKind, Result, ResultExt};
69pub use manager::{Manager, ManagerState, ManagerStatus};
70
71pub const VERSION: &str = env!("CARGO_PKG_VERSION");