Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

guix: add rust #9801

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

guix: add rust #9801

wants to merge 1 commit into from

Conversation

tobtoht
Copy link
Collaborator

@tobtoht tobtoht commented Feb 17, 2025

Rust is self-hosted and because the compiler typically uses new language features as soon as they become available it can only be built with the previous minor version of Rust. This makes Rust notoriously hard to bootstrap.

Its bootstrap graph looks like this:

Rust 1.82.0
↓
Rust 1.81.0
↓
Rust 1.80.1
↓
Rust 1.79.0
↓
Rust 1.78.0
↓
Rust 1.77.1
↓
Rust 1.76.0
↓
Rust 1.75.0
↓
Rust 1.74.1
↓
Rust 1.73.0
↓
Rust 1.72.1
↓
Rust 1.71.1
↓
Rust 1.70.0
↓
Rust 1.69.0
↓
Rust 1.68.2
↓
Rust 1.67.1
↓
Rust 1.66.1
↓
Rust 1.65.1
↓
Rust 1.65.0
↓
Rust 1.64.0
↓
Rust 1.63.0
↓
Rust 1.62.1
↓
Rust 1.61.0
↓
Rust 1.60.0
↓
Rust 1.59.0
↓
Rust 1.58.1
↓
Rust 1.57.0
↓
Rust 1.56.1
↓
Rust 1.55.0
↓
mrustc 1.54.0
↓
llvm 13.0.1

You can obtain this graph locally by running guix graph rust | xdot -

Changes to the build environment

package old new
llvm n/a 17.0.6
rust n/a 1.82.0

Changes to transitive build dependencies

Excluding the Rust bootstrap chain shown above.

package old new
boost n/a 1.83.0
dejagnu n/a 1.6.3
expect n/a 5.45.4
gdb n/a 12.1
icu4c n/a 71.1
llvm n/a 13.0.1
llvm n/a 15.0.7
openssl n/a 1.1.1u
procps n/a 4.0.3
source-highlight n/a 3.1.9
tcsh n/a 6.24.01

I haven't tested this yet, but going by the estimates from this post I would expect that this adds roughly 12 hours to the time it takes to bootstrap Monero on a modern 12-core processor.

mrustc is working on adding support for Rust 1.74, which would shorten the bootstrap chain considerably.

This change introduces cross-architecture non-determinism. This means that cross-compiling using Rust from a different host architectures to a common target will not produce bit-identical output. This effectively means that participants in the verified reproduction process must build on a x86_64 host. Unfortunately, reproducibility does not seem like a particularly high priority for the Rust project.

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

Successfully merging this pull request may close these issues.

1 participant