Why shouldn't I use the current rustc version?

Many crates indicate their minimal supported rust version (MSRV) and it's usually (much) less than whatever is the current version of rustc. Many even require contributors to stick with that version. But why shouldn't people use the newest version? The only reason I can come up with is that some people can't download the newest version out of some reason (no internet?) and they don't want to exclude them, but that's obviously ridiculous. Or is "rustc stable" not stable at all?

1 Like

You should just use the current rustc version.

Mostly you should use the current version ( of stable ).

If you are close to delivering some software, and have done extensive testing but do not have time to repeat it with the current version of the compiler, you might be choose not to update, just in case the latest compiler causes a problem ( even though this quite unlikely ).

But why then does every library tell their minimal supported rust version? I mean it's not like there's the possibility that it's newer than the current one.

If you install Rust via your Linux distros package manager, then you will typically not get the newest rustc.


This blog Announcing Rust 1.56.0 and Rust 2021 | Rust Blog explains

"The idea is to catch compatibility problems before they turn into cryptic compiler errors"

Why is it ridiculous? It’s not obvious to me.


Some people work in environments in which compiler version (any software package really) have to go through a manual approval process.

That's why "Long Term Support" (LTS) versions exists for many kind of software. Patch releases are easier to get approval on than feature releases.

It's not uncommon to lag several years or even a decade (and more) behind what the latest is.


Also, GCC is adding preliminary Rust support these days, but it will target an older Rust version (1.40 IIRC), so crates with a newer MSRV wouldn't necessarily be compilable by GCC yet.