use anyhow::Result;
use clap::{Parser, Subcommand};
use std::path::PathBuf;
mod manifest;
mod pack;
mod skill;
mod validate;
mod wasm;
#[derive(Parser)]
#[command(name = "act-build", about = "Build tool for ACT WASM components")]
struct Cli {
#[command(subcommand)]
command: Command,
}
#[derive(Subcommand)]
enum Command {
Pack {
wasm: PathBuf,
},
Validate {
wasm: PathBuf,
},
}
fn main() -> Result<()> {
tracing_subscriber::fmt()
.with_env_filter(
tracing_subscriber::EnvFilter::try_from_default_env()
.unwrap_or_else(|_| "act_build=info".into()),
)
.init();
let cli = Cli::parse();
match cli.command {
Command::Pack { wasm } => pack::run(&wasm),
Command::Validate { wasm } => validate::run(&wasm),
}
}