add filter-exports command to automatically remove unused exports

this removes the need for a manual step in the rust example
This commit is contained in:
2022-01-01 19:02:58 +01:00
parent 6a75988489
commit 26206a312a
8 changed files with 184 additions and 9 deletions

View File

@@ -1,2 +1,3 @@
rustc --target=wasm32-unknown-unknown --crate-type cdylib -C opt-level="z" -C "link-args=--import-memory --initial-memory=262144 -zstack-size=65536" -o tunnel.wasm tunnel.rs && \
uw8 filter-exports tunnel.wasm tunnel.wasm && \
wasm-opt -Oz -o tunnel.wasm tunnel.wasm