mirror of
https://github.com/pezkuwichain/wasm-instrument.git
synced 2026-06-09 20:11:06 +00:00
Add rustfmt.toml from substrate repo (#161)
* Add rustfmt.toml from substrate repo * Apply rustfmt to code base * Fix formatting * Move rustfmt job to the top
This commit is contained in:
committed by
GitHub
parent
77ad07e347
commit
a0b548b37d
+18
-19
@@ -1,5 +1,5 @@
|
||||
use pwasm_utils::{self as utils, logger};
|
||||
use clap::{App, Arg};
|
||||
use pwasm_utils::{self as utils, logger};
|
||||
|
||||
fn main() {
|
||||
logger::init();
|
||||
@@ -7,27 +7,26 @@ fn main() {
|
||||
let target_runtime = utils::TargetRuntime::pwasm();
|
||||
|
||||
let matches = App::new("wasm-prune")
|
||||
.arg(Arg::with_name("input")
|
||||
.index(1)
|
||||
.required(true)
|
||||
.help("Input WASM file"))
|
||||
.arg(Arg::with_name("output")
|
||||
.index(2)
|
||||
.required(true)
|
||||
.help("Output WASM file"))
|
||||
.arg(Arg::with_name("exports")
|
||||
.long("exports")
|
||||
.short("e")
|
||||
.takes_value(true)
|
||||
.value_name("functions")
|
||||
.help(&format!("Comma-separated list of exported functions to keep. Default: '{}'", target_runtime.symbols().call)))
|
||||
.arg(Arg::with_name("input").index(1).required(true).help("Input WASM file"))
|
||||
.arg(Arg::with_name("output").index(2).required(true).help("Output WASM file"))
|
||||
.arg(
|
||||
Arg::with_name("exports")
|
||||
.long("exports")
|
||||
.short("e")
|
||||
.takes_value(true)
|
||||
.value_name("functions")
|
||||
.help(&format!(
|
||||
"Comma-separated list of exported functions to keep. Default: '{}'",
|
||||
target_runtime.symbols().call
|
||||
)),
|
||||
)
|
||||
.get_matches();
|
||||
|
||||
let exports = matches
|
||||
.value_of("exports")
|
||||
.unwrap_or(target_runtime.symbols().call)
|
||||
.split(',')
|
||||
.collect();
|
||||
.value_of("exports")
|
||||
.unwrap_or(target_runtime.symbols().call)
|
||||
.split(',')
|
||||
.collect();
|
||||
|
||||
let input = matches.value_of("input").expect("is required; qed");
|
||||
let output = matches.value_of("output").expect("is required; qed");
|
||||
|
||||
Reference in New Issue
Block a user