YieldFrame: pause wasm environment till end of frame
This commit is contained in:
@ -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(())
|
||||
}
|
||||
|
Reference in New Issue
Block a user