# How to Distribute a Rust App with Cargo, Homebrew, MSI, and WinGet

DevFeed: [How to Distribute a Rust App with Cargo, Homebrew, MSI, and WinGet](<https://devfeed.tech/articles/how-to-distribute-a-rust-app-with-cargo-homebrew-msi-and-winget-118967.md>)

Original publisher: [Read original article](<https://code.dblock.org/2026/11/04/distributing-a-rust-app-everywhere.html>)

Author: Daniel Doubrovkine (dblock@dblock.org)

Published: 2026-11-04T00:00:00Z

Content type: tutorial

Language: en

Sources: [Daniel Doubrovkine](<https://devfeed.tech/sources/daniel-doubrovkine.md>)

Topics: [CI/CD](<https://devfeed.tech/topics/cicd.md>), [Homebrew](<https://devfeed.tech/topics/homebrew.md>), [GitHub](<https://devfeed.tech/topics/github.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>), [Linux](<https://devfeed.tech/topics/linux.md>)

Tags: [ai-coding-agents](<https://devfeed.tech/tags/ai-coding-agents.md>), [application](<https://devfeed.tech/tags/application.md>), [archive](<https://devfeed.tech/tags/archive.md>), [arithmetic](<https://devfeed.tech/tags/arithmetic.md>), [calculator](<https://devfeed.tech/tags/calculator.md>), [changelog](<https://devfeed.tech/tags/changelog.md>), [ci](<https://devfeed.tech/tags/ci.md>), [cli](<https://devfeed.tech/tags/cli.md>), [clippy](<https://devfeed.tech/tags/clippy.md>), [command-line](<https://devfeed.tech/tags/command-line.md>), [cross-platform](<https://devfeed.tech/tags/cross-platform.md>), [delphi](<https://devfeed.tech/tags/delphi.md>), [distribution](<https://devfeed.tech/tags/distribution.md>), [dry-run](<https://devfeed.tech/tags/dry-run.md>), [fmt](<https://devfeed.tech/tags/fmt.md>), [git](<https://devfeed.tech/tags/git.md>), [homebrew](<https://devfeed.tech/tags/homebrew.md>), [msi](<https://devfeed.tech/tags/msi.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [rust](<https://devfeed.tech/tags/rust.md>), [winget](<https://devfeed.tech/tags/winget.md>)

## AI overview

A Git tag is the source of truth for excalc releases: CI publishes the crate, builds portable archives and a Windows MSI from that tag, then attaches them to the GitHub release. The guide covers Cargo metadata and validation, crates.io Trusted Publishing with short-lived OIDC credentials, and a plain build matrix as a lighter alternative to cargo-dist. macOS archives remain unsigned and unnotarized, so downloaded binaries are blocked by Gatekeeper; the article gives a temporary quarantine-removal step and recommends signing and notarization for production. The MSI uses cargo-wix with a stable UpgradeCode. Homebrew builds the tagged source and needs its formula URL and checksum updated and validated after artifacts succeed; Homebrew 6 also requires tap or formula trust. WinGet uses the released x64 MSI and an asynchronously reviewed Microsoft manifest PR. Later updates can be submitted automatically with WinGet Releaser, which requires a cross-repository token and an already accepted package version. A release checklist coordinates version changes, CI, tagging, artifact verification, and follow-up on the WinGet PR.

## Source excerpt

I recently ported my 1996 Pascal/Delphi calculator to Rust. The result is excalc, a cross-platform command-line application and MCP server. Rust makes it easy to compile an application on every platform. Distributing it via crates.io, MSI, Homebrew or WinGet needed more work. Paste this cookbook into your favorite AI prompt to get it done. We trigger a distribution from GitHub Releases: a Git tag identifies the new version, CI publishes the crate from that tag, builds portable archives and an MSI from that tag, and attaches everything to the release. Homebrew downloads the tagged source archive. WinGet points at the released MSI. Prepare the Rust Package Start with complete package metadata in Cargo.toml. [package] name = "excalc" version = "0.3.0" edition = "2021" authors = ["Daniel Doubrovkine and contributors"] description = "An expression calculator CLI tool and MCP server built for AI coding agents to outsource arithmetic." license = "MIT" repository = "https://github.com/dblock/excalc-rs" default-run = "excalc" Add every binary you want Cargo and the installer to build. [[bin]] name = "excalc" path = "src/main.rs" [[bin]] name = "calc" path = "src/main.rs" [[bin]] name = "excalc-mcp" path = "src/bin/excalc-mcp.rs" required-features = ["mcp"] Note the double brackets in [[bin]]. TOML calls this an array of tables, where each [[bin]] block adds another executable with its own name and source path. In excalc, mcp is a default feature. CLI-only users can opt out with cargo install excalc --no-default-features; release builds retain the default features. Add a LICENSE, README.md, and CHANGELOG.md, then verify what will be uploaded. cargo fmt --all -- --check cargo clippy --all-targets --all-features -- -D warnings cargo test --all-features cargo publish --dry-run The dry run packages the crate and compiles the packaged copy. Publish to crates.io For excalc, I published the first version manually, then configured a trusted CI publisher for subsequent releases. Creat