zenyx-engine-telemetry/engine/src/main.rs

47 lines
1.1 KiB
Rust
Raw Normal View History

2024-12-01 20:50:11 -05:00
use anyhow::Result;
use colored::Colorize;
2024-12-01 16:02:06 -05:00
use log2::info;
pub mod core;
pub fn print_splash() {
println!(
r#"
&&&&&&&&&&&
&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&
&& &&&&&&&&&
&& &&&&&&&&&
&&&&&&&&&&&& &&&&&&&&&&&
&&&&&&&&&&&&& &&&&&&&&&&&&
&&&&&&&&&&&&& &&&&&&&&&&&&&
&&&&&&&&&&&& &&&&&&&&&&&&&
&&&&&&&&&&& &&&&&&&&&&&&
&&&&&&&&& &&
&&&&&&&&& &&
&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&
&&&&&&&&&&&
Version: {}
"#,
env!("CARGO_PKG_VERSION").yellow().italic().underline()
);
}
2024-12-01 16:02:06 -05:00
#[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::repl::handle_repl().await;
2024-12-01 22:58:52 -05:00
});
2024-12-01 16:02:06 -05:00
print_splash();
2024-12-01 16:02:06 -05:00
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(())
}