Skip to content

Commit d72964e

Browse files
authored
Merge pull request #138 from ojeda/quick-start
Some improvements for `quick-start.rst`
2 parents e273fff + a989492 commit d72964e

File tree

1 file changed

+27
-5
lines changed

1 file changed

+27
-5
lines changed

Documentation/rust/quick-start.rst

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ Quick Start
66
This document describes how to get started with kernel development in Rust.
77
If you have worked previously with Rust, this will only take a moment.
88

9+
Please note that, at the moment, a very restricted subset of architectures
10+
is supported, see :doc:`/rust/arch-support`.
11+
912

1013
Requirements: Building
1114
----------------------
@@ -49,6 +52,29 @@ repository into the installation folder of your nightly toolchain::
4952
git clone --recurse-submodules https://github.com/rust-lang/rust $(rustc --print sysroot)/lib/rustlib/src/rust
5053

5154

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+
5278
bindgen
5379
*******
5480

@@ -57,11 +83,7 @@ the ``bindgen`` tool. A recent version should work, e.g. ``0.56.0``.
5783

5884
Install it via (this will build the tool from source)::
5985

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
6587

6688

6789
Requirements: Developing

0 commit comments

Comments
 (0)