4 ms·
> This is not as good as having an official standard (say, in Cargo.toml) It’s present now: https://doc.rust-lang.org/cargo/reference/manifest.html#the-rust-ve
by shepmaster 4y ago
> This is not as good as having an official standard (say, in Cargo.toml)
It’s present now: https://doc.rust-lang.org/cargo/reference/manifest.html#the-rust-version-field https://doc.rust-lang.org/cargo/reference/manifest.html#the-...
- bilkow 4y agoOh, incredible! How have I missed that, thought it was still just a proposal...
- moosingin3space 4y agoDo be aware, though, that this is just a way to make builds fail fast if you have an older compiler. It doesn't put the compiler in a mode that makes it reject features introduced after that version. If projects want to maintain an MSRV policy, they should be using CI to confirm that they keep compatibility. This flag only exists for improved communication to downstreams.
- pavon 4y agoYeah, I was very excited when that was added. I prefer to use use the system Rust as well, and my primary complaint was the hassle of having to manually resolve dependency versions (for packages not in the OS package manager) because Cargo hasn't had great support for restricting packages to ones compatible with your version of Rust. There will always be some issues with package maintainers using new features without realizing it, and/or forgetting to bump the minimum version. But now that there is a standard for how it should be done, I can submit patches to these projects to fix the problems when I encounter them.