YieldFrame: pause wasm environment till end of frame

This commit is contained in:
2024-04-22 12:21:25 -07:00
parent 13b61a6def
commit 03a8ae9a24
8 changed files with 160 additions and 22 deletions

View File

@ -7,8 +7,17 @@ use crate::go_builder::GoBuilder;
mod go_builder;
fn main() -> VResult<()> {
let builder = GoBuilder::new(&PathBuf::from("example_project"))?;
let builder = GoBuilder::new(
&PathBuf::from("example_project"))?;
let wasm = builder.build()?;
player::run_entry_point(&wasm)?;
let mut executor = player::Executor::new(&wasm)?;
while executor.is_running() {
println!("update started");
executor.update();
println!("update completed");
executor.get_error()?;
}
Ok(())
}