Linus Torvalds to the discussion of adding tools for Rust programming language support to the Linux kernel. Josh Triplett from Intel, who is working on bringing the Rust language up to parity with C in the field of systems programming, initially proposed to add an option in Kconfig for Rust support that would not include Rust compiler dependencies during builds with the 'make allnoconfig' and 'make allyesconfig' settings, allowing for more flexibility in experimenting with Rust code. A similar trick was implemented when experimental support for building with Clang in link-time optimization mode (LTO), after which it is planned to add builds with command execution flow protection (, Control-Flow Integrity).
Linus disagreed and expressed concern that initial Rust support would not be tested for builds and risk getting mired in a situation where a small group of developers interested in the project checks the code only under their specific conditions and adds incorrect things, as they remain hidden and do not surface during kernel testing in other environments.
According to Linus, the first Rust driver should be proposed in a simple format, where failures will be obvious and easy to detect. To simplify testing, he recommended proceeding similarly to how C compiler versions and supported flags are checked — verifying the presence of the Rust compiler on the system and enabling support if it is installed.
Source: opennet.ru
