1mod commands;
2pub(crate) mod engine;
3#[cfg(feature = "python")]
4mod python;
5mod script;
6#[cfg(feature = "repl")]
7mod session;
8
9#[cfg(feature = "repl")]
10use log::LevelFilter;
11#[cfg(feature = "repl")]
12use miden_assembly_syntax::diagnostics::{IntoDiagnostic, Report};
13
14pub use self::script::run_commands;
15#[cfg(feature = "repl")]
16use self::session::ReplSession;
17#[cfg(feature = "repl")]
18use crate::config::DebuggerConfig;
19
20#[cfg(feature = "repl")]
22pub fn run(config: Box<DebuggerConfig>, logger: Box<dyn log::Log>) -> Result<(), Report> {
23 run_with_log_level(config, logger, LevelFilter::Trace)
24}
25
26#[cfg(feature = "repl")]
28pub fn run_with_log_level(
29 config: Box<DebuggerConfig>,
30 logger: Box<dyn log::Log>,
31 max_level: LevelFilter,
32) -> Result<(), Report> {
33 crate::logger::DebugLogger::install_with_max_level(logger, max_level).into_diagnostic()?;
36
37 let mut session = ReplSession::new(config)?;
38 session.run()
39}