diff --git a/build/src/main.rs b/build/src/main.rs index a95cefe..3f6adb6 100644 --- a/build/src/main.rs +++ b/build/src/main.rs @@ -71,8 +71,8 @@ fn main() { .arg(Arg::with_name("skip_optimization") .help("Skip symbol optimization step producing final wasm") .long("skip-optimization")) - .arg(Arg::with_name("skip_alloc") - .help("Skip allocator externalizer step producing final wasm") + .arg(Arg::with_name("skip_externalize") + .help("Skip externalizer step producing final wasm") .long("skip-externalize")) .arg(Arg::with_name("runtime_type") .help("Injects RUNTIME_TYPE global export") @@ -93,10 +93,10 @@ fn main() { let mut module = parity_wasm::deserialize_file(&path).unwrap(); - if !matches.is_present("skip_alloc") { + if !matches.is_present("skip_externalize") { module = wasm_utils::externalize( module, - vec!["_free", "_malloc"], + vec!["_free", "_malloc", "_memcpy", "_memset", "_memmove"], ); } diff --git a/ext/src/main.rs b/ext/src/main.rs index 99c7e22..6904d24 100644 --- a/ext/src/main.rs +++ b/ext/src/main.rs @@ -14,8 +14,8 @@ fn main() { } let module = wasm_utils::externalize( - parity_wasm::deserialize_file(&args[1]).expect("Module to deserialize ok"), - vec!["_free", "_malloc"], + 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");