Are the Linux kernel modules written in Rust able to work on older kernel versions?

Say I write a Linux kernel module with Rust. Is it possible for that module to work on all kernel versions, out-of-the-box, just like the ones written in C?

Linux changes it's driver api all the time, so if a driver works with multiple versions in a row, it may not work with the version after that. This is no different with rustc. The only difference between a C and a Rust kernel module is that for a C kernel module it may be possible to use a different version of the C compiler even if officially not supported and definitively not working when eg the layout randomization GCC plugin is used, while for Rust this is not possible.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.