LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

gsa

Analyze size breakdown of Go compiled binaries

TLDR

Text report for a binary
$ gsa [path/to/binary]
copy
Interactive terminal UI
$ gsa --tui [path/to/binary]
copy
Web UI on local server
$ gsa --web [path/to/binary]
copy
JSON output
$ gsa -f json [path/to/binary]
copy
Compare two binaries
$ gsa --diff [old-binary] [new-binary]
copy

SYNOPSIS

gsa [*options*] *binary*...

DESCRIPTION

gsa (go-size-analyzer) analyses the size of Go-compiled binaries. It supports ELF, Mach-O, PE, and experimental WebAssembly, with breakdowns by packages and sections. Output formats include text, JSON, HTML, and SVG. Interactive exploration is available via --tui and --web.Install from GitHub releases, Homebrew (brew install go-size-analyzer), Scoop, or:

$ GOEXPERIMENT=jsonv2 go install github.com/Zxilly/go-size-analyzer/cmd/gsa@latest
copy
Building from source needs a recent Go toolchain with the jsonv2 experiment enabled (as documented upstream).

PARAMETERS

*binary*

Path to a compiled Go binary (or multiple for supported modes).
--tui
Open the terminal UI explorer.
--web
Start a web UI (default port documented in --help, commonly 8080).
-f, --format text|json|html|svg
Output format for non-interactive runs.
--diff
Compare binaries (json/text).
See gsa --help for verbose flags, hide options, and server bind addresses.

INSTALL

sudo apt install gwenhywfar-tools
copy
sudo dnf install gwenhywfar
copy
sudo pacman -S gwenhywfar
copy
sudo apk add gwenhywfar
copy
sudo zypper install gwenhywfar-tools
copy
brew install gwenhywfar
copy
nix profile install nixpkgs#gwenhywfar
copy

CAVEATS

Best results on Go binaries with symbol/package information; stripped binaries yield coarser reports. WebAssembly analysis is experimental. Browser/WASM analysis is much slower than native. Source builds need specific Go version features.

SEE ALSO

go(1), nm(1), size(1), binsider(1)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid