Files
wasm-instrument/cli/ext/main.rs
T
Alexander Theißen a0b548b37d 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
2021-07-27 14:46:28 +02:00

17 lines
466 B
Rust

fn main() {
pwasm_utils::logger::init();
let args = std::env::args().collect::<Vec<_>>();
if args.len() != 3 {
println!("Usage: {} input_file.wasm output_file.wasm", args[0]);
return
}
let module = pwasm_utils::externalize(
parity_wasm::deserialize_file(&args[1]).expect("Module to deserialize ok"),
vec!["_free", "_malloc", "_memcpy", "_memset", "_memmove"],
);
parity_wasm::serialize_to_file(&args[2], module).expect("Module to serialize ok");
}