mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-17 23:11:23 +00:00
More aggressively gc module
As soon as we've removed unneeded exports immediately run a gc pass to ensure that we don't bind functions in JS that don't actually end up getting needed.
This commit is contained in:
@ -129,10 +129,7 @@ impl Bindgen {
|
||||
let wasm_bytes = parity_wasm::serialize(module).map_err(|e| {
|
||||
Error(format!("{:?}", e))
|
||||
})?;
|
||||
let bytes = wasm_gc::Config::new()
|
||||
.demangle(false)
|
||||
.gc(&wasm_bytes)?;
|
||||
File::create(&wasm_path)?.write_all(&bytes)?;
|
||||
File::create(&wasm_path)?.write_all(&wasm_bytes)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user