MCPcopy Index your code
hub / github.com/faern/rustscript / create_app

Function create_app

src/main.rs:84–109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82}
83
84fn create_app() -> App<'static, 'static> {
85 let verbose_arg = Arg::with_name("verbose")
86 .short("v")
87 .multiple(true)
88 .help("Print the output of the script compilation");
89 let recompile_arg = Arg::with_name("recompile")
90 .short("r")
91 .long("recompile")
92 .help("Force the script to be compiled, even if it is already in the cache");
93 let no_run_arg = Arg::with_name("no_run")
94 .short("n")
95 .long("no-run")
96 .help("Don't run the script, only compile it. Add --recompile to compile even if it is \
97 in the cache.");
98 let script_path_arg = Arg::with_name("script_path").index(1).required(true);
99 let script_args_arg = Arg::with_name("script_args").index(2).multiple(true);
100 App::new(env!("CARGO_PKG_NAME"))
101 .author(crate_authors!())
102 .version(crate_version!())
103 .settings(&[AppSettings::TrailingVarArg])
104 .arg(verbose_arg)
105 .arg(recompile_arg)
106 .arg(no_run_arg)
107 .arg(script_path_arg)
108 .arg(script_args_arg)
109}

Callers 1

runFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected