Make rustup a requirement and switch to rust-toolchain.toml (#30056)

This change makes rustup a requirement for building Servo with `./mach`
and switches to the newer `rust-toolchain.toml` format. The goal here is
to make mach builds more similar to non-mach builds.

- The new format allows listing the required components, removing some of
  the complexity from our mach scripts.
- This means we must raise the required version of rustup to 1.23. The
  current version is 1.26.
- We no longer wrap every call to cargo and rustc in "rustup run" calls
  as both cargo and rustc will take care of installing and using all
  necessary components specified in `rust-toolchain.toml` when run
  inside the project directory.
This commit is contained in:
Martin Robinson 2023-08-01 16:44:57 +02:00 committed by GitHub
parent 4061d13ba6
commit fef332f385
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 51 additions and 88 deletions

View file

@ -4,12 +4,6 @@
# Tool options
[tools]
# If use-rustup is set to false, mach will run for example "cargo build"
# instead of "rustup run --install <toolchain> cargo build"
# It is then the users responsibility to ensure that cargo and especially rustc
# in $PATH are versions compatible with Servo.
use-rustup = true
# If rustc-with-gold is true, will try to find and use gold linker with rustc.
# Defaults to true
rustc-with-gold = true