tabify all

This commit is contained in:
NikVolf
2017-05-19 16:54:53 +03:00
parent 360c308e09
commit f2d99ce888
11 changed files with 904 additions and 904 deletions
+12 -12
View File
@@ -5,20 +5,20 @@ use std::env;
fn main() {
wasm_utils::init_log();
wasm_utils::init_log();
let args = env::args().collect::<Vec<_>>();
if args.len() < 3 {
println!("Usage: {} input_file.wasm output_file.wasm", args[0]);
return;
}
let args = env::args().collect::<Vec<_>>();
if args.len() < 3 {
println!("Usage: {} input_file.wasm output_file.wasm", args[0]);
return;
}
let mut module = parity_wasm::deserialize_file(&args[1]).unwrap();
let mut module = parity_wasm::deserialize_file(&args[1]).unwrap();
// Invoke optimizer
// Contract is supposed to have only these functions as public api
// All other symbols not usable by this list is optimized away
wasm_utils::optimize(&mut module, vec!["_call"]).expect("Optimizer to finish without errors");
// Invoke optimizer
// Contract is supposed to have only these functions as public api
// All other symbols not usable by this list is optimized away
wasm_utils::optimize(&mut module, vec!["_call"]).expect("Optimizer to finish without errors");
parity_wasm::serialize_to_file(&args[2], module).unwrap();
parity_wasm::serialize_to_file(&args[2], module).unwrap();
}