talira

dist (cargo-dist)

Shippable application packaging: build, sign and publish release binaries and installers from a git tag

open sourceMIT OR Apache-2.0self-hostablefree

dist (formerly cargo-dist) turns a git tag into a finished release: dist init writes a GitHub Actions workflow that builds binaries for each platform, packages them as tarballs and zips, generates installers and publishes a GitHub Release with notes from your changelog. The installers it makes are a curl | sh shell script, a PowerShell script, an npm package, a Homebrew formula pushed to your own tap, and a Windows MSI, plus an optional standalone updater. It can code-sign Windows executables and installers through SSL.com's eSigner or Azure Artifact Signing, and turn on GitHub artifact attestations. Rust workspaces are the main case, and a generic dist.toml lets other languages use the same pipeline with their own build command.

Ways to install

Problems it solves

  • cut a release of my Rust CLI with prebuilt binaries for macOS, Linux and Windows just by pushing a git tag
  • write the GitHub Actions release workflow for a cross-platform command-line tool without maintaining it by hand
  • give users a one-line curl | sh installer and a PowerShell installer for my open source binary
  • publish a Homebrew formula for my CLI to my own tap automatically on every release
  • ship my Rust tool on npm so JavaScript developers can run it with npx
  • build a Windows MSI installer for a command-line program as part of CI
  • code-sign the Windows exe and installer in CI so SmartScreen doesn't block downloads
  • add release notes from CHANGELOG.md to the GitHub Release automatically
  • let people who installed my CLI with a shell script upgrade it with one command
  • attach checksums and build provenance attestations to every release artifact
  • release several binaries from one Cargo workspace, each with its own version tags
  • package a Go or C program's binaries and installers the same way Rust projects do

Features

  • dist init generates a GitHub Actions release workflow (plan, build, host, publish, announce)
  • builds binaries per target platform and packages tarballs and zips with checksums
  • shell (curl | sh) and PowerShell installers
  • npm package installer that fetches the right binary
  • Homebrew formula published to your own tap
  • Windows MSI installer
  • optional standalone updater (axoupdater) installed beside the program
  • Windows code signing via SSL.com eSigner or Azure Artifact Signing
  • GitHub artifact attestations
  • release notes from CHANGELOG/RELEASES files
View 5 more
  • dist-manifest.json machine-readable release manifest
  • linkage report of the system libraries a build links against
  • cargo-auditable and CycloneDX SBOM options
  • generic builds for non-Rust projects via dist.toml and a build command
  • custom CI jobs at each stage of the release

Limitations

  • Doesn't generate release pipelines for GitLab CI or other CI services: GitHub Actions is the only supported CI provider3
  • Doesn't build macOS .dmg or app bundles, Homebrew casks, Flatpaks, winget or PyPI packages: they're requested installers it doesn't make yet4
  • Doesn't code-sign Windows ARM builds: its Windows signing supports only x86_64 targets5

Capabilities

Has a command line toolplan not known

Alternatives

The same job

These do what dist (cargo-dist) does.

  1. GoReleaser Release engineering, simplified
  2. release-plz Publish Rust crates from CI with a Release PR.
  3. packslip A signed release manifest for vendor binaries: what shipped, and how to verify it
  4. self_update Self updates for Rust executables, from GitHub, GitLab, Gitea, Gitee, S3 or a static manifest
  5. semantic-release Fully automated version management and package publishing

Compare dist (cargo-dist) with the top 3