Works on Rust version 1.X


#1

Many crates detail in their docs that their crate needs Rust version 1.xx or above.

It would be great to have a standard place to document this. Should we just specify it as a dependency?

[dependencies]
rust=“1.26”

One might even be able to have compiler warnings that you’ve said it works with version 1.26 but you’re using a feature only available from 1.28.

Nightlies could be specified as well:
rust_nightly=“1.23”

The current ‘rust’ crate on crates.io points to a 404 so that’s game for reuse.

Is there a better way - should there be a specific manifest location for this? Should it be mandatory to specify when publishing to crates.io?

Is there already a way to specify the min rust version that a crate requires?


#2

https://github.com/rust-lang/rfcs/pull/1707 and https://github.com/rust-lang/rfcs/pull/1709 are sort of the canonical discussions for this feature. It seems https://github.com/rust-lang/rfcs/pull/2182 is the currently active discussion around this area, although I think that’s still focused on allowing something like this to be backwards compatibly added to the Cargo.toml, not proposing to add the actual minimum Rust version flag.