use rendering::App;
use tracing::info;
use winit::event_loop::{ControlFlow, EventLoop};
#[cfg(target_arch = "wasm32")]
#[path = "wasm/mod.rs"]
pub mod platform;
#[cfg(not(target_arch = "wasm32"))]
#[path = "native/mod.rs"]
pub mod platform;
pub mod rendering;
// Hi, you've found the real main function! This is called AFTER platform-specific initialization code.
pub fn start() {
info!(
"Hello, world! StarKingdoms.TK v{} says hello, running on {}",
env!("CARGO_PKG_VERSION"),
if cfg!(target_arch = "wasm32") {
"wasm"
} else {
"native"
}
);
info!("Creating the ECS world...");
let event_loop = EventLoop::new().unwrap();
event_loop.set_control_flow(ControlFlow::Wait);
event_loop.run_app(&mut App::default()).unwrap();
}