Expand description
High-level implementation to manage microVM (recommended)
This module uses Executor to manage the microVM, but it gives an opinionated way to create a microVM, this way hides the complexity and save you time in order to start and configure your microVM as quickly as possible.
Example
ⓘ
use tokio::time::{sleep, Duration};
use firepilot::builder::Configuration;
use firepilot::machine::Machine;
// This configuration is not enough to run a microVM
let config = Configuration::new("simple_vm".to_string());
let mut machine = Machine::new();
// Apply configuration to the machine
machine.create(config).await.unwrap();
println!("Booting the VM");
machine.start().await.unwrap();
println!("Waiting a few seconds, the VM is started at this point");
sleep(Duration::from_secs(5)).await;
machine.stop().await.unwrap();
println!("Shutting down the VM");
machine.kill().await.unwrap();
Structs
- An instance of microVM which can be created and deployed easily