Linux command
wasm-strip 命令
网络
复制后可按需替换文件名、目录或参数。
常用示例
Strip all custom sections
wasm-strip [file.wasm]
Strip and write to different file
wasm-strip -o [output.wasm] [input.wasm]
说明
wasm-strip removes custom sections from WebAssembly binary files, reducing file size. It's part of WABT (WebAssembly Binary Toolkit). Custom sections contain optional metadata like debug information, names, and source maps that aren't required for execution. Stripping these sections creates smaller modules suitable for production deployment. The tool modifies files in place by default. Use -o to preserve the original and write stripped output to a new file.
参数
- -o, --output _file_
- Output to specified file instead of modifying in place.
- --help
- Display help.
- --version
- Display version.
FAQ
What is the wasm-strip command used for?
wasm-strip removes custom sections from WebAssembly binary files, reducing file size. It's part of WABT (WebAssembly Binary Toolkit). Custom sections contain optional metadata like debug information, names, and source maps that aren't required for execution. Stripping these sections creates smaller modules suitable for production deployment. The tool modifies files in place by default. Use -o to preserve the original and write stripped output to a new file.
How do I run a basic wasm-strip example?
Run `wasm-strip [file.wasm]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -o, --output _file_ do in wasm-strip?
Output to specified file instead of modifying in place.