@@ -6,6 +6,9 @@ Quick Start
6
6
This document describes how to get started with kernel development in Rust.
7
7
If you have worked previously with Rust, this will only take a moment.
8
8
9
+ Please note that, at the moment, a very restricted subset of architectures
10
+ is supported, see :doc: `/rust/arch-support `.
11
+
9
12
10
13
Requirements: Building
11
14
----------------------
@@ -49,6 +52,29 @@ repository into the installation folder of your nightly toolchain::
49
52
git clone --recurse-submodules https://github.com/rust-lang/rust $(rustc --print sysroot)/lib/rustlib/src/rust
50
53
51
54
55
+ libclang
56
+ ********
57
+
58
+ ``libclang `` (part of LLVM) is used by ``bindgen `` to understand the C code
59
+ in the kernel, which means you will need a recent LLVM installed; like when
60
+ you compile the kernel with ``CC=clang `` or ``LLVM=1 ``.
61
+
62
+ Your Linux distribution is likely to have a suitable one available, so it is
63
+ best if you check that first.
64
+
65
+ There are also some binaries for several systems and architectures uploaded at:
66
+
67
+ https://releases.llvm.org/download.html
68
+
69
+ For Debian-based distributions, you can also fetch them from:
70
+
71
+ https://apt.llvm.org
72
+
73
+ Otherwise, building LLVM takes quite a while, but it is not a complex process:
74
+
75
+ https://llvm.org/docs/GettingStarted.html#getting-the-source-code-and-building-llvm
76
+
77
+
52
78
bindgen
53
79
*******
54
80
@@ -57,11 +83,7 @@ the ``bindgen`` tool. A recent version should work, e.g. ``0.56.0``.
57
83
58
84
Install it via (this will build the tool from source)::
59
85
60
- cargo install --version 0.56.0 bindgen
61
-
62
- This tool uses ``libclang `` (LLVM) to understand the C code in the kernel,
63
- which means you will need a recent LLVM installed; like when you compile
64
- the kernel with ``CC=clang `` or ``LLVM=1 ``.
86
+ cargo install --locked --version 0.56.0 bindgen
65
87
66
88
67
89
Requirements: Developing
0 commit comments