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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//! Kasou (仮想) — Apple Virtualization.framework platform library.
//!
//! Kasou provides a Rust API for creating and managing virtual machines on macOS
//! using Apple's Virtualization.framework via `objc2-virtualization`. It serves
//! as the VM backend for tatara (workload orchestrator) and kikai (K3s lifecycle).
//!
//! # Platform API
//!
//! Kasou follows the pleme-io platform style:
//! - **Pure data types** (`VmConfig`, `MacAddress`, `VmId`) — fully testable, no I/O
//! - **Runtime types** (`VmHandle`, `VmState`) — own OS resources
//! - **Event system** (`VmEvent`, `VmEventBus`) — broadcast lifecycle events
//! - **Builder pattern** (`VmConfigBuilder`) — fluent, type-safe configuration
//! - **Trait extensibility** — consumers can observe state and events
//!
//! # Quick Start
//!
//! ```no_run
//! use kasou::VmConfigBuilder;
//! use std::path::PathBuf;
//!
//! let config = VmConfigBuilder::new("my-vm")
//! .cpus(4)
//! .memory_mib(8192)
//! .boot(PathBuf::from("/path/to/kernel"))
//! .initrd(PathBuf::from("/path/to/initrd"))
//! .cmdline("console=hvc0 root=/dev/vda")
//! .disk(PathBuf::from("/path/to/root.img"))
//! .deterministic_mac("my-host")
//! .build()
//! .unwrap();
//!
//! let handle = kasou::VmHandle::create(config).unwrap();
//! handle.start().unwrap();
//! ```
// Core config types (pure data)
pub use BootConfig;
pub use VmConfigBuilder;
pub use VmConfig;
pub use DiskConfig;
pub use NetworkConfig;
pub use SerialConfig;
pub use SharedDirConfig;
// Platform types
pub use ;
// Event system
pub use ;
// Runtime types
pub use ;
pub use ;
// Utilities
pub use deterministic_mac;