tock / libtock-rs

Rust userland library for Tock
Apache License 2.0
163 stars 109 forks source link

Define a MSRV, use that toolchain by default. #513

Closed jrvanwhy closed 1 year ago

jrvanwhy commented 1 year ago

This PR defines a Minimum Supported Rust Version. It specifies that toolchain in rust-toolchain, so rustup will use that toolchain by default. The test-stable make action is removed, as it is now redundant.

We still need the nightly toolchain for Miri. Instead of specifying the nightly toolchain version via the command line, I created a new nightly/rust-toolchain.toml file that specifies the toolchain. The benefit is this makes rustup automatically install the nightly toolchain including Miri. This should stop the toil we currently have where every time the Rust toolchain is updated, everyone using make test has to manually install new toolchains and Miri. The downside is the directory change we need to use it is kinda ugly.

I set the MSRV to 1.70 so this doesn't conflict with #498.

I will send another PR that adds rust-version.workspace = true to all the Cargo.toml files in this repository; I didn't want to clutter this PR with those changes.

bradjc commented 1 year ago

@jrvanwhy and I discussed this quite a bit, and there isn't a perfect solution (that we know of) and I think this one is as close as we can get.

What we want:

What would be nice:

Using a fixed stable version doesn't get us the first two points of "would be nice" but it gets us all of the must haves and minimizes the number of toolchains a user must have to run tests locally.