Skip to content

feat(bundler): show bundle sizes in the finished output - #15644

Merged
Legend-Master merged 7 commits into
tauri-apps:devfrom
tenderdeve:feat/15341-show-bundle-sizes
Jul 16, 2026
Merged

feat(bundler): show bundle sizes in the finished output#15644
Legend-Master merged 7 commits into
tauri-apps:devfrom
tenderdeve:feat/15341-show-bundle-sizes

Conversation

@tenderdeve

Copy link
Copy Markdown
Contributor

Closes #15341

After tauri build, the sizes of the generated bundles aren't shown — you have to look them up manually. This appends a human-readable size to each path in the Finished N bundles at: output:

    Finished 2 bundles at:
        .../myapp.app (24.6 MB)
        .../myapp_1.0.0_aarch64.dmg (25.1 MB)

Directory bundles (macOS .app, etc.) are measured recursively; size lookup is best-effort and falls back to no size annotation if a path can't be read, so it never fails the build.

Added a unit test for the size formatting.

@tenderdeve
tenderdeve requested a review from a team as a code owner July 2, 2026 14:17
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Package Changes Through af08878

There are 14 changes which include tauri with minor, tauri-cli with minor, @tauri-apps/cli with minor, tauri-bundler with minor, tauri-utils with minor, tauri-build with minor, tauri-macos-sign with minor, tauri-runtime-wry with minor, tauri-runtime with minor, tauri-codegen with minor, tauri-macros with minor, tauri-plugin with minor, tauri-driver with minor, @tauri-apps/api with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
@tauri-apps/api 2.11.1 2.12.0
tauri-utils 2.9.3 2.10.0
tauri-macos-sign 2.3.4 2.4.0
tauri-bundler 2.9.4 2.10.0
tauri-runtime 2.11.3 2.12.0
tauri-runtime-wry 2.11.4 2.12.0
tauri-codegen 2.6.3 2.7.0
tauri-macros 2.6.3 2.7.0
tauri-plugin 2.6.3 2.7.0
tauri-build 2.6.3 2.7.0
tauri 2.11.5 2.12.0
@tauri-apps/cli 2.11.4 2.12.0
tauri-cli 2.11.4 2.12.0
tauri-driver 2.0.6 2.1.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

Comment thread crates/tauri-bundler/src/bundle.rs Outdated
Comment thread crates/tauri-bundler/src/bundle.rs Outdated
Comment thread .changes/bundler-show-sizes.md
Append a human-readable size to each bundle path in the "Finished N bundles
at:" log, so the sizes are visible right after `tauri build` instead of
having to look them up manually. Directory bundles (e.g. macOS `.app`) are
measured recursively.

Closes tauri-apps#15341
@tenderdeve
tenderdeve force-pushed the feat/15341-show-bundle-sizes branch from 52b85f7 to b87e629 Compare July 9, 2026 07:30
@tenderdeve

Copy link
Copy Markdown
Contributor Author

@Legend-Master both addressed:

  • Swapped the hand-rolled formatter for the human_bytes crate (human_bytes(bytes as f64)), dropped the custom fn + its test. Output looks like 0 B / 512 B / 1 KB / 12.3 MB.
  • Added tauri-cli to the changefile.

On timing: bundle_size just walks the bundle once with walkdir and sums metadata.len() — no reads. Benchmarked an equivalent tree (~700 files) at well under 30ms cold, and a real .app is typically far fewer files, so it's negligible next to the bundling/signing itself. Signed + cargo check/fmt clean.

@socket-security

socket-security Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedcargo/​bytesize@​2.4.210010093100100

View full report

@Legend-Master Legend-Master left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

I have changed human_size to bytesize so we can display 2 digit precisions and made it fail (don't display size) instead of partial/wrong sizes

@Legend-Master
Legend-Master merged commit f76b1d3 into tauri-apps:dev Jul 16, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] Show build sizes in console

2 participants