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

go-size-analyzer

> 前端框架
Open source

A tool for analyzing the size of compiled Go binaries, offering cross-platform support, detailed breakdowns, and multiple output formats.

2.2K stars0 likes0 views
WebsiteGitHub

About

A tool for analyzing the size of compiled Go binaries, offering cross-platform support, detailed breakdowns, and multiple output formats.

go-size-analyzer

English | 简体中文

A simple tool to analyze the size of a Go compiled binary.

  • Cross-platform support for analyzing ELF, Mach-O, PE and WebAssembly (experimental) binary formats
  • Detailed size breakdown by packages and sections
  • Support multiple output formats: text, json, html, svg
  • Interactive exploration via web interface and terminal UI
  • Binary comparison with diff mode (supports json and text output)

Installation

Download the latest binary

MacOS / Linux via Homebrew

Using Homebrew

brew install go-size-analyzer

Windows

Using scoop

scoop install go-size-analyzer

Go Install

go install github.com/Zxilly/go-size-analyzer/cmd/gsa@latest

[!NOTE] Building from source requires Go 1.27 or later because the project uses encoding/json/v2.

Usage

Example

Web mode

gsa --web golang-compiled-binary

Will start a web server on port 8080, you can view the result in your browser.

Or you can use the WebAssembly version in the browser: GSA Treemap

[!NOTE]
Due to the limitation of the browser, the WebAssembly version is much slower than the native version. Normally costs 10x time to analyze the same binary.

Only recommended for analysing small applications (less than 30 MB in size)

The web page will look like this:

You can click to expand the package to see the details.

Terminal UI

gsa --tui golang-compiled-binary

Text mode

…

Diff Mode

…

Svg Mode

gsa cockroach-darwin-amd64 -f svg -o data.svg --hide-sections

Full options

…

[!CAUTION]

The tool can work with stripped binaries, but it may lead to inaccurate results.

TODO

  • Add more pattern for disassembling the binary
  • Extract the information from the DWARF section
  • Count the symbol size itself to package
  • Add other charts like flame graph, pie chart, etc.
  • Support C++/Rust symbol demangling in cgo
  • Add a TUI mode for exploring details
  • Compile to wasm, create a ui to analyze the binary in the browser

Contribution

Any contribution is welcome, feel free to open an issue or a pull request.

For development, see the Development Guide for more details.

LICENSE

Published under the AGPL-3.0.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Goanalyzerbinarydependencygo

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架