MCPcopy Create free account
hub / github.com/MegEngine/MegFlow / main

Function main

flow-quickstart/src/main.rs:233–261  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

231}
232
233fn main() {
234 let matches = App::new("megflow_quickstart")
235 .version("1.0.0")
236 .author("megengine <megengine@megvii.com>")
237 .about("interactive construct pipeline, for github user just type `megflow_quickstart`.")
238 .arg(
239 Arg::new("GIT")
240 .short('g')
241 .long("git")
242 .value_name("GIT")
243 .about("User-defined git repo, use https://github.com/MegEngine/MegFlow.git by default")
244 .multiple_occurrences(false)
245 .required(false),
246 )
247 .get_matches();
248
249 if let Some(repo) = matches.value_of("GIT") {
250 CONTEXT.lock().unwrap().git_repo = repo.to_owned();
251 } else {
252 CONTEXT.lock().unwrap().git_repo = "https://github.com/MegEngine/MegFlow.git".to_owned();
253 }
254
255 println!("{}", style("Welcome to MegFlow quickstart utility.").bold());
256 println!("{}", style("Please enter values for the following settings (just press Enter to accept a default value, if one is given in brackets).").bold());
257
258 let commands: Vec<Node<'static>> = start();
259 exec(&commands);
260 info!("Project created, read ${{PROJECT_dir}}/README.md to run it.");
261}

Callers

nothing calls this directly

Calls 2

execFunction · 0.85
startFunction · 0.70

Tested by

no test coverage detected