C.W.K.
Stream
Lesson 02 of 07 · published

Bundle Targets per OS

~12 min · tauri, bundle, targets, distribution

Level 0Web Tourist
0 XP0/56 lessons0/13 achievements
0/100 XP to next level100 XP to go0% complete
"There's no universal installer. Each OS expects its own package — and generally wants to be built on its own kind of machine."

The Native Formats

Each desktop OS has installer formats users expect. macOS: a .app bundle, usually distributed inside a .dmg. Windows: an .msi (built via WiX) or an .exe installer (built via NSIS). Linux: .deb (Debian/Ubuntu), .rpm (Fedora/RHEL), and .AppImage (distro-agnostic, runs anywhere). You choose which to produce in bundle.targets"all" for everything available on the current OS, or a specific list.

Build on the OS You Target

The important constraint: you generally build each platform's bundles on that platform. macOS installers need a Mac (for signing and the macOS toolchain), Windows installers need Windows, Linux needs Linux. Cross-compiling exists in limited forms but is fiddly; the reliable path is a build machine per OS — which is exactly why CI with a matrix of macOS/Windows/Linux runners is the standard way to produce all your installers from one push (the next lessons cover that).

Choose Targets by Audience

You don't have to ship every format. If your users are all on macOS, build dmg and skip the rest. Shipping to mixed Linux distros? AppImage is the broadest single choice, with .deb/.rpm for users who prefer their package manager. Match the targets to where your users actually are rather than reflexively building everything — fewer targets means simpler signing, smaller CI, and less to test.

Code

Configuring bundle targets·json
// tauri.conf.json — choose what the bundler produces.
{
  "bundle": {
    "active": true,
    "targets": "all"          // everything available on the current OS
    // or be specific:
    // "targets": ["dmg"]                 (macOS only)
    // "targets": ["nsis", "msi"]        (Windows)
    // "targets": ["deb", "appimage"]    (Linux)
  }
}

External links

Exercise

Decide your app's target matrix: list which OSes you'd ship to and which bundle format(s) per OS, with one sentence of justification each. Then note why you'd need a build machine (or CI runner) for each OS rather than producing them all from your one laptop. You're planning the distribution surface before the signing and CI lessons make it concrete.
Hint
macOS → dmg; Windows → nsis (or msi); Linux → appimage (broadest) ± deb/rpm. Each needs its own OS to build because the installer tooling and signing are native. That's why CI matrices exist.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.