Connor's Blog

Rust's "Nightly Syndrome"

I haven’t been involved with any Rust for a few years now but every time I peer into the ecosystem I see a pattern that hasn’t gone away. I’ve started calling it “nightly syndrome.”

An uncomfortable number of Rust projects rely on the nightly compiler builds to utilise experimental features that haven’t been released yet. In a lot of cases, this is down to impatience or the temptation of more convenience features. The code could be written to work with the stable compiler but the authors choose not to.

One such example is the Rocket crate which for years did not compile under stable rustc. I’m not sure on the specifics of why that was but it seems unlikely that the nightly features were must-haves to serve HTTP requests.

In past projects of mine written in Rust, I’d often find that crates I wanted to use were nightly-only and it was frustrating. Also, I’ve noticed that OS/kernel development projects in Rust heavily rely on nightly. This is a bit more understandable because they push the limits more than a typical CLI tool or web server, but it’s still not ideal.

Effectively, if you include a dependency that requires nightly, so does your own project.

This kind of “move fast and break things” attitude is not a great advertisement for the language and probably makes a poor impression on C/C++ loyalists. In the exciting new world of memory safety, stability appears to be less of a priority than it is to greybeards of the established languages.

I don’t think that an unstable compiler version should be so easily accessible. I’ve never heard of anybody installing unstable versions of Go or Java to use bleeding edge features. When I read about new stuff from the Go blog that I want to use, I patiently wait for it. Most of the time I have no idea what compiler version I’m even using.

Yes, I do realise these are different languages with different purposes. I’m highlighting the difference in mindset between these communities.

If developers genuinely need experimental features to write software in Rust, is it really ready for production use?