axodotdev / axodotdev/cargo-dist

Enable cross compiling on non Rustup systems

Open
#621 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2.1k
Forks
150
Avg merge
1d 11h
Merged PRs (30d)
32

Description

I and a lot of NixOs users, use [rust-overlay](https://github.com/oxalica/rust-overlay)(or fenix) to manage the installed rust toolchain, selecting and installing targets and Rust versions in our flake.nix or similiar files.

I wanted to test the musl build for our project via cargo-dist, so I did `cargo dist build` and got this warning:
```
WARN You're trying to cross-compile for musl from glibc, but I can't find rustup to ensure you have the rust toolchains for it!
```
and it only built for the current target. Can we widen that check to not use rustup, perhaps by checking for installed targets as cargo does?

Contributor guide

Open the contributing guide

Research direction

Start by tracing the cross-compilation check in cargo-dist that emits the rustup warning, then inspect how Cargo detects installed targets. The change is done when a NixOS or other non-Rustup setup can build the musl target instead of falling back to only the current target.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, release
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.