mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-15 07:59:57 +00:00
Move pages under tldr, lint run.sh, update docs
This commit is contained in:
25
tldr/wasm-opt
Normal file
25
tldr/wasm-opt
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# wasm-opt
|
||||
|
||||
> Optimize WebAssembly binary files.
|
||||
> More information: <https://github.com/webassembly/binaryen>.
|
||||
|
||||
- Apply default optimizations and write to a given file:
|
||||
|
||||
`wasm-opt -O {{input.wasm}} -o {{output.wasm}}`
|
||||
|
||||
- Apply all optimizations and write to a given file (takes more time, but generates optimal code):
|
||||
|
||||
`wasm-opt -O4 {{input.wasm}} -o {{output.wasm}}`
|
||||
|
||||
- Optimize a file for size:
|
||||
|
||||
`wasm-opt -Oz {{input.wasm}} -o {{output.wasm}}`
|
||||
|
||||
- Print the textual representation of the binary to console:
|
||||
|
||||
`wasm-opt {{input.wasm}} --print`
|
||||
Reference in New Issue
Block a user