axodotdev / cargo-dist

📦 shippable application packaging
https://axodotdev.github.io/cargo-dist/
Apache License 2.0
1.53k stars 73 forks source link

Add cross-compilation support via cargo-zigbuild and cargo-xwin #1529

Closed fasterthanlime closed 1 week ago

fasterthanlime commented 2 weeks ago

This PRs makes dist aware of the host/target divide, and teaches it to install and use tools like cargo-zigbuild and cargo-xwin.

Additionally, it teaches dist to run local jobs in containers (like the manylinux ones for compat reason, or the cargo-xwin ones, for "fast cross-compile" reasons).

fasterthanlime commented 2 weeks ago

I'm done with this PR (cc @mistydemeo) — there's docs in there, and fasterthanlime/bye is showcasing several ways of using cross-compilation: https://github.com/fasterthanlime/bye/actions/runs/11747958257/job/32731139531

(It's not hidden behind flags or whatever, it just has some extra knowledge and lets you specify even more precisely what you want).