Skip to content

Conversation

@lnicola
Copy link
Member

@lnicola lnicola commented Feb 26, 2025

🙃

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 26, 2025
@lnicola lnicola added this pull request to the merge queue Feb 27, 2025
Merged via the queue into rust-lang:master with commit 505b52d Feb 27, 2025
9 checks passed
@lnicola lnicola deleted the zig branch February 27, 2025 11:50
@BenjaminBrienen
Copy link
Contributor

What does this do and what motivated it? Is this just to avoid using C?

@lnicola
Copy link
Member Author

lnicola commented Feb 27, 2025

When you cross-compile Rust, you still need a target-specific linker, and those aren't always easy to find. In addition, if you build e.g. on Ubuntu 24.04, your binary won't work on older distros. So every couple of years we used to bump the minimum required GLIBC, which caused a number of people to complain that they stopped working on unsupported distros like Debian oldoldstable, or CentOS/EL, which are even older.

cargo-zigbuild works as a linker and knows stuff about what's in each version of GLIBC, so we can build every Linux binary on ubuntu-latest while targeting the lovely EL8 vintage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants