Expand description
vm-rs — Cross-platform VM lifecycle management.
Provides a unified interface to create, boot, stop, and manage virtual machines across macOS (Apple Virtualization.framework) and Linux (Cloud Hypervisor).
§Architecture
VmDriver trait ← Platform-agnostic VM lifecycle
├── AppleVzDriver ← macOS: Apple Virtualization.framework
└── CloudHvDriver ← Linux: Cloud Hypervisor REST API
VmManager ← Multi-VM orchestration (auto-selects driver)
NetworkSwitch ← L2 userspace Ethernet switch with MAC learning
OciStore + OciPull ← Content-addressable OCI image management
Setup ← Cloud-init seed ISO, disk CoW, asset downloadRe-exports§
pub use config::VmSocketEndpoint;pub use config::NetworkAttachment;pub use config::VmConfig;pub use config::VmHandle;pub use config::VmState;pub use config::VmmProcess;pub use config::READY_MARKER;pub use driver::VmDriver;pub use driver::VmError;pub use vm::VmManager;
Modules§
- config
- VM configuration types — everything needed to boot and manage a VM.
- driver
- VmDriver trait — platform-agnostic VM lifecycle.
- ffi
- FFI bindings for hypervisor frameworks.
- network
- VM networking — L2 virtual switch, Linux bridge, port forwarding.
- oci
- OCI image management — registry client + content-addressable store.
- setup
- VM setup — image preparation, cloud-init seed ISO generation, SSH keys.
- vm
- VmManager — multi-VM lifecycle orchestration.