use std::thread;
use hyperlight_host::SandboxBuilder;
fn main() -> hyperlight_host::Result<()> {
let mut sandbox = SandboxBuilder::from_file(hyperlight_testing::simple_guest_as_pathbuf())
.host_function("Sleep5Secs", || {
thread::sleep(std::time::Duration::from_secs(5));
Ok(())
})
.build()?;
let message = "Hello, World! I am executing inside of a VM :)\n".to_string();
sandbox
.call::<i32>(
"PrintOutput", message,
)
.unwrap();
Ok(())
}