I think another aspect to consider is that not all crates will have a fixed minimal
rustc/cargo version. Especially if a crate if fairly new an still in flux (and might
stay in this state for a while) it totally makes sense to only commit just to an
release channel or a version relative to one.
So I would do something like:
-
"X.Y" (e.g. "1.23") for having a minimal version
-
"stable","beta" for the last release in stable, beta at any time
-
"stable-1" (and smimilar) like “stable” but with a slack period of 1 release cycle
(not sure if we need it, but having e.g. "stable-0.5" which says that it works with
only with the newest stable release but gives you 3week time to upgrade seems
not wrong)
-
"nightly" for the latest nightly snapshot at any time
-
"nightly: ..." se the first post in this thread
Also there are a lot of versioning related problems for which there isn’t a single
good answer e.g. if bumping the minimal version is a breaking change. So we should
avoid to enforce to many checks.
Additionally sometimes people aren’t aware that there crate works on earlier versions,
especially if this is only true wrt. to some features not being enabled or some target
arch, so we might want to add a way to disable the version error or by default only
make it a warning.
Lastly the minimal version sometimes depends on the target arch, os and enabled
features which can not be expressed through a simple rust version field.
Still I think having a simple rust version field (including “nightly” and “stable” as
versions) which is checked but not necessarily enforced seems like an good idea.