Lesson 5 of 9 · 23m
Bundles, Resources, Sidecars, and Honest Binary Size
Configure bundle metadata, resources, external binaries, frontend compression, and artifact layout while understanding where size really goes.
Bundle size complaints are usually symptoms of not knowing what the artifact contains. I have watched teams blame Rust for a large application while shipping three copies of a font family, a hundred megabytes of uncompressed screenshots, and a Python sidecar nobody remembered adding. Tauri gives you small artifacts only if you treat packaging as engineering rather than as whatever falls out of cargo tauri build.
Know the artifact layout
Run a build and inspect the output before designing release automation:
cargo tauri build
find src-tauri/target/release/bundle -maxdepth 3 -type f -printYou will see platform-specific directories such as deb, rpm, AppImage, macos, nsis, or msi depending on the OS and configuration. The executable itself is only one part. Installer compression, resources, updater signatures, sidecars, and metadata all affect the final user experience.
Bundle metadata is user-facing product data
tauri.conf.json controls identity, version, icons, and bundle behavior:
{
"productName": "Acme Console", "version": "1.4.0", "identifier": "com.acme.console",
"build": {"frontendDist": "../dist", "devUrl": "http://localhost:5173"},
"bundle": {"active": true, "targets": "all", "icon": ["icons/32x32.png", "icons/icon.icns", "icons/icon.ico"]}
}The identifier is not decorative. It affects installation identity, app directories, updater compatibility, and operating-system treatment. Changing it casually can orphan user data or produce a second installed application.
Resources are copied, not optimized
The resources field ships files with the application. That is appropriate for licenses, templates, small seed databases, or platform integration files. It is not a place to dump unprocessed assets that the frontend never uses. Audit with a size-sorted listing:
du -ah src-tauri/target/release | sort -h | tail -30On the frontend side, inspect npm run build output and dist/assets sizes. Compression helps transport, but installers already compress; large JavaScript remains parse and memory cost after installation. Remove dependencies before reaching for exotic compression tricks.
Sidecar binaries are part of your product
Tauri can bundle external binaries as sidecars. This is powerful for tools such as ffmpeg, database migration helpers, or vendor agents — and dangerous when treated casually. A sidecar is third-party executable code with supply-chain, licensing, update, and platform-matrix implications.
{"bundle":{"externalBin":["binaries/worker"]}}You need one answer for every operating system and architecture you support. If the answer is "we only built the Linux one," the product is not cross-platform yet.
Field notes
- Bundle size differences between operating systems are normal; installer formats and runtimes are not symmetric.
- Do not ship development fixtures, test databases, screenshots, or mapping data unless they are product resources.
- Version bumping belongs in release automation. Hand-edited versions drift across Cargo, package metadata, and updater manifests.
- Measure startup time and memory alongside artifact size. A small binary that immediately downloads a huge runtime has moved the cost, not removed it.
Was this lesson helpful?