+5
-8
@@ -6,7 +6,7 @@ mod registry;
|
||||
use anyhow::Result;
|
||||
use clap::{Parser, Subcommand};
|
||||
|
||||
use crate::image::ImageCmd;
|
||||
use crate::{image::ImageCmd, qemu::RunCmd};
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(about = "Build bootable initrd VMs from container images")]
|
||||
@@ -25,11 +25,8 @@ enum Commands {
|
||||
#[arg(short = 's', long, default_value = "512")]
|
||||
_size: String,
|
||||
},
|
||||
/// Launch the VM via QEMU using registry artifacts
|
||||
Run {
|
||||
/// Image tag / registry subdir name
|
||||
name: String,
|
||||
},
|
||||
/// Launch a previously built VM via QEMU.
|
||||
Run(RunCmd),
|
||||
/// List slim images in the registry
|
||||
#[command(subcommand)]
|
||||
Image(ImageCmd),
|
||||
@@ -41,8 +38,8 @@ fn main() -> Result<()> {
|
||||
Commands::Build { image, _size: _ } => {
|
||||
build::build(&image)?;
|
||||
}
|
||||
Commands::Run { name } => {
|
||||
qemu::run(&name)?;
|
||||
Commands::Run(cmd) => {
|
||||
qemu::run(cmd)?;
|
||||
}
|
||||
Commands::Image(cmd) => {
|
||||
image::run(cmd)?;
|
||||
|
||||
Reference in New Issue
Block a user