Hacker News new | ask | show | jobs
by the_duke 2001 days ago
rustup is still the recommended way to install.

Rust has a 6 week release cadence, and while the language has settled down significantly over the last 1-2 years, there are still a lot of new features arriving that library maintainers are eager to use. Combined with performance improvements, you will almost always want to use a recent compiler.

Relatively slow moving package repositories are not a great fit for that reason. Rustup also handles installing support for various architectures - which are often not packaged well - and fast-moving tools like rust-analyzer.

The nightly situation has gotten much, much better though. Almost non of the popular crates still require nightly, and staying on stable is just fine for most projects.

2 comments

(It's six weeks not three months)
Ah, right, thanks. I knew something about those 3 months bugged me.
> Relatively slow moving package repositories are not a great fit for that reason

Not every distribution is Debian Stable.

It seems that ubuntu 20.10 groovy gorilla is stuck at 1.43

As a library maintainer I need to make the choice of which version to target.

It's easy to accidently use features of a recent rust version, as you can see in this example:

https://github.com/mkmik/slyce/issues/17

I could work around this issue and pin the rustc version in the CI system to avoid regressions, but is it worth the effort since it's likely that this particular user will eventually depend on another library that uses a feature of >1.43 and thus eventually give in and use rustup? I want to be helpful towards users of my library, but I wonder if the most rational choice is to encourage users to upgrade the toolchain more liberally.

Yes, but some of them are, and some are even worse.