bloat-show 0.1.0

Render `cargo bloat` JSON output as a self-contained, interactive HTML treemap
Documentation
  • Coverage
  • 79.17%
    19 out of 24 items documented1 out of 10 items with examples
  • Size
  • Source code size: 54.0 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 244.3 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 6s Average build duration of successful builds.
  • all releases: 6s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Robbepop/cargo-bloat-show
    2 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Robbepop

bloat-show

Render cargo bloat JSON as a self-contained, interactive HTML treemap. The page embeds its data and has no external assets.

use bloat_show::{BloatJson, RenderOptions, render};

let json = std::fs::read_to_string("bloat.json")?;
let data = BloatJson::from_json_str(&json)?;
std::fs::write("bloat.html", render(&data, &RenderOptions::default()))?;
# Ok::<_, Box<dyn std::error::Error>>(())

Library only — depends on serde and serde_json, nothing else.

For the command line tools see bloat-show-cli and cargo-bloat-show.

Credits

Treemap frontend derived from cargo-bloat-treemap by @ttraenkler; its license travels with the vendored file in assets/LICENSE-treemap.

MIT licensed. See LICENSE.