fix reqwest::blocking in tokio context via block_in_place; add state_get/state_set

This commit is contained in:
Will Anderson
2026-04-28 14:43:42 -05:00
parent c62ef343f0
commit 18b60e3bf1
+4 -2
View File
@@ -388,7 +388,8 @@ async fn run(cli: Cli) -> Result<(), Box<dyn std::error::Error>> {
let artifact = std::fs::read(&out.artifact_path)?;
let instructions = el_compiler::Bytecode::deserialize_all(&artifact)
.unwrap_or_default();
run_interpreter(&instructions);
// block_in_place lets the interpreter use reqwest::blocking from within tokio::main
tokio::task::block_in_place(|| run_interpreter(&instructions));
}
Command::Test { filter, e2e, all, output, manifest } => {
@@ -568,7 +569,8 @@ async fn run(cli: Cli) -> Result<(), Box<dyn std::error::Error>> {
}
let instructions = el_compiler::Bytecode::deserialize_all(&compiled.artifact)
.unwrap_or_default();
run_interpreter_with_args(&instructions, &args);
// block_in_place lets the interpreter use reqwest::blocking from within tokio::main
tokio::task::block_in_place(|| run_interpreter_with_args(&instructions, &args));
}
Command::BuildFile { file, target, output } => {