Skip to main content

harn_cli/cli/
precompile.rs

1use std::path::PathBuf;
2
3use clap::Args;
4
5#[derive(Debug, Args)]
6#[command(arg_required_else_help = true)]
7pub struct PrecompileArgs {
8    /// File or directory to precompile. Directories are walked recursively
9    /// for `.harn` files.
10    pub target: PathBuf,
11    /// Output directory for compiled `.harnbc` artifacts. When omitted,
12    /// each artifact is written next to its source. The directory tree
13    /// under `target` is mirrored under `--out` so per-source pathing is
14    /// preserved.
15    #[arg(long, value_name = "DIR")]
16    pub out: Option<PathBuf>,
17    /// Continue processing the remaining sources even if one fails to
18    /// compile. The exit code still reflects the failure.
19    #[arg(long)]
20    pub keep_going: bool,
21    /// Suppress per-file progress output.
22    #[arg(short = 'q', long)]
23    pub quiet: bool,
24}