1use std::path::PathBuf;
2
3use clap::Parser;
4use openvm_circuit::arch::OPENVM_DEFAULT_INIT_FILE_NAME;
5
6#[derive(Clone, Parser)]
7pub struct OpenVmConfigArgs {
8 #[arg(
9 long,
10 help = "Path to the OpenVM config .toml file that specifies the VM extensions, by default will search for the file at ${manifest_dir}/openvm.toml",
11 help_heading = "OpenVM Options"
12 )]
13 pub config: Option<PathBuf>,
14
15 #[arg(
16 long,
17 help = "Output directory that OpenVM proving artifacts will be copied to",
18 help_heading = "OpenVM Options"
19 )]
20 pub output_dir: Option<PathBuf>,
21
22 #[arg(
23 long,
24 default_value = OPENVM_DEFAULT_INIT_FILE_NAME,
25 help = "Name of the init file",
26 help_heading = "OpenVM Options"
27 )]
28 pub init_file_name: String,
29}
30
31impl Default for OpenVmConfigArgs {
32 fn default() -> Self {
33 Self {
34 config: None,
35 output_dir: None,
36 init_file_name: OPENVM_DEFAULT_INIT_FILE_NAME.to_string(),
37 }
38 }
39}
40
41#[derive(Clone, Default, Parser)]
42pub struct ManifestArgs {
43 #[arg(
44 long,
45 value_name = "DIR",
46 help = "Directory for all generated artifacts and intermediate files",
47 help_heading = "Output Options"
48 )]
49 pub target_dir: Option<PathBuf>,
50
51 #[arg(
52 long,
53 value_name = "PATH",
54 help = "Path to the Cargo.toml file, by default searches for the file in the current or any parent directory",
55 help_heading = "Manifest Options"
56 )]
57 pub manifest_path: Option<PathBuf>,
58}
59
60#[derive(Clone, Default, Parser)]
61pub struct ProvingKeyArgs {
62 #[arg(
63 long,
64 action,
65 help = "Path to app proving key, by default will be ${openvm_dir}/app.pk",
66 help_heading = "OpenVM Options"
67 )]
68 pub app_pk: Option<PathBuf>,
69
70 #[arg(
71 long,
72 action,
73 help = "Path to aggregation prefix proving key, by default will be ${openvm_dir}/agg_prefix.pk",
74 help_heading = "OpenVM Options"
75 )]
76 pub agg_prefix_pk: Option<PathBuf>,
77
78 #[arg(
79 long,
80 action,
81 help = "Path to the internal recursive (aggregation) proving key, by default will be ${HOME}/.openvm/internal_recursive.pk",
82 help_heading = "OpenVM Options"
83 )]
84 pub agg_pk: Option<PathBuf>,
85}