Skip to content

Version 0.4.0-prerelease.2

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 17 Oct 23:52
· 2192 commits to main since this release

Release Notes

This release contains several major features related to package dependencies. cargo-dist can now install dependencies for you in CI, ensure your users have those dependencies in their installers, and provide you insights into what external libraries your package links against! It also enables support for statically-built musl binaries on Linux.

Features

Install custom dependencies

Way back in our very first blog post, we wrote about how users could customize the GitHub CI scripts we output to install custom dependencies. As of cargo-dist 0.4.0, you won't need to do that anymore! System dependencies β€” that is, dependencies installed via the system's package manager instead of cargo β€” can now be specified in your cargo-dist config in Cargo.toml using a syntax very similar to how your cargo dependencies are specified. For example:

[workspace.metadata.dist.dependencies.homebrew]
cmake = { targets = ["x86_64-apple-darwin"] }
libcue = "2.2.1"

[workspace.metadata.dist.dependencies.apt]
cmake = '*'
libcue-dev = { version = "2.2.1-2" }

For more information, see the documentation.

Find out what your builds linked against

Complementing the ability to specify system dependencies, we've added a new feature that lets you tell which libraries your Rust programs have dynamically linked against. While most Rust software is statically linked, installing external dependencies may mean that your software links against something on the system; you can visualize which libraries your software uses, and which packages they come from, by viewing the output of the build step in CI.

In addition, cargo-dist now uses this information to choose which dependencies to specify when building system package manager installers such as a Homebrew formula. If cargo-dist detects that your binary links against a package provided by Homebrew, it will ensure that a user who brew installs your package will also get that other package.

This feature has full support for macOS and Linux. On Windows, we're not able to list which package a system library comes from on Windows.

musl support

This release adds support for a long-requested feature, creating Linux binaries statically linked against musl instead of glibc. These can be enabled adding the x86_64-unknown-linux-musl target triple to your list of desired targets.

Note that because these binaries are statically linked, they cannot dynamically link against any other C libraries β€” including C libraries installed using the system dependency feature mentioned above. If your software links against system libraries, please ensure that a static library is available to the build.

Install cargo-dist 0.4.0-prerelease.2

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.4.0-prerelease.2/cargo-dist-installer.sh | sh

Install prebuilt binaries via powershell script

irm https://github.com/axodotdev/cargo-dist/releases/download/v0.4.0-prerelease.2/cargo-dist-installer.ps1 | iex

Install prebuilt binaries via Homebrew

brew install axodotdev/homebrew-tap/cargo-dist

Download cargo-dist 0.4.0-prerelease.2

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