--- id: binsize version: "0.1.4" license: MIT license_treatment: permissive maintenance: dormant --- # binsize — Tool to analyze the size of a binary from .elf file License: permissive · Maintenance: dormant · Downloads: 138.1K/mo ## What it is and what it does Binsize is a command-line tool that parses compiled ELF binaries and optional map files to report which symbols are consuming the most space. It wraps external analysis tools (bloaty and nm) and provides a CLI interface with subcommands for inspecting, comparing, and visualizing symbol sizes in a hierarchical tree view. The tool stores its configuration—including the project root directory—in a platform-specific settings file managed by platformdirs. You interact with it primarily through shell commands like `binsize get`, `binsize compare`, and `binsize tree`, each with their own options. It can output results to the terminal or to a file, and allows you to set the project root directory via environment variable, CLI flag, or a Python function call if you're embedding it in a script. Use it for: - Identify which symbols are bloating a firmware binary and prioritize optimization efforts. - Compare symbol sizes across two binary builds to detect regressions or improvements. - Visualize the hierarchical breakdown of code and data sizes in a compiled ELF file. - Automate binary size analysis in a build pipeline by setting root directory via environment variable. - Debug unexpected size growth in a compiled artifact by drilling into symbol-level details. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Analyzes symbol sizes in compiled binaries by parsing ELF files and optional map files, helping developers identify which symbols consume the most space. Yes, if you regularly analyze compiled binaries and need a lightweight CLI tool for symbol-level size profiling. The low install friction and permissive license make it a low-risk addition. However, be aware that maintenance is dormant and you will need to have `bloaty` and `nm` already available on your system—verify that dependency before committing to it. ## Install pip install binsize uv add binsize poetry add binsize ## Installing binsize Before you install: Low install friction with four lightweight runtime dependencies. Maintenance is dormant—last commit was 2023-07-27, though the package was updated on PyPI as recently as 2025-01-27. No active development signal, but no known issues either. License in practice: MIT license is permissive and imposes no restrictions on use, modification, or distribution in your own projects. Quickstart: pip install binsize binsize get firmware.elf -d binsize compare firmware.elf other_firmware.elf binsize tree firmware.elf Requires external tools `bloaty` and `nm` to be installed on the system; also requires setting a project root directory via BINSIZE_ROOT_DIR environment variable, settings.json, or CLI argument. Verify before relying: - Whether `bloaty` and `nm` are typically pre-installed on target systems or require separate setup steps. - Performance and accuracy of symbol size analysis on large or complex binaries. - Whether the dormant maintenance status indicates the tool is stable or at risk of bit-rot with future toolchain changes. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 138.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags binary size analysis, elf file symbol size, code size profiling, binary bloat detection, firmware size breakdown, symbol size analyzer, elf binary profiler, binary-analysis, embedded-development, size-optimization [View on SkillFed](https://skillfed.io/packages/binsize) · [View on PyPI](https://pypi.org/project/binsize/)