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

34 lines
753 B
Rust
Raw Normal View History

#![feature(panic_payload_as_str)]
use core::{
panic::set_panic_hook,
repl::{handler::COMMAND_MANAGER, setup},
splash, workspace,
};
2024-12-01 16:02:06 -05:00
use colored::Colorize;
2024-12-21 16:28:32 -05:00
use mlua::Lua;
use tokio::runtime;
2024-12-01 16:02:06 -05:00
pub mod core;
fn main() -> anyhow::Result<()> {
if !cfg!(debug_assertions) {
println!("{}", "Debug mode disabled".bright_blue());
set_panic_hook();
}
let runtime = runtime::Builder::new_current_thread()
.enable_all()
.build()?;
runtime.block_on(async {
setup();
splash::print_splash();
COMMAND_MANAGER.read().execute("help", None)?;
let t = tokio::spawn(core::repl::input::handle_repl());
t.await??;
2024-12-21 16:28:32 -05:00
Ok::<(), anyhow::Error>(())
})?;
2024-12-01 16:02:06 -05:00
Ok(())
}