Inquiry: Linux Kernel and glibc Compatibility Policy

Hello,

I'm writing to ask for clarification regarding the compatibility policy for Linux kernel versions and glibc in the Rust toolchain. As I understand it, the minimum glibc version supported by the official Rust binaries is determined by the build environment (currently around glibc 2.17, as seen in environments like CentOS 7). However, I have a few questions and concerns regarding both glibc and the Linux kernel:

  1. glibc Compatibility:
  • Is the glibc version (e.g., 2.17) used in the official build environment effectively considered the minimum supported version for the Rust toolchain?
  • Is there an explicit policy or documentation that details whether support for older glibc versions is guaranteed or if users must build Rust from source to target older systems?
  1. Linux Kernel Requirements:
  • Is there an official or de facto minimum Linux kernel version that Rust is built against or requires to run reliably?
  • Are there any kernel-specific features or syscall requirements that effectively set a minimum kernel version for using the Rust toolchain or libraries?
  1. Documentation and Future Plans:
  • Would it be possible to include explicit compatibility information for both glibc and Linux kernel versions in the Rust documentation?
  • Are there any plans to address or expand support for older glibc or kernel versions in future releases?

Thanks very much!

I think your questions are mostly answered by the Platform Support page:

x86_64-unknown-linux-gnu 64-bit Linux (kernel 3.2+, glibc 2.17+)

Are there any kernel-specific features or syscall requirements that effectively set a minimum kernel version for using the Rust toolchain or libraries?

IIRC it's mostly determined by officially supported Linux distributions (RHEL being the biggest blocker). Personally, I hope that the minimal supported kernel version will be bumped to 3.17, so we could rely on the getrandom syscall without the problematic file fallback.

Here is a link to the proposal responsible for the most recent bump: Increase the minimum linux-gnu versions · Issue #493 · rust-lang/compiler-team · GitHub

1 Like

Thanks very much! Indeed, I would like to know the future plans or promise of compatibility, such as when will glibc 2.17 be dropped, or in what situation rust will raise the version of glibc?

It's discussed a bit in the linked Zulip discussion in the first comment to the proposal. In the most conservative case the next bump will not happen until end of RHEL 7 ELS (June 30, 2028), but personally I hope that the library team will use a less conservative policy (i.e. ELS will not be officially supported by new Rust releases).

1 Like

Thanks very much!