The ninth version of Rust for Linux arrives and says goodbye to support for versions prior to Linux 3.2

Wow, the job of Rust driver support for Linux is now under way and a fairly continuous development has begun, since it does not have much to version 8 was announced of the patches and that's it right now we have version 9.

And it is that in this ninth version that has been proposed, it is worth mentioning that as such it is a simplified version of the eighth edition published a few days ago. The kit is distinguished by a significant reduction in size and by leaving only the most necessary minimum, enough to build a kernel module written in Rust.

The minimum patch is assumed will make it easier to adopt Rust support into the main kernel. After providing minimal support, it is planned to gradually increase existing functionality, porting other changes from the Rust-for-Linux branch.

This is the series of patches (v9) to add support for Rust as a second language to the Linux kernel…

As usual, a special thanks to ISRG (Internet Security Research Group) and Google for their financial support in this effort.

Compared to version 8, the size of the patch has been reduced from 40 to 000 lines of code. For example, version 3 includes only 500% of the code (60 lines) of the "kernel" box package and 32% of the alloc library, allowing you to create the simplest kernel modules using the Vec type. and displaying information in the kernel log using the "pr_info!" macro.

Moreover, In relation to Rust and Linux, it is worth mentioning that recently the Rust project developers warned to users about the impending increase in requirements for the Linux environment in the compiler, the Cargo package manager, and the libstd standard library.

As of Rust 1.64, scheduled for September 22, 2022, the minimum requirements for Glibc will be raised from version 2.11 to 2.17 and the Linux kernel from 2.6.32 to 3.2. The restrictions also apply to Rust binaries built with libstd.

RHEL 7, SLES 12-SP5, Debian 8, and Ubuntu 14.04 distributions meet the new requirements. Support for RHEL 6, SLES 11-SP4, Debian 7, and Ubuntu 12.04 will be discontinued. Reasons for deprecating support for older Linux systems include limited resources to continue to support older environments.

Why increase the requirements?
We want Rust and the binaries produced by Rust to be as widely usable as possible. At the same time, the Rust project only has limited resources to maintain compatibility with older environments.

There are two parts to the toolchain requirements: the minimum requirements for running the Rust compiler on a host system, and the minimum requirements for cross-compiled binaries.

The minimum requirements for host toolchains affect our build system. Rust CI produces binary artifacts for dozens of different targets. Building binaries that support older versions of glibc requires building an operating system with older glibc (for native builds) or using a build root with an older version of glibc (for cross-builds).

En particular, compatibility with older Glibcs ​​requires the use of older tools when verified in a continuous integration system, versus increased versioning requirements on LLVM and cross-compiling utilities. The increase in kernel version requirements is due to libstd's ability to use new system calls without the need to maintain layers to ensure compatibility with older kernels.

Users using Rust-created executables in environments with older Linux kernels are advised to upgrade their systems, stay on older versions of the compiler, or maintain their own layered libstd fork to maintain compatibility.

Finally, if you are interested in being able to know more about it, you can consult the details in the following link.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.