diff --git a/Cargo.lock b/Cargo.lock index 3fcb60c..08366d7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -833,9 +833,9 @@ checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" [[package]] name = "cmake" -version = "0.1.54" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0" +checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" dependencies = [ "cc", ] diff --git a/crates/cli/src/bin/satellite_run.rs b/crates/cli/src/bin/satellite_run.rs index 90cf5e7..f752ba3 100644 --- a/crates/cli/src/bin/satellite_run.rs +++ b/crates/cli/src/bin/satellite_run.rs @@ -45,6 +45,15 @@ fn main() -> CliResult<()> { .map(|path| RuntimeFile::Local { path }) .collect(); + let tokio_runtime = tokio::runtime::Builder::new_multi_thread() + .enable_time() + .enable_io() + .build() + .map_err(|e| { + CliError::runtime_error_simple(format!("Failed to initialize async runtime: {e}")) + })?; + let _tokio_guard = tokio_runtime.enter(); + andromeda::run::run(cli.verbose, cli.no_strict, runtime_files) .map_err(|e| CliError::runtime_error_simple(format!("{e}")))?; diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index 006d628..1fb516e 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -230,6 +230,19 @@ fn main() { #[allow(clippy::result_large_err)] #[hotpath::measure] fn run_main() -> CliResult<()> { + let rt = tokio::runtime::Builder::new_multi_thread() + .enable_time() + .enable_io() + .build() + .map_err(|e| { + error::CliError::config_error( + "Failed to initialize async runtime".to_string(), + None, + Some(Box::new(e)), + ) + })?; + let _tokio_guard = rt.enter(); + // Check if this is currently a single-file executable if let Ok(Some(js)) = find_section(ANDROMEDA_JS_CODE_SECTION) { // Try to load embedded config, fall back to defaults if not found @@ -291,19 +304,6 @@ fn run_main() -> CliResult<()> { Cli::parse() }; - let rt = tokio::runtime::Builder::new_multi_thread() - .enable_time() - .enable_io() - .build() - .map_err(|e| { - error::CliError::config_error( - "Failed to initialize async runtime".to_string(), - None, - Some(Box::new(e)), - ) - })?; - let _tokio_guard = rt.enter(); - let nova_result: CliResult<()> = (move || -> CliResult<()> { match args.command { Command::Run {