cargo-dist
Releases
Version 0.14.0 (2024-05-06)
This is a BIG release for installers, with every installer getting big bugfixes and reworks.
- shell installers:
- support cascading install-path rules like "install to $MY_APP_HOME, or ~/.my-app if that's not set"
- can install aliases for your binaries (symlink on unix, hardlink on windows)
- properly setup PATH for fish shell
- have more robust platform-support fallbacks
- npm installers:
- can be automatically published to npm
- support multiple binaries
- can install aliases for your binaries (additional bin commands on the package)
- can have a different name from their parent cargo package
- have more robust platform-support fallbacks
- have all new docs
- homebrew installers
- can install aliases for your binaries (builtin homebrew aliases)
- have more idiomatic install-hints
- have all new docs
Features
npm installer rewrite
The npm installer has been rewritten to remove almost every limitation it has.
Notably, you can now have multiple binaries in an npm package without any issue. You can even make aliases for commands with the new bin-aliases setting.
Although for the best user experience, ensuring your package unambiguously has one true command is ideal. To help with this, the npm-package setting was added, allowing you to rename your npm package (which is one of the disambiguators for the primary command of an npm package).
You can also now automatically publish your npm packages by setting publish-jobs = ["npm"]
!
- docs
- impl
- @gankra rewrite npm installer
- @gankra add npm-package config
- @ashleygwilliams add builtin npm publish
- @ashleygwilliams rewrite npm installer docs
install-path cascades
The install-path setting that's used by the shell and powershell installers can now be an array of options to try in sequence. This is mostly useful for checking if special environment variables are set before falling back to some hardcoded subdir of $HOME.
For instance, if you set:
install-dir = ["$MY_APP_HOME/bin", "~/.my-app/bin"]
Then your shell and powershell installers will first check if $MY_APP_HOME
is defined and install to $MY_APP_HOME/bin
if it is. If it's not defined then it will use the more hardcoded $HOME/.my-app/bin
.
binary aliases
The shell, powershell, npm, and homebrew installers all now support aliases for binaries with the new bin-aliases setting. These are not included in your downloadable archives, and are setup in an installer-specific way:
-
shell: symlinks
-
powershell: hardlinks
-
npm: extra "bin" entries pointing at the same command
-
homebrew: bin.install_symlink
-
impl
- @mistydemeo add binary aliases
- @mistydemeo adjust feature name
- @mistydemeo force symlinks to overwrite
publish github releases to other repo
If you need to publish your GitHub Releases to a different repo than the one you run your release workflow on, you can use the new github-releases-repo setting to specify this.
disable alternative source tarballs
You can now disable the backup source tarballs uploaded by cargo-dist with the new source-tarball setting.
Fixes
- @gankra rewrite homebrew installer docs
- @mistydemeo use more idiomatic homebrew install expressions
- @mistydemeo fix references to selfupdate command
- @gankra unify installer platform-compatibility code
- @mistydemeo implement fish support in installer
Version 0.13.3 (2024-04-22)
This minor release adds some more resilience to release.yml by explicitly enabling windows longpath support, in case your repository (or submodules) contain extremely long filenames or paths.
It also adds some missing dependency constraints for custom local and global build jobs.
Fixes
- @gankra improvements to release.yml
Version 0.13.2 (2024-04-16)
This minor release updates several dependencies and contains one improvement to the shell installer.
Fixes
Version 0.13.1 (2024-04-12)
This is a release that adds some improvements to the logic for updating PATH and rcfiles in installers.
Fixes
Version 0.13.0 (2024-04-09)
This releases introduces a 'selfupdate' command, using cargo-dist's new updater support.
It also includes several bugfixes and a technically-breaking-change to the dist-manifest feature.
Features
A new cargo dist selfupdate
command has been added which updates cargo dist to the latest
version and runs cargo dist init
using that new version. As a result, this should in
be a go-to replacement for most uses of cargo dist init
.
This is based on the new experimental axoupdater library. Essentially it just checks GitHub Releases or axo Releases for anything newer, and fetches and runs the appropriate shell/powershell installer.
This library is the same one used for the updater feature of cargo-dist, which has cargo-dist provide a standalone separate updater binary. The benefit of us using the library directly is that we get a more unified design at the cost of needing to actually change the interface of our application -- something the separate binary avoids.
- @mistydemeo initial implementation
- @gankra finalize implementation
Breaking Change
- @gankra manifest reform
This release makes a several changes to the dist-manifest format which ideally shouldn't be breaking in the strictest sense of the word, but are breaking in spirit. No one is expected to be effected, as the metadata in question is so niche that not even axo's own tooling was making a use of it.
The upshot of this breakage is that we now properly collect and merge unambiguous per-platform and per-binary metadata from build machines, which is groundwork for significantly improved installers and tooling.
Changes include:
- there is now a top-level
systems
map in the manifest- contains gathered information about each system cargo-dist ran on to build your release
- this effectively deprecates the
system_info
value, which was already optional and not terribly useful
- there is now a top-level
assets
map in the manifest- contains gathered information about each binary cargo-dist built
- refers to the
systems{}
that the binary was built on - contains linkage info
- the top-level
linkage
array has been deprecated in favour of the same entries being nested inassets
, and is now always empty- in future versions it may be removed, but the schema didn't mark this field as optional so it can't yet be removed
artifacts{}.assets[].id
now can optionally refer to an entry inassets
- this allows you to precisely get the dependencies (linkage) for each binary in an archive, or for the whole archive (by merging them)
- in the future it will also be used to get things like libc version requirements
artifacts{}.checksums{}
has been added- contains the actual checksum value(s)
- the existing
artifacts{}.checksum
only refers to a checksum file, as previously the manifest could not be updated with "computed" info - this being a map allows artifacts to have multiple checksums, which is useful since lots of things hard require sha256
Fixes
- @mistydemeo run apt-get update before installing system deps
- @ucodery make formula files pass brew lint
- @tshepang fix copyright year
- @mistydemeo further update copyright year
- @tisokun properly spell GitHub in CI yml
- @gankra use mv instead of cp in installer.sh
- @nokazn fix broken link in docs
Version 0.12.2 (2024-04-04)
This is a minor release which regenerates the shell installer using the fix from 0.12.1. It fixes an issue which would cause the cargo-dist shell installer to fail if cargo-dist itself is running at the time the installer tries to write the new copy.
Version 0.12.1 (2024-04-04)
This is a minor bugfix release.
Fixes
Version 0.12.0 (2024-03-21)
This release introduces an experimental new feature: an updater which allows your users to install new releases without having to go download a new installer themselves. It also includes a few other bugfixes and improvements.
Features
cargo-dist updater
The new cargo-dist updater, axoupdater, provides a way for your users to easily upgrade your software without needing to check your website for new versions. If you enable the new install-updater = true
option in cargo-dist, users who install your software via the shell or PowerShell installers will receive a standalone updater program alongside your program itself. Running this program will check for updates and, if necessary, install the new version for them. In addition, axoupdater provides a Rust library with all of its functionality exposed so that you can choose to integrate the updater functionality into your own program directly.
For more information, see the cargo-dist documentation or consult the axoupdater repository and documentation.
Homebrew cask dependencies
Homebrew cask dependencies can now be installed.
- impl @mistydemeo feat: support cask deps for Homebrew
PowerShell installer tests
We now run PowerShell installers end to end in cargo-dist's own tests.
- impl @Gankra chore: add ruin_me powershell tests
Invoke rustup target add
for additional forms of cross-compiling
We now run rustup target add
unconditionally when cross-compiling; before, this was limited to macOS or for musl Linux. This is primarily useful for targeting Windows ARM, but may be useful for other cross-compilation targets in the future.
- impl @AustinWise feat: always rustup target add in cross
Allow overriding install path in shell and PowerShell installers
Although some installer configuration allows setting the installation path, there was previously no way to force the installer to install to a location of the user's choosing. We've added a feature to do so via the new CARGO_DIST_FORCE_INSTALL_DIR
environment variable.
This is primarily intended for cargo-dist's internal use, and is used by the updater to ensure that new releases are installed in the same location as the previous version; other users may find it useful.
- impl @mistydemeo feat: allow overriding install path