2024-12-01 20:50:11 -05:00
|
|
|
use anyhow::Result;
|
2024-12-01 16:02:06 -05:00
|
|
|
use log2::info;
|
|
|
|
|
|
|
|
pub mod core;
|
|
|
|
|
|
|
|
#[tokio::main]
|
2024-12-01 20:50:11 -05:00
|
|
|
async fn main() -> Result<()> {
|
2024-12-01 22:58:52 -05:00
|
|
|
let _log2 = log2::open("z.log").tee(true).level("debug").start();
|
2024-12-01 16:02:06 -05:00
|
|
|
info!("Initalizing Engine");
|
|
|
|
let shell_thread = tokio::task::spawn(async {
|
|
|
|
info!("Shell thread started");
|
|
|
|
core::repl::handle_repl().await;
|
2024-12-01 22:58:52 -05:00
|
|
|
});
|
2024-12-01 16:02:06 -05:00
|
|
|
|
|
|
|
core::splash::print_splash();
|
|
|
|
info!("Engine Initalized");
|
2024-12-01 22:58:52 -05:00
|
|
|
core::init_renderer()?;
|
2024-12-01 16:02:06 -05:00
|
|
|
shell_thread.await?;
|
|
|
|
Ok(())
|
|
|
|
}
|