CAD97
October 31, 2018, 7:31am
4
SBT is concerned about executables. For executables, we have the rust-toolchain
file, which means that any rustup-managed tool will automatically download and use the (exact) specified version when ran from that directory.
That said, you've revived an ancient , pre-1.0 post. For a more modern take, see
UPD: This proposal is published as RFC 2495 .
Summary
Add rust field to package section which will be used to specify crate’s Minimum Supported Rust Version (MSRV):
[package]
name = "foo"
version = "0.1.0"
rust = "1.30"
Motivation
Currently crates have no way to formally specify MSRV. As a result users can’t be sure that crate can be built on their toolchain without building it. It also leads to the debate on how to handle crate version change on bumping MSRV, conservative approach is to consi…
rust-lang:master
← newpavlov:msrv
opened 03:03PM - 04 Jul 18 UTC
This RFC adds an ability to specify Minimum Supported Rust Version (MSRV) in `Ca… rgo.toml` using `rust` field:
```toml
[package]
name = "foo"
version = "0.1.0"
edition = "2018"
rust = "1.35"
```
[Rendered](https://github.com/rust-lang/rfcs/blob/master/text/2495-min-rust-version.md)
[Tracking issue](https://github.com/rust-lang/rust/issues/65262)
[Internals discussion](https://internals.rust-lang.org/t/pre-pre-rfc-reviving-minimum-rust-version/7783)
Edit: FCP proposal https://github.com/rust-lang/rfcs/pull/2495#issuecomment-532853518