1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! Native Rust API for libkrun.
//!
//! This module provides a builder-pattern API for creating and entering microVMs
//! using nested builders for organized configuration.
//!
//! # Example
//!
//! ```rust,no_run
//! use msb_krun::{VmBuilder, Result};
//!
//! fn main() -> Result<()> {
//! // enter() hands process lifecycle to the VMM.
//! // On normal guest exit, the process terminates directly.
//! // It only returns on early setup errors.
//! VmBuilder::new()
//! .machine(|m| m.vcpus(4).memory_mib(2048))
//! .fs(|fs| fs.root("/path/to/rootfs"))
//! .exec(|e| e.path("/bin/myapp").args(["--flag"]).env("HOME", "/root"))
//! .build()?
//! .enter()?;
//!
//! unreachable!()
//! }
//! ```
//--------------------------------------------------------------------------------------------------
// Modules
//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
// Re-Exports
//--------------------------------------------------------------------------------------------------
pub use VmBuilder;
pub use DiskBuilder;
pub use DiskImageFormat;
pub use NetBuilder;
pub use ;
pub use ;
pub use Vm;