GitXplorerGitXplorer
s

wasmphobia

public
94 stars
5 forks
4 issues

Commits

List of commits on branch main.
Verified
70c72c064fc2411cec810e006674d0a681842799

Merge pull request #11 from surma/issue-10

ssurma committed 4 months ago
Verified
4869470bd65bec7c2f340671d1853beb273c62ee

Prevent panic on invalid CPP demanglings

ssurma committed 4 months ago
Verified
76db304236136aed607e923acf2d43453e1bca58

Introduce logging

ssurma committed 8 months ago
Verified
69025c7527523db679e0b9d6b138dbf94a1ab5b1

Do not fail on bad function name extraction

ssurma committed 8 months ago
Verified
f44b5484e4805e55b795e152089fb24b7080051f

Remove stary macho import

ssurma committed 8 months ago
Verified
ee97e658ab776fdf2e38413d365a99ebed3a5625

Start extracting generic dwarf format

ssurma committed 8 months ago

README

The README file for this repository.

Wasmphobia

Wasmphobia analyzes a WebAssembly file and gives you a breakdown of what contributed to the module’s size. This is only really useful when the WebAssembly binary has DWARF debugging data embedded.

Usage

You can use Wasmphobia interactively on the website or install it locally as a CLI

cargo install --git https://github.com/surma/wasmphobia

How to compile your Wasm

If you care about file size, make sure you compile your code with optimizations (like -O3 and -flto) enabled. In most languages, doing a “release” build should enable these settings for you. However, at the same time, doing a release build often strips debug information from the binary. Here’s a short list of how to do release build with debug symbols.

Rust

You can add --config "profile.release.debug=true" to your cargo invocation. If your release profile strips symbols, you will also need to disable this with --config "profile.release.strip=false". For example, to make a release build targeting WASI, you’d run:

cargo build --config "profile.release.debug=true" --config "profile.release.strip=false" --release --target wasm32-wasi

C++ / Emscripten

$(CPP) -O3 -gfull ...

Shoutouts and Credit


License Apache-2.0