|
@ -1,10 +1,19 @@ |
|
|
#![deny(trivial_numeric_casts)] |
|
|
#![deny(trivial_numeric_casts)] |
|
|
#![warn(unused_import_braces, unstable_features, unused_extern_crates)] |
|
|
#![warn(
|
|
|
|
|
|
unused_import_braces, |
|
|
|
|
|
unstable_features, |
|
|
|
|
|
unused_extern_crates |
|
|
|
|
|
)] |
|
|
#![cfg_attr(
|
|
|
#![cfg_attr(
|
|
|
feature = "cargo-clippy", |
|
|
feature = "cargo-clippy", |
|
|
warn( |
|
|
warn( |
|
|
float_arithmetic, mut_mut, nonminimal_bool, option_map_unwrap_or, option_map_unwrap_or_else, |
|
|
float_arithmetic, |
|
|
unicode_not_nfc, use_self |
|
|
mut_mut, |
|
|
|
|
|
nonminimal_bool, |
|
|
|
|
|
option_map_unwrap_or, |
|
|
|
|
|
option_map_unwrap_or_else, |
|
|
|
|
|
unicode_not_nfc, |
|
|
|
|
|
use_self |
|
|
) |
|
|
) |
|
|
)] |
|
|
)] |
|
|
|
|
|
|
|
@ -153,31 +162,26 @@ fn main() { |
|
|
.arg(add_time_flag()) |
|
|
.arg(add_time_flag()) |
|
|
.arg(add_input_file_arg()) |
|
|
.arg(add_input_file_arg()) |
|
|
.arg(add_debug_flag()), |
|
|
.arg(add_debug_flag()), |
|
|
) |
|
|
).subcommand( |
|
|
.subcommand( |
|
|
|
|
|
SubCommand::with_name("cat") |
|
|
SubCommand::with_name("cat") |
|
|
.about("Outputs .clif file") |
|
|
.about("Outputs .clif file") |
|
|
.arg(add_input_file_arg()) |
|
|
.arg(add_input_file_arg()) |
|
|
.arg(add_debug_flag()), |
|
|
.arg(add_debug_flag()), |
|
|
) |
|
|
).subcommand( |
|
|
.subcommand( |
|
|
|
|
|
SubCommand::with_name("print-cfg") |
|
|
SubCommand::with_name("print-cfg") |
|
|
.about("Prints out cfg in dot format") |
|
|
.about("Prints out cfg in dot format") |
|
|
.arg(add_input_file_arg()) |
|
|
.arg(add_input_file_arg()) |
|
|
.arg(add_debug_flag()), |
|
|
.arg(add_debug_flag()), |
|
|
) |
|
|
).subcommand( |
|
|
.subcommand( |
|
|
|
|
|
add_wasm_or_compile("compile") |
|
|
add_wasm_or_compile("compile") |
|
|
.arg( |
|
|
.arg( |
|
|
Arg::with_name("just-decode") |
|
|
Arg::with_name("just-decode") |
|
|
.short("t") |
|
|
.short("t") |
|
|
.help("Just decode WebAssembly to Cranelift IR"), |
|
|
.help("Just decode WebAssembly to Cranelift IR"), |
|
|
) |
|
|
).arg(Arg::with_name("check-translation").short("c").help( |
|
|
.arg(Arg::with_name("check-translation").short("c").help( |
|
|
|
|
|
"Just checks the correctness of Cranelift IR translated from WebAssembly", |
|
|
"Just checks the correctness of Cranelift IR translated from WebAssembly", |
|
|
)), |
|
|
)), |
|
|
) |
|
|
).subcommand(add_wasm_or_compile("wasm")) |
|
|
.subcommand(add_wasm_or_compile("wasm")) |
|
|
|
|
|
.subcommand( |
|
|
.subcommand( |
|
|
SubCommand::with_name("pass") |
|
|
SubCommand::with_name("pass") |
|
|
.about("Run specified pass(s) on an input file.") |
|
|
.about("Run specified pass(s) on an input file.") |
|
|