rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
95.12k stars 12.27k forks source link

Document minimum supported versions of Solaris and Illumos #124549

Open josephlr opened 2 months ago

josephlr commented 2 months ago

Location

https://doc.rust-lang.org/stable/rustc/platform-support.html

Summary

Rust currently supports multiple Illumos and Solaris targets (see Platform Support), but other than saying Rust supports Solaris 11, it doesn't clarify which versions of Illumos and Solaris are supported.

For context, https://github.com/rust-random/getrandom aims to supports all targets/platforms that Rust supports, including Illumos/Solaris. We currently have fallback logic to support old (pre 2018) Solaris/Illumos versions, and we are wondering when it would be OK to remove those fallbacks (both from getrandom and the standard library).

I would propose a minimum platform version of:

This would allow the standard library to unconditionally use the getrandom(2) syscall and unconditionally use named threads.

I'm not sure who's in charge of this decision, maybe @psumbera or @Toasterson

workingjubilee commented 2 months ago

Since the ascent of the target tier policy: As long as no one is written down as maintainer, no one is in charge of this decision except the compiler team, formally speaking. And the compiler team often has fairly limited interest in, and is fairly slow to act on, setting policy for most OS.

Obviously those who have traditionally done the maintenance would ideally in fact be deferred to, if they wanted to sign up to maintain it, but you too can probably propose a minimum of whatever you want if you are willing to sign up to maintain it.

josephlr commented 2 months ago

Looking at https://github.com/rust-lang/compiler-team/issues/644 and https://github.com/rust-lang/rust/pull/112936 it seems like @Toasterson and "the other illumos developers" are the maintainers of the Illumos targets, so I will defer to them. They will certainly have a better idea about what sort of cutoff makes sense.

Happy to submit/review PRs. I'm familiar with how the RNGs work on Illumos/Solaris, but that's the extent of my knowledge.

workingjubilee commented 2 months ago

Oh huh, we really should've gotten a name written down then!

Toasterson commented 2 months ago

According to https://omnios.org/schedule.html the oldest LTS that is currently being maintained is from 2021. All other distros are either Rolling releases or have less stringent requirements. What is of note is that the sysroot that rust uses to cross compile in the CI is from 2018 although it already has getrandom https://github.com/illumos/sysroot/releases @jclulow should we do a new release of the sysroot?

Toasterson commented 2 months ago

For Solaris @alanc can say more

psumbera commented 2 months ago

My recommendation for Solaris is version 11.4 (released in August 2018). This version is still fully supported.

And there is publicly available Solaris 11.4 CBE release for free/open source developers and non-production personal use: https://blogs.oracle.com/solaris/post/announcing-the-first-oracle-solaris-114-cbe

I have never used Rust on Solaris 11.3. The main reason was Rust bootstraping.

jclulow commented 2 months ago

G'day! FWIW, I had thought that @pfmooney and myself were listed as maintainers, as we've been trying to do that haha. We certainly get pings from relevant changes to the libc crate. If there's somewhere else you should put our names down, please let us know how to make that happen. We're both members of the illumos core team and can generally speak for the project.

It's definitely fine, at this point, to assume getrandom() exists, as far as I know. Patrick and I have discussed moving the sysroot forward this year. We still need to work out the particulars.

As an aside, 0.29 is not an illumos version, just a library version for libc, which is relatively inside baseball and not something people would generally recognise. We also don't version the illumos codebase, itself; the master branch is essentially a rolling stable release that makes its way into various distributions which have their own release schedules. The sysroot we provided to the Rust project when setting up the port was our attempt to provide a fixed point for compatibility.

I'll try and get back to you soon with more details on our plans -- but definitely please let's get Patrick and myself into whichever documents are relevant!

workingjubilee commented 2 months ago

We try to have names linked from the operating system's platform support page so that random Rust maintainers can easily scare up some names without doing too much spelunking.

jclulow commented 2 months ago

Ah! Thanks. I'll look at drafting a page for illumos analogous to the other Tier 2 platforms.

psumbera commented 2 months ago

For record. Both Solaris 11.4 and 11.3 do support getrandom().

alanc commented 2 months ago

For rust on Solaris, @psumbera is our expert.

For getrandom() support in libc, what's been said so far is correct, it's available in Solaris 11.3.0 and later.

josephlr commented 2 months ago

Since it sounds like the minimum version will be the above proposed versions or (more likely) later versions, I've filed https://github.com/rust-random/getrandom/pull/417 to unconditionally used getrandom on Solaris and Illumos. Feel free to take a look if you're interested.