-
Notifications
You must be signed in to change notification settings - Fork 11
Description
In axodotdev/cargo-dist#1597, the ability to compile axoupdater from source was removed from cargo-dist. For platforms with "uncommon target triples", this prevents them from being able to use the updater. Various other issues in the cargo-dist tracker seem to indicate that the ability to compile from source was broken prior to its removal, so it's not quite clear to me what the current state of things were before this.
Unfortunately, this means that currently when cross-compiling with install-updater = true:
[workspace]
members = ["cargo:."]
# Config for 'dist'
[dist]
# Path that installers should place binaries in
install-path = "~/.foo/bin"
# The preferred dist version to use in CI (Cargo.toml SemVer syntax)
cargo-dist-version = "0.1.0"
# CI backends to support
ci = "github"
# The installers to generate for each app
installers = ["shell"]
# Target platforms to build apps for (Rust target-triple syntax)
targets = [
"aarch64-apple-darwin",
"aarch64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"arm-unknown-linux-gnueabihf",
"armv7-unknown-linux-gnueabihf",
"x86_64-apple-darwin",
"x86_64-unknown-linux-gnu",
"x86_64-unknown-linux-musl",
"armv7-unknown-linux-gnueabi"
]
# Which actions to run on pull requests
pr-run-mode = "plan"
# Whether to install an updater program
install-updater = true
# The archive format to use for non-windows builds (defaults .tar.xz)
unix-archive = ".tar.gz"
# Whether to enable GitHub Attestations
github-attestations = true
[dist.github-custom-runners]
aarch64-apple-darwin = "macos-14"
aarch64-unknown-linux-gnu = "buildjet-2vcpu-ubuntu-2204-arm"
aarch64-unknown-linux-musl = "buildjet-2vcpu-ubuntu-2204-arm"And the following dist build command to build for an "uncommon target triple":
# no updater generated
dist build --target armv7-unknown-linux-gnueabihfThis will fail with the following:
× A build was requested for armv7-unknown-linux-gnueabihf, but the standalone updater isn't available for it.
help: At the moment, we can only provide updater binaries for the core set of most common target triples. Please set
install-updater = falsein your config.
However, it seems like axoupdater can be cross-compiled via cargo-zigbuild:
# build axoupdater
git clone https://github.com/axodotdev/axoupdater
cd axoupdater
# install zig
# set up cargo-zigbuild for cross compilation
rustup target add armv7-unknown-linux-gnueabihf
# build
cargo zigbuild --target armv7-unknown-linux-gnueabihfAs a workaround while cargo-dist doesn't have the ability to build axoupdater from source, would you be open to expanding the set of pre-built binaries axoupdater releases so that the updater can also be used on platforms with "uncommon target triples"?