wiki:rust

Version 13 (modified by Xi Ruoyao, 8 months ago) ( diff )

Reverted to version 11. The 1.71.0 vs 1.71.1 problem is a bug and it's fixed by https://github.com/rust-lang/rust/commit/31a81a08786826cc6e832bd0b49fb8b934e29648

Rust

There are releases at https://github.com/rust-lang/rust but do NOT use those to try to bootstrap - the tarballs are much smaller, various essential parts are missing. The only real benefit of looking at releases there is that it's possible to see the versions.

The source needs to be downloaded from https://static.rust-lang.org/dist/ as rustc-<VERSION>-src.tar.gz : this site is NOT searchable.

Building newer versions

Firefox-97 will need at least rustc-1.57.0. That version would need an amended sed to force the correct (rust) curl and curl-sys crates (not tested). Using rustc-1.58.0 picks up new enough crates and works. However, there are a lot more test failures (in the absence of gdb, only one failure is not in 'assembly'), as with 1.56 these seem to be caused by the tests using -Werror.

Building with the shipped llvm

This should always be reliable, but the build is a lot slower than with system llvm.

The changes in config.toml to use shipped llvm are:

  1. Comment out link-shared = true
  2. Remove the [target-...] sections with their pointers to llvm-config.

Building w/o internet connection

See https://www.linuxfromscratch.org/hints/downloads/files/rustc-offline-hint.txt

Upgrading from 1.x.y to 1.x.z or 1.(x+1).z

If you've already installed Rustc-1.x.y and now you are building Rustc-1.x.z or Rustc-1.(x+1).z (where x, y, z are any integers), you may add two lines into the [build] section of config.toml:

rustc = '/opt/rustc-1.x.y/bin/rustc'
cargo = '/opt/rustc-1.x.y/bin/cargo'

Then the building system will use Rustc-1.x.y as the bootstrap compiler, instead of downloading a pre-built binary. So this method can also avoid a dependency on the Internet connection.

Note that this generally won't work if you are building Rustc-1.t.z where t is neither x nor x+1.

And, even if this method is used, running the test suite will still download a pre-built binary.

Up
Top

Note: See TracWiki for help on using the wiki.