{"id":16588010,"url":"https://github.com/zxilly/go-size-analyzer","last_synced_at":"2026-10-19T09:05:32.269Z","repository":{"id":106876523,"uuid":"609147387","full_name":"Zxilly/go-size-analyzer","owner":"Zxilly","description":"A tool for analyzing the size of compiled Go binaries, offering cross-platform support, detailed breakdowns, and multiple output formats.","archived":false,"fork":false,"pushed_at":"2026-09-27T12:11:56.000Z","size":5601,"stargazers_count":2178,"open_issues_count":4,"forks_count":44,"subscribers_count":6,"default_branch":"master","last_synced_at":"2026-09-28T00:43:45.044Z","etag":null,"topics":["analyzer","binary","dependency","go","golang","react","symbol","terminal-ui","treemap","typescript","visualization"],"latest_commit_sha":null,"homepage":"https://gsa.zxilly.dev/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Zxilly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"claude":null,"gemini":null,"cursor":null,"copilot":null,"dco":null,"cla":null,"disclosure":null}},"created_at":"2023-03-03T13:29:28.000Z","updated_at":"2026-09-27T23:26:20.000Z","dependencies_parsed_at":"2026-09-28T00:53:53.276Z","dependency_job_id":null,"html_url":"https://github.com/Zxilly/go-size-analyzer","commit_stats":{"total_commits":1015,"total_committers":10,"mean_commits":101.5,"dds":"0.22660098522167482","last_synced_commit":"9ed232e00b3496712caa891b24c0b181000b1bc1"},"previous_names":["zxilly/go-size-view"],"tags_count":92,"template":false,"template_full_name":null,"purl":"pkg:github/Zxilly/go-size-analyzer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zxilly%2Fgo-size-analyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zxilly%2Fgo-size-analyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zxilly%2Fgo-size-analyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zxilly%2Fgo-size-analyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Zxilly","download_url":"https://codeload.github.com/Zxilly/go-size-analyzer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zxilly%2Fgo-size-analyzer/sbom","scorecard":{"id":926143,"data":{"date":"2025-08-26T12:51:12Z","repo":{"name":"github.com/Zxilly/go-size-analyzer","commit":"e98008da32b67897378ed6f2a24c3951c06c1019"},"scorecard":{"version":"v5.2.1","commit":"ab2f6e92482462fe66246d9e32f642855a691dc1"},"score":9.4,"checks":[{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#security-policy"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":-1,"reason":"Found no human activity in the last 30 changesets","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#maintained"}},{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: detected update tool: Dependabot: .github/dependabot.yml:1"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#dependency-update-tool"}},{"name":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/build-webui.yml:22","Warn: jobLevel 'checks' permission set to 'write': .github/workflows/built-tests.yml:186","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/built-tests.yml:185","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/built-tests.yml:18","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/built-tests.yml:66","Warn: jobLevel 'checks' permission set to 'write': .github/workflows/built-tests.yml:67","Info: jobLevel 'packages' permission set to 'read': .github/workflows/codeql.yml:24","Warn: jobLevel 'checks' permission set to 'write': .github/workflows/lint.yml:21","Warn: jobLevel 'checks' permission set to 'write': .github/workflows/lint.yml:50","Info: topLevel 'contents' permission set to 'read': .github/workflows/build-webui.yml:15","Info: topLevel permissions set to 'read-all': .github/workflows/built-tests.yml:9","Info: topLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:12","Info: topLevel 'contents' permission set to 'read': .github/workflows/dependency-review.yml:6","Info: topLevel 'contents' permission set to 'read': .github/workflows/lint.yml:12","Info: topLevel permissions set to 'read-all': .github/workflows/release.yml:8","Info: topLevel permissions set to 'read-all': .github/workflows/scorecard.yml:9"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":10,"reason":"all dependencies are pinned","details":["Info:  37 out of  37 GitHub-owned GitHubAction dependencies pinned","Info:  11 out of  11 third-party GitHubAction dependencies pinned","Info:   2 out of   2 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#pinned-dependencies"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU Affero General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#license"}},{"name":"CII-Best-Practices","score":5,"reason":"badge detected: Passing","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#cii-best-practices"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/release.yml:22"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#packaging"}},{"name":"Fuzzing","score":10,"reason":"project is fuzzed","details":["Info: GoBuiltInFuzzer integration found: internal/analyze_test.go:15","Info: GoBuiltInFuzzer integration found: internal/entity/coverage_test.go:62"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":4,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'master'","Info: 'force pushes' disabled on branch 'master'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'master'","Warn: 'stale review dismissal' is disabled on branch 'master'","Warn: required approving review count is 1 on branch 'master'","Info: codeowner review is required on branch 'master'","Warn: 'last push approval' is disabled on branch 'master'","Warn: 'up-to-date branches' is disabled on branch 'master'","Info: status check found to merge onto on branch 'master'","Info: PRs are required in order to make changes on branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":10,"reason":"5 out of the last 5 releases have a total of 5 signed artifacts.","details":["Info: provenance for release artifact: attestations.intoto.jsonl: https://github.com/Zxilly/go-size-analyzer/releases/tag/v1.9.2","Info: provenance for release artifact: attestations.intoto.jsonl: https://github.com/Zxilly/go-size-analyzer/releases/tag/v1.9.1","Info: provenance for release artifact: attestations.intoto.jsonl: https://github.com/Zxilly/go-size-analyzer/releases/tag/v1.9.0","Info: provenance for release artifact: attestations.intoto.jsonl: https://github.com/Zxilly/go-size-analyzer/releases/tag/v1.8.1","Info: provenance for release artifact: attestations.intoto.jsonl: https://github.com/Zxilly/go-size-analyzer/releases/tag/v1.8.0"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: SAST configuration detected: CodeQL","Info: all commits (30) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#sast"}},{"name":"Contributors","score":10,"reason":"project has 8 contributing companies or organizations","details":["Info: found contributions from: Hystime, ZNotify, ZxillyFork, ccoveille-forks, cjbind, golang, jgsu-acm, openPanel"],"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#contributors"}},{"name":"CI-Tests","score":10,"reason":"30 out of 30 merged PRs checked by a CI test -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#ci-tests"}}]},"last_synced_at":"2025-08-26T16:00:32.896Z","repository_id":106876523,"created_at":"2025-08-26T16:00:32.896Z","updated_at":"2025-08-26T16:00:32.896Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344872684,"owners_count":38352877,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-19T02:00:06.414Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analyzer","binary","dependency","go","golang","react","symbol","terminal-ui","treemap","typescript","visualization"],"created_at":"2024-10-11T22:55:37.291Z","updated_at":"2026-10-19T09:05:32.263Z","avatar_url":"https://github.com/Zxilly.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-size-analyzer\n\n[![Tests](https://github.com/Zxilly/go-size-analyzer/actions/workflows/built-tests.yml/badge.svg)](https://github.com/Zxilly/go-size-analyzer/actions/workflows/built-tests.yml)\n[![Codecov](https://img.shields.io/codecov/c/gh/Zxilly/go-size-analyzer)](https://codecov.io/github/Zxilly/go-size-analyzer)\n[![GitHub release](https://img.shields.io/github/v/release/Zxilly/go-size-analyzer)](https://github.com/Zxilly/go-size-analyzer/releases)\n[![go-recipes](https://raw.githubusercontent.com/nikolaydubina/go-recipes/main/badge.svg?raw=true)](https://github.com/nikolaydubina/go-recipes?tab=readme-ov-file#-visualise-dependencies-size-in-compiled-binaries-with-go-size-analyzer)\n[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/Zxilly/go-size-analyzer/badge)](https://scorecard.dev/viewer/?uri=github.com/Zxilly/go-size-analyzer)\n\nEnglish | [简体中文](./README_zh_CN.md)\n\nA simple tool to analyze the size of a Go compiled binary.\n\n- [x] Cross-platform support for analyzing `ELF`, `Mach-O`, `PE` and `WebAssembly (experimental)` binary formats\n- [x] Detailed size breakdown by packages and sections\n- [x] Support multiple output formats: `text`, `json`, `html`, `svg`\n- [x] Interactive exploration via web interface and terminal UI\n- [x] Binary comparison with diff mode (supports `json` and `text` output)\n\n## Installation\n\n[![Packaging status](https://repology.org/badge/vertical-allrepos/go-size-analyzer.svg)](https://repology.org/project/go-size-analyzer/versions)\n\n### [Download the latest binary](https://github.com/Zxilly/go-size-analyzer/releases)\n\n### MacOS / Linux via Homebrew\n\nUsing [Homebrew](https://brew.sh/)\n\n```\nbrew install go-size-analyzer\n```\n\n### Windows\n\nUsing [scoop](https://scoop.sh/)\n\n```\nscoop install go-size-analyzer\n```\n\n### Go Install\n\n```\ngo install github.com/Zxilly/go-size-analyzer/cmd/gsa@latest\n```\n\n\u003e [!NOTE]\n\u003e Building from source requires Go 1.27 or later because the project uses\n\u003e `encoding/json/v2`.\n\n## Usage\n\n### Example\n\n#### Web mode\n\n```bash\ngsa --web golang-compiled-binary\n```\n\nWill start a web server at `http://127.0.0.1:8080`, accessible from your own machine.\nUse `--listen 0.0.0.0:8080` to allow remote access to the report.\n\nOr you can use the WebAssembly version in the browser: [GSA Treemap](https://gsa.zxilly.dev)\n\n\u003e [!NOTE]  \n\u003e Due to the limitation of the browser, the WebAssembly version is much slower than the native version.\n\u003e Normally costs 10x time to analyze the same binary.\n\u003e\n\u003e Only recommended for analysing small applications (less than 30 MB in size)\n\nThe web page will look like this:\n\n![image](https://github.com/Zxilly/go-size-analyzer/assets/31370133/e69583ce-b189-4a0d-b108-c3b7d5c33a82)\n\nYou can click to expand the package to see the details.\n\n#### Terminal UI\n\n```bash\ngsa --tui golang-compiled-binary\n```\n\n[![asciicast](https://asciinema.org/a/1074190.svg)](https://asciinema.org/a/1074190)\n\n#### Text mode\n\n```bash\n$ gsa docker-compose-linux-x86_64\n┌─────────────────────────────────────────────────────────────────────────────────┐\n│ docker-compose-linux-x86_64                                                     │\n├─────────┬──────────────────────────────────────────────────┬────────┬───────────┤\n│ PERCENT │ NAME                                             │ SIZE   │ TYPE      │\n├─────────┼──────────────────────────────────────────────────┼────────┼───────────┤\n│ 17.37%  │ k8s.io/api                                       │ 11 MB  │ vendor    │\n│ 15.52%  │ .rodata                                          │ 9.8 MB │ section   │\n│ 8.92%   │ .gopclntab                                       │ 5.6 MB │ section   │\n│ 7.51%   │ .strtab                                          │ 4.7 MB │ section   │\n│ 5.13%   │ k8s.io/client-go                                 │ 3.2 MB │ vendor    │\n│ 3.36%   │ .symtab                                          │ 2.1 MB │ section   │\n│ 3.29%   │ github.com/moby/buildkit                         │ 2.1 MB │ vendor    │\n│ 2.02%   │ google.golang.org/protobuf                       │ 1.3 MB │ vendor    │\n│ 1.96%   │ github.com/google/gnostic-models                 │ 1.2 MB │ vendor    │\n│ 1.82%   │ k8s.io/apimachinery                              │ 1.1 MB │ vendor    │\n│ 1.73%   │ net                                              │ 1.1 MB │ std       │\n│ 1.72%   │ github.com/aws/aws-sdk-go-v2                     │ 1.1 MB │ vendor    │\n│ 1.57%   │ crypto                                           │ 991 kB │ std       │\n│ 1.53%   │ github.com/docker/compose/v2                     │ 964 kB │ vendor    │\n│ 1.48%   │ github.com/gogo/protobuf                         │ 931 kB │ vendor    │\n│ 1.40%   │ runtime                                          │ 884 kB │ std       │\n│ 1.32%   │ go.opentelemetry.io/otel                         │ 833 kB │ vendor    │\n│ 1.28%   │ .text                                            │ 809 kB │ section   │\n│ 1.18%   │ google.golang.org/grpc                           │ 742 kB │ vendor    │\n\n...[Collapsed]...\n\n│ 0.00%   │ github.com/google/shlex                          │ 0 B    │ vendor    │\n│ 0.00%   │ github.com/pmezard/go-difflib                    │ 0 B    │ vendor    │\n│ 0.00%   │ go.uber.org/mock                                 │ 0 B    │ vendor    │\n│ 0.00%   │ github.com/kballard/go-shellquote                │ 0 B    │ vendor    │\n│ 0.00%   │ tags.cncf.io/container-device-interface          │ 0 B    │ vendor    │\n│ 0.00%   │ github.com/josharian/intern                      │ 0 B    │ vendor    │\n│ 0.00%   │ github.com/shibumi/go-pathspec                   │ 0 B    │ vendor    │\n│ 0.00%   │ dario.cat/mergo                                  │ 0 B    │ vendor    │\n│ 0.00%   │ github.com/mattn/go-colorable                    │ 0 B    │ vendor    │\n│ 0.00%   │ github.com/secure-systems-lab/go-securesystemslib│ 0 B    │ vendor    │\n├─────────┼──────────────────────────────────────────────────┼────────┼───────────┤\n│ 100%    │ KNOWN                                            │ 63 MB  │           │\n│ 100%    │ TOTAL                                            │ 63 MB  │           │\n└─────────┴──────────────────────────────────────────────────┴────────┴───────────┘\n\n```\n\n#### Diff Mode\n\n```bash\n$ gsa bin-linux-1.21-amd64 bin-linux-1.22-amd64\n┌────────────────────────────────────────────────────────────────┐\n│ Diff between bin-linux-1.21-amd64 and bin-linux-1.22-amd64     │\n├─────────┬──────────────────────┬──────────┬──────────┬─────────┤\n│ PERCENT │ NAME                 │ OLD SIZE │ NEW SIZE │ DIFF    │\n├─────────┼──────────────────────┼──────────┼──────────┼─────────┤\n│ +28.69% │ runtime              │ 801 kB   │ 1.0 MB   │ +230 kB │\n│ +100%   │ internal/chacha8rand │          │ 3.1 kB   │ +3.1 kB │\n│ +5.70%  │ \u003cautogenerated\u003e      │ 18 kB    │ 19 kB    │ +1.0 kB │\n│ +8.59%  │ internal/abi         │ 6.1 kB   │ 6.6 kB   │ +525 B  │\n│ +10.52% │ internal/cpu         │ 4.9 kB   │ 5.4 kB   │ +515 B  │\n│ +4.45%  │ internal/reflectlite │ 3.9 kB   │ 4.1 kB   │ +173 B  │\n│ +2.64%  │ internal/bytealg     │ 1.5 kB   │ 1.5 kB   │ +39 B   │\n│ +0.80%  │ strconv              │ 4.0 kB   │ 4.0 kB   │ +32 B   │\n│ +0.19%  │ syscall              │ 13 kB    │ 13 kB    │ +24 B   │\n│ -0.37%  │ embed                │ 8.6 kB   │ 8.6 kB   │ -32 B   │\n│ -0.16%  │ main                 │ 19 kB    │ 19 kB    │ -32 B   │\n│ -0.38%  │ reflect              │ 25 kB    │ 25 kB    │ -96 B   │\n│ -0.26%  │ time                 │ 87 kB    │ 87 kB    │ -224 B  │\n│ -7.95%  │ sync                 │ 9.5 kB   │ 8.7 kB   │ -755 B  │\n├─────────┼──────────────────────┼──────────┼──────────┼─────────┤\n│ +8.47%  │ .rodata              │ 122 kB   │ 132 kB   │ +10 kB  │\n│ +5.04%  │ .gopclntab           │ 144 kB   │ 152 kB   │ +7.3 kB │\n│ +3.61%  │ .debug_info          │ 168 kB   │ 174 kB   │ +6.1 kB │\n│ +3.52%  │ .debug_loc           │ 81 kB    │ 84 kB    │ +2.9 kB │\n│ +3.03%  │ .debug_line          │ 80 kB    │ 82 kB    │ +2.4 kB │\n│ +3.41%  │ .symtab              │ 59 kB    │ 61 kB    │ +2.0 kB │\n│ +4.29%  │ .debug_frame         │ 29 kB    │ 30 kB    │ +1.2 kB │\n│ +1.25%  │ .strtab              │ 61 kB    │ 62 kB    │ +763 B  │\n│ +3.28%  │ .debug_ranges        │ 13 kB    │ 13 kB    │ +415 B  │\n│ +5.13%  │ .data                │ 5.0 kB   │ 5.2 kB   │ +256 B  │\n│ +7.32%  │ .typelink            │ 1.3 kB   │ 1.3 kB   │ +92 B   │\n│ +27.78% │ .go.buildinfo        │ 288 B    │ 368 B    │ +80 B   │\n│ -1.56%  │ .debug_gdb_scripts   │ 64 B     │ 63 B     │ -1 B    │\n│ -0.63%  │ .noptrdata           │ 2.5 kB   │ 2.5 kB   │ -16 B   │\n├─────────┼──────────────────────┼──────────┼──────────┼─────────┤\n│ +3.86%  │ bin-linux-1.21-amd64 │ 1.6 MB   │ 1.6 MB   │ +61 kB  │\n│         │ bin-linux-1.22-amd64 │          │          │         │\n└─────────┴──────────────────────┴──────────┴──────────┴─────────┘\n```\n\n#### Svg Mode\n\n```bash\ngsa cockroach-darwin-amd64 -f svg -o data.svg --hide-sections\n```\n\n![image](./assets/example.svg)\n\n### Full options\n\n```bash\nA tool for determining the extent to which dependencies contribute to the\nbloated size of compiled Go binaries.\n\nArguments:\n  \u003cfile\u003e           Binary file to analyze or result json file for diff\n  [\u003cdiff file\u003e]    New binary file or result json file to compare, optional\n\nFlags:\n  -h, --help             Show context-sensitive help.\n      --verbose          Verbose output\n  -f, --format=\"text\"    Output format, possible values: text,json,html,svg\n      --no-disasm        Skip disassembly pass\n      --no-symbol        Skip symbol pass\n      --no-dwarf         Skip dwarf pass\n  -o, --output=STRING    Write to file\n      --version          Show version\n\nText output options\n  --hide-sections    Hide sections\n  --hide-main        Hide main package\n  --hide-std         Hide standard library\n\nJson output options\n  --indent=INDENT    Indentation for json output\n  --compact          Hide function details, replacement with size\n\nSvg output options\n  --width=1028         Width of the svg treemap\n  --height=640         Height of the svg treemap\n  --margin-box=4       Margin between boxes\n  --padding-box=4      Padding between box border and content\n  --padding-root=32    Padding around root content\n\nWeb interface options\n  --web               use web interface to explore the details\n  --listen=\"127.0.0.1:8080\"    Listen address; use 0.0.0.0:8080 to allow remote access\n  --open              Open browser\n  --update-cache      Update the cache file for the web UI\n\nTerminal interface options\n  --tui    Use terminal interface to explore the details\n\nImports analysis options\n  --imports    Try analyze package imports from source\n\n```\n\n\u003e [!CAUTION]\n\u003e\n\u003e The tool can work with stripped binaries, but it may lead to inaccurate results.\n\n## TODO\n\n- [ ] Add more pattern for disassembling the binary\n- [x] Extract the information from the DWARF section\n- [x] Count the symbol size itself to package\n- [ ] Add other charts like flame graph, pie chart, etc.\n- [ ] Support C++/Rust symbol demangling in cgo\n- [x] Add a TUI mode for exploring details\n- [x] Compile to wasm, create a ui to analyze the binary in the browser\n\n## Contribution\n\nAny contribution is welcome, feel free to open an issue or a pull request.\n\nFor development, see the [Development Guide](./DEVELOPMENT.md) for more details.\n\n## LICENSE\n\nPublished under the [AGPL-3.0](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzxilly%2Fgo-size-analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzxilly%2Fgo-size-analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzxilly%2Fgo-size-analyzer/lists"}