tock / libtock-rs

Rust userland library for Tock
Apache License 2.0
160 stars 105 forks source link

Use the `rust-version` field in Cargo.toml to set minimum Rust version #506

Closed bradjc closed 10 months ago

bradjc commented 10 months ago

This encodes the minimum version so that the tooling will verify the user has a new enough Rust.

Set based on the needs from #498.

Fixes #394. Supersedes #499.

lschuermann commented 10 months ago

How does this relate to rust-toolchain? Would we eventually want to switch away from this entirely in favor of a MSRV?

lschuermann commented 10 months ago

Seems like this needs #481.

bradjc commented 10 months ago

Ok yeah this applies on top of https://rust-lang.github.io/rustup/overrides.html

This is confusing, because either rust-toolchain meets this requirement or nothing will build. But, since we also use stable for tests, this is useful for making sure the tests compile with a new enough rust.

bradjc commented 10 months ago

Why don't we use stable by default and nightly only for miri?

jrvanwhy commented 10 months ago

Why don't we use stable by default and nightly only for miri?

I first introduced the check (#315) when only a subset of libtock-rs' crates built on stable, then later expanded the set (#390) to all crates. At the time, I had a few ideas for things other than Miri that required nightly, but I haven't had the time to implement them so at the moment we only need nightly for Miri.

I think it's fine to flip that around, and use the MSRV by default (e.g. via rust-toolchain and invoke our nightly version only for specific commands (at the moment, the Miri invocations).

bradjc commented 10 months ago

Done in #513