Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
B

bloaty-metafile

> 编程语言
Open source

bloaty-metafile is a cli tool to convert csv files generated by bloaty to esbuild's metafile format, so that you can use online tools to an…

185 stars0 likes1 views
WebsiteGitHub

About

bloaty-metafile is a cli tool to convert csv files generated by bloaty to esbuild's metafile format, so that you can use online tools to an…

bloaty-metafile is a cli tool to convert csv files generated by bloaty to esbuild's metafile format, so that you can use online tools to analyze the size of the program

bash
cargo binstall bloaty-metafile

# or install from github
cargo install --git https://github.com/ahaoboy/bloaty-metafile

# https://github.com/google/bloaty/blob/main/doc/using.md
bloaty ./bloaty -d sections,symbols -n 0  --csv | bloaty-metafile > meta.json
bloaty-metafile meta.csv > meta.json

bloaty ./target/bloaty/bloaty-metafile -d sections,symbols -n 0  --csv | bloaty-metafile --name=bloaty-metafile --lock=Cargo.lock  > meta.json

profile

In order for bloaty to parse symbol information properly, it is recommended to keep debug information and turn off lto and strip

toml
[profile.bloaty]
debug = true
lto = false
strip = false
inherits = 'release'
bash
cargo build --profile bloaty

bloaty ./target/bloaty/bloaty-metafile -d sections,symbols -n 0 --csv > meta.csv

bloaty-metafile meta.csv > meta.json
bloaty-metafile meta.csv --sections > meta.json

csv format

Please make sure bloaty generates a csv file in the following format. If the program is too large and the generated json exceeds 100mb, use the -n parameter to reduce the amount of data.

sections,symbols,vmsize,filesize
.text,ossl_aes_gcm_encrypt_avx512,337642,337642
.text,ossl_aes_gcm_decrypt_avx512,337638,337638

Esbuild Bundle Size Analyzer

https://esbuild.github.io/analyze/

Generate image from json

You can use metafile-image implemented by nodejs to generate json files into image format, without manually uploading and screenshots

Usage

lock file

Because bloaty's output does not include crate dependency information, the sizes of crates are all displayed separately.

If a lock file can be provided, by default, the Cargo.lock file in the current directory is used. the dependency size can be correctly displayed by analyzing the crate dependencies.

deep

For large applications, the dependency tree will be very deep, which will cause the generated JSON to be very large and contain too much useless information. You can use the --deep option to limit the maximum depth of the dependency.

The default value of deep is 0(no limit)

deep: 4, json: 6.7M

deep: 8, json: 12M

deep: 0, json: 80M

sections

By default, section-level entries are excluded from the output as they occupy too much space and provide little useful information for crate-level analysis.

Use --sections to include them.

bash
bloaty-metafile meta.csv > meta.json              # sections excluded (default)
bloaty-metafile meta.csv --sections > meta.json   # sections included

Conversion rules

The symbol .text,easy_install::install::artifact will be converted to easy_install/.text/install/artifact.

Additionally, if symbol ends with .map, to prevent the esbuild analyzer from treating it as a JavaScript sourcemap file, the suffix will be converted to .map_.

If symbol is empty, it will be added to the UNKNOWN section.

windows

bloaty: PE doesn't support this data source

bloaty-metafile just converts the csv output by bloaty to json. You can generate csv files on other platforms with bloaty, and then convert them on windows.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rust

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言