helix/dna/cmd/
build.rs

1use clap::Args;
2use std::path::PathBuf;
3use crate::mds::build;
4
5
6
7#[derive(Args)]
8pub struct BuildArgs {
9    /// Input file path (defaults to current directory)
10    #[arg(short, long)]
11    pub input: Option<PathBuf>,
12    #[arg(short, long)]
13    pub output: Option<PathBuf>,
14    #[arg(short = 'O', long, default_value = "2")]
15    pub optimize: u8,
16    #[arg(short, long)]
17    pub compress: bool,
18    #[arg(long)]
19    pub cache: bool,
20}
21
22#[derive(clap::Subcommand)]
23pub enum BuildCommands {
24    Build(BuildArgs),
25}
26
27pub fn run(args: BuildArgs) -> anyhow::Result<()> {
28    build::run_build(args)
29}