Skip to content

v0.20.0

Compare
Choose a tag to compare
@github-actions github-actions released this 08 Aug 17:51

Release Notes

This release contains several new features and bugfixes.

Support for packaging C libraries

Historically, cargo-dist has been focused on building and distributing binaries. There's so many more kinds of software out there, however, and we've had requests to package more kinds of artifacts. This release introduces support for two new kinds of build artifacts: C dynamic libraries, and C static libraries. While these would always be built in the past, we wouldn't package or install them for you. Starting with this release, we've now added the option to include these in your release tarballs/ZIPs and to install them in your installers.

We recognize that it may cause issues if existing binary-plus-library crates began unexpectedly installing libraries with this release, so we've introduced this feature as opt-in for the time being. It may be turned on by default in a future release. To enable packaging libraries in your tarballs/ZIPs, use the package-libraries configuration option. To enable installing libraries, use the install-libraries configuration option.

In the current release, libraries will be installed to the same locations as binaries in the shell and PowerShell installers, while the Homebrew installer will install them to the Homebrew-standard library paths. In the future, as we introduce new forms of installation layouts, we'll provide ways for the shell and PowerShell installers to install libraries to separate locations.

Rust users can produce these with the cdylib and staticlib crate types. For more information, see the Rust documentation. Generic build users can specify which libraries to include using the cdylibs and cstaticlibs configuration fields in dist.toml.

Custom pre-build actions in CI

This release introduces an experimental feature which makes it possible to run arbitrary extra build steps before cargo-dist's own build step during GitHub Actions runs. This can be useful for users who have mandatory pre-build setup they want to perform which can't be satisfied using the system dependencies feature. For example, a build which requires a custom installation of lua could specify that these two extra steps should be performed before the build begins:

- name: Install Lua
  uses: xpol/setup-lua@v1
  with:
    lua-version: "5.3"
- name: Check lua installation
  run: lua -e "print('hello world!')"

For more information, consult the documentation.

The First Rumblings Of 1.0

This release introduces the first steps in a major overhaul of cargo-dist that makes it more suitable for building and distributing apps that aren't written in Rust. This is something we've supported for a long time, but now we're making a big push to make it first-class and stabilizing all the parts.

There is also now experimental support for natively understanding JS projects, to make it easier to use dist for standalone JS executables. Read the new JS quickstart for details!

Several other pages of the docs have seen overhauls, and many more are to come.

Fixes

Install cargo-dist 0.20.0

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://axodotdev.artifacts.axodotdev.host/cargo-dist/v0.20.0/cargo-dist-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -c "irm https://axodotdev.artifacts.axodotdev.host/cargo-dist/v0.20.0/cargo-dist-installer.ps1 | iex"

Install prebuilt binaries via Homebrew

brew install axodotdev/tap/cargo-dist

Download cargo-dist 0.20.0

File Platform Checksum
cargo-dist-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
cargo-dist-x86_64-apple-darwin.tar.xz Intel macOS checksum
cargo-dist-x86_64-pc-windows-msvc.zip x64 Windows checksum
cargo-dist-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum
cargo-dist-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum
cargo-dist-aarch64-unknown-linux-musl.tar.xz ARM64 MUSL Linux checksum
cargo-dist-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum

Verifying GitHub Artifact Attestations

The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:

gh attestation verify <file-path of downloaded artifact> --repo axodotdev/cargo-dist

You can also download the attestation from GitHub and verify against that directly:

gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>