use clap::{Args, Parser};
use sway_core::BuildTarget;
#[derive(Debug, Default, Parser)]
pub struct Build {
#[clap(flatten)]
pub pkg: Pkg,
#[clap(flatten)]
pub print: Print,
#[clap(flatten)]
pub minify: Minify,
#[clap(flatten)]
pub output: BuildOutput,
#[clap(flatten)]
pub profile: BuildProfile,
#[clap(long, value_enum, default_value_t = BuildTarget::default(), alias="target")]
pub build_target: BuildTarget,
}
#[derive(Args, Debug, Default)]
pub struct BuildOutput {
#[clap(long = "output-bin", short = 'o')]
pub bin_file: Option<String>,
#[clap(long = "output-debug", short = 'g')]
pub debug_file: Option<String>,
}
#[derive(Args, Debug, Default)]
pub struct BuildProfile {
#[clap(long)]
pub build_profile: Option<String>,
#[clap(long)]
pub release: bool,
}
#[derive(Args, Debug, Default)]
pub struct Print {
#[clap(long)]
pub ast: bool,
#[clap(long)]
pub dca_graph: bool,
#[clap(long)]
pub finalized_asm: bool,
#[clap(long)]
pub intermediate_asm: bool,
#[clap(long)]
pub ir: bool,
#[clap(long)]
pub time_phases: bool,
}
#[derive(Args, Debug, Default)]
pub struct Pkg {
#[clap(short, long)]
pub path: Option<String>,
#[clap(long)]
pub offline: bool,
#[clap(long, short = 't')]
pub terse: bool,
#[clap(long)]
pub output_directory: Option<String>,
#[clap(long)]
pub locked: bool,
}
#[derive(Args, Debug, Default)]
pub struct Minify {
#[clap(long)]
pub json_abi: bool,
#[clap(long)]
pub json_storage_slots: bool,
}