Skip to content

Commit d0fde0a

Browse files
committed
Add rust-analyzer notes to quick-start.rst
1 parent 30d13c6 commit d0fde0a

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,3 +162,6 @@ x509.genkey
162162

163163
# Documentation toolchain
164164
sphinx_*/
165+
166+
# Rust analyzer configuration
167+
rust-project.json

Documentation/rust/quick-start.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,24 @@ the component manually::
145145
The standalone installers also come with ``rustdoc``.
146146

147147

148+
rust-analyzer
149+
*************
150+
151+
The `rust-analyzer <https://rust-analyzer.github.io/>`_ language server can
152+
be used with many editors to enable syntax highlighting, completion, go to
153+
definition, and other features.
154+
155+
``rust-analyzer`` will need to be
156+
`configured <https://rust-analyzer.github.io/manual.html#non-cargo-based-projects>`_
157+
to work with the kernel by adding a ``rust-project.json`` file in the root folder.
158+
The example ``Documentation/rust/rust-project.json`` can
159+
be used after updating ``sysroot_src`` and including the relevant modules.
160+
The path to ``sysroot_src`` is given by::
161+
162+
$(rustc --print sysroot)/lib/rustlib/src/rust/library
163+
164+
165+
148166
Configuration
149167
-------------
150168

0 commit comments

Comments
 (0)