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

11
rust-toolchain.toml Normal file
View file

@ -0,0 +1,11 @@
[toolchain]
channel = "nightly-2023-02-01"
components = [
# https://github.com/rust-lang/rust/issues/72594#issuecomment-633779564
"llvm-tools-preview",
# For components/script_plugins, https://github.com/rust-lang/rust/pull/67469
"rustc-dev",
"rust-docs",
"rustfmt-preview",
]
profile = "minimal"