Skip to content

Commit ac7ccbf

Browse files
committed
docs: rust: update with new required versions
Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 7323d99 commit ac7ccbf

File tree

2 files changed

+29
-11
lines changed

2 files changed

+29
-11
lines changed

Documentation/process/changes.rst

+6-2
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,17 @@ running a Linux kernel. Also, not all tools are necessary on all
2626
systems; obviously, if you don't have any PC Card hardware, for example,
2727
you probably needn't concern yourself with pcmciautils.
2828

29+
Furthermore, note that newer versions of the Rust toolchain may or may not work
30+
because, for the moment, we depend on some unstable features. Thus, unless you
31+
know what you are doing, use the exact version listed here. Please see
32+
:ref:`Documentation/rust/quick-start.rst <rust_quick_start>` for details.
33+
2934
====================== =============== ========================================
3035
Program Minimal version Command to check the version
3136
====================== =============== ========================================
3237
GNU C 4.9 gcc --version
3338
Clang/LLVM (optional) 10.0.1 clang --version
34-
rustc (optional) nightly rustc --version
39+
rustc (optional) 1.54.0-beta.1 rustc --version
3540
bindgen (optional) 0.56.0 bindgen --version
3641
GNU make 3.81 make --version
3742
binutils 2.23 ld -v
@@ -57,7 +62,6 @@ iptables 1.4.2 iptables -V
5762
openssl & libcrypto 1.0.0 openssl version
5863
bc 1.06.95 bc --version
5964
Sphinx\ [#f1]_ 1.3 sphinx-build --version
60-
rustdoc (optional) nightly rustdoc --version
6165
====================== =============== ========================================
6266

6367
.. [#f1] Sphinx is needed only to build the Kernel documentation

Documentation/rust/quick-start.rst

+23-9
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ at the time of writing, they are likely to not be recent enough.
2323
rustc
2424
*****
2525

26-
A recent *nightly* Rust toolchain (with, at least, ``rustc``) is required,
27-
e.g. ``nightly-2021-05-29``. Our goal is to use a stable toolchain as soon
28-
as possible, but for the moment we depend on a handful of nightly features.
26+
A particular version (`1.54.0-beta.1`) of the Rust compiler is required.
27+
Newer versions may or may not work because, for the moment, we depend on
28+
some unstable Rust features.
2929

3030
If you are using ``rustup``, run::
3131

32-
rustup default nightly-2021-05-29
32+
rustup default beta-2021-06-23
3333

3434
Otherwise, fetch a standalone installer or install ``rustup`` from:
3535

@@ -125,16 +125,30 @@ the component manually::
125125
The standalone installers also come with ``clippy``.
126126

127127

128+
cargo
129+
*****
130+
131+
``cargo`` is the Rust native build system. It is currently required to run
132+
the tests (``rusttest`` target) since we use it to build a custom standard
133+
library that contains the facilities provided by our custom ``alloc``.
134+
135+
If you are using ``rustup``, all the profiles already install the tool,
136+
so you should be good to go. The standalone installers also include ``cargo``.
137+
138+
128139
rustdoc
129140
*******
130141

131-
If you install the ``rustdoc`` tool, then you will be able to generate pretty
132-
HTML documentation for Rust code, including for the libraries (crates) inside
133-
``rust/`` that are used by the rest of the kernel (for details, please see
134-
:ref:`Documentation/rust/docs.rst <rust_docs>`).
142+
``rustdoc`` is the documentation tool for Rust. It generates pretty HTML
143+
documentation for Rust code (for details, please see
144+
:ref:`Documentation/rust/docs.rst <rust_docs>`.
145+
146+
``rustdoc`` is also able to test the examples provided in documented Rust code
147+
(called doctests or documentation tests). We use this feature, thus ``rustdoc``
148+
is required to run the tests (``rusttest`` target).
135149

136150
If you are using ``rustup``, all the profiles already install the tool,
137-
so you should be good to go. The standalone installers also come with ``rustdoc``.
151+
so you should be good to go. The standalone installers also include ``rustdoc``.
138152

139153

140154
rust-analyzer

0 commit comments

Comments
 (0)