dist
(formerly known as cargo-dist
)

dist distributes your binaries
The TL;DR is that with dist set up, just doing this:
git commit -am "release: 0.2.0"
git tag "v0.2.0"
git push
git push --tags
Will make this Github Release:
Or if you're using oranda, you'll get this website.
Plan, Build, Host, Publish, Announce
Cutting releases of your apps and distributing binaries for them has a lot of steps, and cargo-dist is quickly growing to try to cover them all!
To accomplish this, dist functionality can be broken up into two parts:
- building (planning the release; building binaries and installers)
- distributing (hosting artifacts; publishing packages; announcing releases)
The build functionality can be used on its own if you just want some tarballs and installers, but everything really comes together when you use the distribution functionality too.
Building
As a build tool, dist can do the following:
That's a short list because "we make installers" is doing a lot of heavy lifting. Each installer could be (and sometimes is!) an entire standalone tool with its own documentation and ecosystem.
Distributing
As a distribution tool, dist gets to flex its biggest superpower: it generates its own CI scripts. For instance, enabling GitHub CI with dist init
will generate release.yml, which implements the full pipeline of plan, build, host, publish, announce:
- Plan
- Waits for you to push a git tag for a new version (v1.0.0, my-app-v1.0.0, my-app/1.0.0, ...)
- Selects what apps in your workspace to announce new releases for based on that tag
- Generates a machine-readable manifest with changelogs and build plans
- Build
- Publish:
- Uploads to package managers
- Host + Announce:
- Creates (or edits) a GitHub Release
- Uploads build artifacts to the Release
- Adds relevant release notes from your RELEASES/CHANGELOG
Read The Book!
We've got all the docs you need over at the dist book!
Contributing
Updating Snapshots
dist's tests rely on cargo-insta for snapshot testing various
outputs. This allows us to both catch regressions and also more easily review UI/output changes. If a snapshot
test fails, you will need to use the cargo insta
CLI tool to update them:
cargo install cargo-insta
Once installed, you can review and accept the changes with:
cargo insta review
If you know you like the changes, just use cargo insta accept
to auto-apply all changes.
(If you introduced brand-new snapshot tests you will also have to git add
them!)
NOTE: when it succeeds, cargo-dist-schema's emit
test will actually commit the results back to disk to cargo-dist-schema/cargo-dist-schema.json
as a side-effect. This is a janky hack to make sure we have that stored and up to date at all times (the test also uses an insta snapshot but insta snapshots include an extra gunk header so it's not something we'd want to link end users). The file isn't even used for anything yet, I just want it to Exist because it seems useful and important. In the future we might properly host it and have our outputs link it via a $schema
field.
Cutting Releases
dist is self-hosting, so you just need to push a git-tag with the right format to "do" a release. Of course there's lots of other tedious tasks that come with updating a release, and we use cargo-release to handle all those mechanical details of updating versions/headings/tags. See these sections of the docs for the release workflow we use.
TL;DR:
- Update CHANGELOG.md's "Unreleased" section to include all the release notes you want
- run cargo-release as described in the docs
- ..you're done!
Note that we've wired up dist and cargo-release to understand the "Unreleased" heading so you
should never edit that name, the tools will update it as needed.
If that releases succeeds, we recommend updating the bootstrap version of dist as a follow up:
- install the version of dist you just released on your system
- run
dist init --yes
- commit "chore: update bootstrap dist to ..."
Note that as a consequence of the way we self-host, dist's published artifacts will always be built/generated by a previous version of itself. This can be problematic if you make breaking changes to cargo-dist-schema's format... so don't! Many things in the schema are intentionally optional to enable forward and backward compatibility, so this should hopefully work well!
Version 0.30.0 (2025-09-07)
This release contains several improvements to ZIP archives, the installers and additional build workflow customization options.
ZIP archive improvements
Previous versions of dist produced uncompressed ZIP archives which meant that they were much larger than necessary. ZIP archives are now compressed.
In previous versions, ZIP archives were only suitable for Windows binaries because they didn't preserve executable permissions. ZIP archives now correctly preserve extended Unix permissions.
The npm installer previously used the unzip
commandline utility to unpack ZIP archives on Windows. This isn't available in all installations, so some users would experience errors at install time. We've improved this by switching to the builtin PowerShell Expand-Archive
cmdlet.
Additional installer configuration environment variables
dist's installers are configurable using a variety of different environment variables, but in previous versions only some of these would be branded with your app's name. We now provide branded versions of all of the other environment variables as well. The previous unbranded environment variables will continue to work. The new variables are:
${APP_NAME}_DOWNLOAD_URL
${APP_NAME}_PRINT_QUIET
${APP_NAME}_PRINT_VERBOSE
This feature previously appeared in version 0.28.7 of Astral's fork.
Shell installer refuses to use Snap-installed curl
The shell installers will now refuse to fetch archives using a copy of curl installed via the Snap package manager for Ubuntu. Snap-installed copies of curl have limitations on their ability to write downloaded files to disk which makes them unsuitable for dist's installers. If a Snap-installed curl is detected, the installer will try to fall back to using another download tool; if no other tool is present, a message will be shown to the user and the installation will abort.
This feature previously appeared in version 0.28.5 of Astral's fork.
PowerShell installer now supports proxies
The PowerShell installer now respects the HTTPS_PROXY
and ANY_PROXY
environment variables and uses them to configure a proxy when fetching artifacts. These were already supported by the shell installer.
macOS code signing now supports the --options
flag
When using the experimental macOS codesigning feature, users can now specify a value to be passed to the --options
flag using the CODESIGN_OPTIONS
environment variable.
Linux arm64 GitHub Actions builds now use native arm64 runners by default
In previous versions of dist, we used cross-compilation to build arm64 Linux binaries from an x86_64 host. GitHub now provides free native arm64 runners, so we've switched to using these by default. Users can still use cross-compilation if they prefer by specifying the x86_64 runners using the custom runners feature in the dist config.
GitHub Actions artifact attestations can now be customized
It's now possible to customize exactly which artifacts are attested, and which phase of the build process to perform the attestations in. Currently, customizing which artifacts to attest requires the attestation to happen during the host
phase; this restriction may be lifted in the future.
To specify which artifacts to attest, you can use a list of globs; any artifacts matching any of those globs will receive an attestation. For example:
github-attestations-phase = "host"
github-attestations-filters = ["*.json", "*.sh", "*.ps1", "*.zip", "*.tar.gz"]