Warning, /sdk/rust-qt-binding-generator/src/bin/rust_qt_binding_generator.rs is written in an unsupported language. File is not indexed.
0001 extern crate clap; 0002 extern crate rust_qt_binding_generator; 0003 use clap::{App, Arg}; 0004 use rust_qt_binding_generator::*; 0005 0006 fn main() { 0007 let matches = App::new("rust_qt_binding_generator") 0008 .version(env!("CARGO_PKG_VERSION")) 0009 .about("Generates bindings between Qt and Rust") 0010 .arg( 0011 Arg::with_name("overwrite-implementation") 0012 .long("overwrite-implementation") 0013 .help("Overwrite existing implementation."), 0014 ) 0015 .arg( 0016 Arg::with_name("config") 0017 .multiple(true) 0018 .required(true) 0019 .takes_value(true) 0020 .help("Configuration file(s)"), 0021 ) 0022 .get_matches(); 0023 0024 let overwrite_implementation = matches.is_present("overwrite-implementation"); 0025 for config in matches.values_of("config").unwrap() { 0026 if let Err(e) = generate_bindings_from_config_file(config, overwrite_implementation) { 0027 eprintln!("{}", e); 0028 ::std::process::exit(1); 0029 } 0030 } 0031 }