Skip to content

Commit 0b02076

Browse files
ojedaJonathan Corbet
authored andcommitted
docs: programming-language: add Rust programming language section
Following the C text in the file, add a mention about the Rust programming language, the currently supported compiler and the edition used (similar to the "dialect" mention for C). Similarly, add a mention about the unstable features used (similar to the "extensions" mentions for C). In addition, add some links to complement the information. Signed-off-by: Miguel Ojeda <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Corbet <[email protected]>
1 parent 38484a1 commit 0b02076

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

Documentation/process/programming-language.rst

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,28 @@ in order to feature detect which ones can be used and/or to shorten the code.
3131

3232
Please refer to ``include/linux/compiler_attributes.h`` for more information.
3333

34+
Rust
35+
----
36+
37+
The kernel has experimental support for the Rust programming language
38+
[rust-language]_ under ``CONFIG_RUST``. It is compiled with ``rustc`` [rustc]_
39+
under ``--edition=2021`` [rust-editions]_. Editions are a way to introduce
40+
small changes to the language that are not backwards compatible.
41+
42+
On top of that, some unstable features [rust-unstable-features]_ are used in
43+
the kernel. Unstable features may change in the future, thus it is an important
44+
goal to reach a point where only stable features are used.
45+
46+
Please refer to Documentation/rust/index.rst for more information.
47+
3448
.. [c-language] http://www.open-std.org/jtc1/sc22/wg14/www/standards
3549
.. [gcc] https://gcc.gnu.org
3650
.. [clang] https://clang.llvm.org
3751
.. [gcc-c-dialect-options] https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html
3852
.. [gnu-extensions] https://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html
3953
.. [gcc-attribute-syntax] https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html
4054
.. [n2049] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2049.pdf
41-
55+
.. [rust-language] https://www.rust-lang.org
56+
.. [rustc] https://doc.rust-lang.org/rustc/
57+
.. [rust-editions] https://doc.rust-lang.org/edition-guide/editions/
58+
.. [rust-unstable-features] https://github.com/Rust-for-Linux/linux/issues/2

0 commit comments

Comments
 (0)