Skip to content

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

Open
tenderdeve wants to merge 1 commit into
tauri-apps:devfrom
tenderdeve:feat/15341-show-bundle-sizes
Open

feat(bundler): show bundle sizes in the finished output#15644
tenderdeve wants to merge 1 commit into
tauri-apps:devfrom
tenderdeve:feat/15341-show-bundle-sizes

Conversation

@tenderdeve

Copy link
Copy Markdown

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.

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 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 52b85f7

There are 12 changes which include tauri-bundler with minor, tauri with minor, tauri-build with minor, tauri-utils with minor, tauri-runtime-wry with minor, tauri-runtime with minor, tauri-codegen with minor, tauri-macros with minor, tauri-plugin with minor, tauri-cli with minor, tauri-macos-sign with minor, tauri-driver 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-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.11.5
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

}

/// Formats a byte count into a human-readable string, e.g. `12.3 MB`.
fn human_readable_size(bytes: u64) -> String {

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.

let's use something like https://crates.io/crates/human_bytes instead, since we might share it in tauri-cli for the future uses

/// Total size in bytes of a bundle path, recursing into directories (e.g. macOS `.app`).
///
/// Returns `None` if the path can't be read.
fn bundle_size(path: &std::path::Path) -> Option<u64> {

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.

Could you give this a quick test see how much time it usually takes to run?

@@ -0,0 +1,5 @@
---
"tauri-bundler": "minor:feat"

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.

let's also include tauri-cli so the changelog appears there as well

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