replace reedline with rustyline

This commit is contained in:
Chance 2024-12-02 15:43:39 -05:00 committed by BitSyndicate
parent 004da12855
commit 1797bc7cda
Signed by: bitsyndicate
GPG key ID: 443E4198D6BBA6DE
3 changed files with 29 additions and 62 deletions

View file

@ -24,24 +24,22 @@ async fn main() -> Result<()> {
if cli.log {
info!("Initializing Engine with logging to stdout enabled");
warn!("REPL cannot be used with logging enabled due to ReedLine not supporting writing to stdout");
core::init_renderer()?;
} else {
LOGGER.write_to_stdout();
info!("Initializing Engine with logging to stdout disabled");
warn!("REPL cannot be used with logging enabled due to ReedLine not supporting writing to stdout");
info!("Writing all logs to file z.log");
LOGGER.write_to_file("z.log");
info!("Logging back to file z.log");
let shell_thread = tokio::task::spawn(async {
core::repl::repl::handle_repl().await;
core::repl::repl::handle_repl().await
});
core::init_renderer()?;
shell_thread.await?;
shell_thread.await??; // LOL - Caz
}
Ok(())