mirror of
https://github.com/pezkuwichain/wasm-instrument.git
synced 2026-04-22 21:57:55 +00:00
a0b548b37d
* Add rustfmt.toml from substrate repo * Apply rustfmt to code base * Fix formatting * Move rustfmt job to the top
17 lines
466 B
Rust
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");
|
|
}
|