@@ -15,22 +15,22 @@ use stwo_cairo_utils::binary_utils::run_binary;
1515use thiserror:: Error ;
1616use tracing:: { span, Level } ;
1717
18- /// Command line arguments for stwo_vm_runner.
19- /// Example command line (use absolute paths):
20- /// ```
21- /// cargo run -r --bin stwo_vm_runner -- --program path/to/program --program_input
22- /// path/to/input --layout <LayoutName> --output_execution_resources_path path/to/output
23- /// ```
2418#[ derive( Parser , Debug ) ]
2519#[ clap( author, version, about, long_about = None ) ]
2620struct Args {
27- #[ clap( long = "program" , help = "Path to the compiled program" ) ]
21+ #[ clap( long = "program" , help = "Absolute path to the compiled program. " ) ]
2822 program : PathBuf ,
29- #[ clap( long = "program_input" , help = "Path to the program input file." ) ]
23+ #[ clap(
24+ long = "program_input" ,
25+ help = "Absolute path to the program input file."
26+ ) ]
3027 program_input : Option < PathBuf > ,
31- #[ clap( long = "layout" ) ]
28+ #[ clap( long = "layout" , help = "Layout name." ) ]
3229 layout : LayoutName ,
33- #[ structopt( long = "output_execution_resources_path" ) ]
30+ #[ structopt(
31+ long = "output_execution_resources_path" ,
32+ help = "Abosolute path to the program's execution resources (output file)."
33+ ) ]
3434 output_execution_resources_path : PathBuf ,
3535}
3636
@@ -57,7 +57,10 @@ fn main() -> ExitCode {
5757#[ allow( clippy:: result_large_err) ]
5858fn run ( args : impl Iterator < Item = String > ) -> Result < ProverInput , Error > {
5959 let _span = span ! ( Level :: INFO , "run" ) . entered ( ) ;
60- let args = Args :: try_parse_from ( args) ?;
60+ let args = match Args :: try_parse_from ( args) {
61+ Ok ( args) => args,
62+ Err ( err) => err. exit ( ) ,
63+ } ;
6164
6265 let program = get_program ( args. program . as_path ( ) ) ?;
6366 let program_input_contents = get_program_input ( & args. program_input ) ?;
0 commit comments