Linus Torvalds joined the discussion of the initial implementation of Rust support in the Linux kernel

Linus Torvalds connected for discussion possibilities adding Rust development tools to the Linux kernel. Josh Triplett of Intel working on project on bringing the Rust language to parity with the C language in the field of system programming, proposed Initially, add an option to Kconfig to support Rust, which would not cause the Rust compiler to be included in the list of dependencies when building in "make allnoconfig" and "make allyesconfig" modes and would allow more free experimentation with Rust code. A similar trick was implemented with adding into the core of experimental build support in Clang in the optimization mode at the linking stage (LTO, Link Time Optimization), after which it is planned to add and support assemblies with command execution thread protection (CFI, Control-Flow Integrity).

Linus disagreed and expressed concern that Rust's initial support would then not be build-tested and risk getting stuck in its own swamp in which a small group of developers who are interested in the project only check the code works under their own specific conditions and add the wrong things as they remain. hidden and do not pop up when testing the kernel in other environments.

For Linus, the first Rust driver should be presented in a simple format that makes failures obvious and easy to spot. To simplify testing, he recommended doing the same as when checking versions of the C compiler and supported flags - check for the presence of the Rust compiler in the system and enable its support if it is installed.

Source: opennet.ru

Add a comment