-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Set a minimum Rust policy #3
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am pretty happy with this overall plan.
stable or nightly. 17% reported getting their Rust from Linux distros, but we | ||
don't know which. If we want Rust 1.26, RHEL7 devtools and all Ubuntu LTS have | ||
Rust 1.31; Debian 10 has Rust 1.32, but Debian 9 would be left out with its Rust | ||
1.24; and of course this sample of distros is incomplete. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've not thought at all about how the "1 year" threshold corresponds to distro release schedules and the like. Is there possibly a choice (18 months?) that will work better for some reason or another?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's no clear choice, but one corroborating factor is that Firefox ESR rebases about once a year, requiring a new Rust toolchain. So even conservative enterprise distros have a strong motivation to update for that, and hopefully that's available to their users too.
FWIW, for RHEL we announced quarterly Rust updates. There's some added release pipeline delay, so at the worst (right before a new update) it will be a little more than a quarter behind. Then I figure some slop time is needed for customers to actually update.
This looks great to me! Just something to have in mind: I'm considering bumping the requirement for Crossbeam to 1.34 eventually (lots of good stuff in that release, like stabilized All that said, I'll try to delay those bumps as much as possible. And when we do bump the minimum Rust version in Crossbeam, I'm pretty sure we'll still be able to support older Rust versions behind a feature flag so that Rayon doesn't suffer. (Right now Rayon is stuck with a really old Rust version, supporting which is not as easy.) |
Also, just a side note on how Tokio deals with this problem. Tokio's policy is: minimum required Rust version <= two versions behind the latest stable one. |
Much appreciated!
Consider doing this behind the scenes in the build script if possible, using something like autocfg. I intend to transition Rayon's build script to that too, as it's meant to centralize the way to do feature probing. This way the new stuff Just Works when the rustc or std features are available.
IMO that's too fast for distro toolchains to keep up, but it's also hard to say whether such users really need to be able to use current Tokio too. For existing code, they can stay on older versions of the crate, but I think for new users it would be frustrating to figure out compatibility. For example, a while ago I wrote a post on getting started with rust-toolset in RHEL7, which included a Rayon example. It would be really sad to me if that became unusable after only 12 weeks (2 Rust releases), just because Rayon had moved on while the distro packages hadn't had a chance to update yet. Of course we'll require something newer eventually, hence this RFC, but give enterprise a chance to keep up! 🙂 |
Oooh, that looks sweet! Thanks for the suggestion :)
Totally makes sense and sounds like a good plan to me! 👍 |
We decided to accept the RFC! Huzzah! |
656: Rust 1.26 and assorted cleanups r=nikomatsakis a=cuviper In anticipation of [RFC 3](rayon-rs/rfcs#3), giving us a policy to soon raise our minimum to Rust 1.26, I started this branch to make the conversion. After the primary motivation of upgrading crossbeam, I also looked for ways to use newer language features. Throughout all of this, the public API should be completely unaffected. Closes #586 for newer crossbeam, even though we're not quite at the *newest*. Co-authored-by: Josh Stone <cuviper@gmail.com>
656: Rust 1.26 and assorted cleanups r=nikomatsakis a=cuviper In anticipation of [RFC 3](rayon-rs/rfcs#3), giving us a policy to soon raise our minimum to Rust 1.26, I started this branch to make the conversion. After the primary motivation of upgrading crossbeam, I also looked for ways to use newer language features. Throughout all of this, the public API should be completely unaffected. Closes #586 for newer crossbeam, even though we're not quite at the *newest*. Co-authored-by: Josh Stone <cuviper@gmail.com>
Set a formal policy for the minimum supported Rust version in rayon and rayon-core.
We will support at least one year of Rust compilers, meaning that our chosen minimum will be at least one year old at the time we release any rayon crate requiring that.
Increases to our minimum supported Rust will also require a new minor release in the semantic version of rayon crates, not just a patch release.
(rendered)