mint_cli/output/
args.rs

1use std::path::PathBuf;
2
3use clap::{Args, ValueEnum};
4
5#[derive(Copy, Clone, Debug, Eq, PartialEq, ValueEnum)]
6pub enum OutputFormat {
7    Hex,
8    Mot,
9}
10
11#[derive(Args, Debug, Clone)]
12pub struct OutputArgs {
13    #[arg(
14        short = 'o',
15        long,
16        value_name = "DIR",
17        default_value = "out",
18        help = "Output directory"
19    )]
20    pub out: PathBuf,
21
22    #[arg(
23        long,
24        value_name = "STR",
25        default_value = "",
26        help = "Optional prefix to prepend to each block name in output filename"
27    )]
28    pub prefix: String,
29
30    #[arg(
31        long,
32        value_name = "STR",
33        default_value = "",
34        help = "Optional suffix to append to each block name in output filename"
35    )]
36    pub suffix: String,
37
38    #[arg(
39        long,
40        value_name = "N",
41        default_value_t = 32u16,
42        value_parser = clap::value_parser!(u16).range(1..=64),
43        help = "Number of bytes per HEX data record (1..=64)",
44    )]
45    pub record_width: u16,
46
47    #[arg(
48        long,
49        value_enum,
50        default_value_t = OutputFormat::Hex,
51        help = "Output format: hex or mot",
52    )]
53    pub format: OutputFormat,
54
55    #[arg(long, help = "Emit a single combined file instead of one per block")]
56    pub combined: bool,
57
58    #[arg(long, help = "Show detailed build statistics")]
59    pub stats: bool,
60
61    #[arg(long, help = "Suppress all output except errors")]
62    pub quiet: bool,
63}