FAQ - Help and questions

What are my options for packaging a Rust desktop app for Windows and macOS?

#packaging#installer#windows#macospublished 0 replies0 views
ReplyWatch
Share
Hacker NewsRedditLinkedInE-mail

Short answer

Windows users expect an installer or a zip, macOS users an app bundle in a disk image or a zip. Tools that automate this include cargo-wix for an MSI, cargo-bundle, and cargo-packager, which lists NSIS, MSI, app and dmg formats. Whichever you pick, sign the result. None of the tools was run here.

Checked with not compiled here. The tool descriptions were read from each project's README on 2026-12-05; none of them was installed or run for this thread.

Frequently asked question, written and answered by the Ruststudio team. Replies are open: corrections are welcome.

#1

Answer#

cargo build --release gives you one executable. To hand it to someone you decide what they download and how it installs. The three realistic forms:

FormWindowsmacOS
A plain archivea .zip with the .exe and its files; the user unzips it anywherea .zip of the .app bundle
An installer or disk imagean .msi or an .exe installer that copies files, adds Start-menu shortcuts and an uninstall entrya .dmg disk image containing the .app for the user to drag to Applications
A storeMicrosoft StoreMac App Store (separate rules and signing)

Tools that automate the middle row, according to their own README files:

  • cargo-wix is a Cargo subcommand that builds a Windows installer (MSI) with the WiX Toolset. cargo wix init creates a wix folder with a main.wxs file you can edit, and cargo wix builds the MSI into target\wix. It runs on Windows and needs the WiX Toolset installed. It can also sign the installer when you have a certificate.
  • cargo-bundle generates "installers or app bundles for GUI executables built with cargo". It reads [package.metadata.bundle] settings from Cargo.toml (name, identifier, icon, resources). Its README lists macOS .app bundles and .dmg output, .deb and AppImage for Linux, and .msi for Windows, which the README marks as experimental.
  • cargo-packager describes itself as an "Executable packager, bundler and updater". Its README lists NSIS (.exe) and WiX (.msi) installers for Windows and .app and .dmg for macOS, and a companion updater crate.
  • Writing it yourself is also fine for a simple app: a script that copies files into a folder and zips it, or, for macOS, creates the bundle (see the bundle thread).

How to choose:

  1. Start with a zip if your users are developers or the app is a single file. It needs no installer code and nothing to uninstall.
  2. Use an MSI or installer on Windows if you need shortcuts, file associations, per-machine installation or enterprise deployment.
  3. Use a .dmg on macOS for the usual drag-to-Applications experience.
  4. Sign everything you ship. Unsigned downloads trigger warnings; see the signing threads.

Common mistakes#

  • Producing the macOS bundle on Windows (file permissions are not kept); build it on a Mac or a macOS CI runner.
  • Installing into Program Files and then writing data there; see the settings thread.
  • Forgetting an uninstall path.

Do I need all of these tools?#

No. Pick one per platform. Check each project's README for the version of Rust or of WiX it needs, because those requirements change.

Sources#

    QuoteReply
    Share
    Hacker NewsRedditLinkedInE-mail

    No replies yet