Commit Graph

6 Commits

Author SHA1 Message Date
Philipp Schuster b65cac29bf nix: get rust toolchain from rust-overlay
Now, a nix-shell always has the latest rust stable version, compliant to our
rust-toolchain.toml file.
2023-11-24 10:54:43 +01:00
Nicholas Bishop 2a3439fba0 Change toolchain from nightly to stable
As of Rust 1.68, the uefi crates work on stable. Remove the
`channel = "nightly"` setting from `rust-toolchain.toml` and
`template/rust-toolchain.toml`.

Related changes:
* The CI job to compile with the MSRV has been changed from `nightly-2022-11-22`
  to `1.68`. So for now the MSRV job isn't checking anything that isn't already
  checked by other jobs, but once 1.69 comes out it will.
* The CI job to test the latest crates.io release still needs the nightly
  toolchain until we do a new release.
* Some of the uefi-macros compiler ui tests have been modified so that the error
  output matches the errors produced by stable compiler, which are currently
  slightly different in a few cases from the nightly compiler. In particular,
  the precise spans we output for errors in the guid macros don't work on
  stable, because proc-macro's Literal::subspan method is currently unstable.
2023-03-19 18:09:27 -04:00
Nicholas Bishop ed1c0c46f3 Add UEFI targets to rust-toolchain.toml
These targets are now available via rustup as of nightly-2022-11-10.
2022-11-24 14:40:30 -05:00
Nicholas Bishop 1f4140d040 Switch the toolchain back to latest nightly
The bug in nightly Rust that was causing problems for us has been fixed,
so switch back to latest nightly.

Fixes https://github.com/rust-osdev/uefi-rs/issues/500
2022-09-25 12:11:56 -04:00
Nicholas Bishop c6088c05b9 Pin to a working nightly
Temporarily modify rust-toolchain.toml to pin to `nightly-2022-08-26`,
as compilation is broken on current nightly due to
https://github.com/rust-osdev/uefi-rs/issues/500. `nightly-2022-09-01`
is the most recent nightly that avoids the bug, but it doesn't have miri
(which is run by CI), so pin to a slightly older version.

Also pinned the toolchain in the template app.

This change should be reverted once #500 is fixed.
2022-09-06 11:21:01 -04:00
Nicholas Bishop 26be8902f7 Add rust-toolchain.toml
Add a `rust-toolchain.toml` file that specifies the channel and
components needed to build uefi-rs. See
https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file for
documentation of the `rust-toolchain.toml` format.

Remove the `--toolchain` option from `xtask`, as using this file is a
simpler alternative. Also remove the instructions for installing the
nightly toolchain from the readme, as `rustup` will do this
automatically now.

The template application has been updated to add a
`rust-toolchain.toml`, and `BUILDING.md` has been updated to mention it
as well.

The `toolchain` action previously used in the CI is unmaintained and
doesn't understand `rust-toolchain.toml` (it does understand the older
`rust-toolchain` file, but that doesn't allow for including required
components). Since the runners come with rustup already installed, we
don't actually need a complex action here anyway, so just remove those
sections entirely. A few jobs need extra components installed, do that
with `rustup component add`.

Note that this change will also cause `xtask` itself to be built with
nightly. That should generally be fine, we only had it using stable
because of https://github.com/rust-osdev/uefi-rs/issues/397, and in the
future we can easily temporarily pin to a non-current nightly if a bug
occurs with an `xtask` dependency again.

Fixes https://github.com/rust-osdev/uefi-rs/issues/498
2022-09-06 11:21:01 -04:00