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

@@ -27,6 +27,11 @@ fn main() -> Result<()> {
let dest: PathBuf = args.free_from_str()?;
uw8_tool::unpack_file(&source, &dest)?;
}
"filter-exports" => {
let source: PathBuf = args.free_from_str()?;
let dest: PathBuf = args.free_from_str()?;
uw8_tool::filter_exports(&source, &dest)?;
}
_ => {
eprintln!("Unknown subcommand '{}'", cmd);
print_help();
@@ -44,6 +49,7 @@ fn print_help() {
"Usage:
uw8-tool make-base <version>
uw8-tool pack <wasm file> <uw8 file>
uw8-tool unpack <uw8 file> <wasm file>"
uw8-tool unpack <uw8 file> <wasm file>
uw8-tool filter-exports <wasm file> <wasm file>"
);
}