mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-11-10 11:29:59 +03:00
wasm-opt: add page (#2383)
This commit is contained in:
parent
457c9b767b
commit
ffd0b4bee4
19
pages/common/wasm-opt.md
Normal file
19
pages/common/wasm-opt.md
Normal file
@ -0,0 +1,19 @@
|
||||
# wasm-opt
|
||||
|
||||
> Optimize WebAssembly binary files.
|
||||
|
||||
- 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`
|
Loading…
Reference in New Issue
Block a user