source: general/prog/rust.xml@ 32ced17

12.1 12.2 gimp3 ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/for-12.3 xry111/llvm18 xry111/spidermonkey128
Last change on this file since 32ced17 was b6d54494, checked in by Xi Ruoyao <xry111@…>, 12 months ago

building-notes: Note how to use cgroup for limiting resource usage

We were saying "-jN means using N cores (or N threads)". This is
completely wrong. "-jN" only tells the building system to run N jobs
simultaneously, but each job can start their own subprocesses or threads
and there is no way for the building system to know how many
subprocesses or threads a job will start.

This caused a lot of misunderstandings and encouraged users to wrongly
blame building systems.

Fix the description of -jN, and add how to use cgroup to control the
usage of CPU cores and system RAM.

On a systemd-based system, systemd is the cgroup manager and manually
operating on cgroups may puzzle systemd. So use systemd-run for
creating and setting up cgroup. On a sysv-based system create and set
up the cgroup manually.

  • Property mode set to 100644
File size: 28.9 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY rust-download-http "https://static.rust-lang.org/dist/rustc-&rust-version;-src.tar.xz">
8 <!ENTITY rust-download-ftp " ">
9 <!ENTITY rust-md5sum "4125b8bf1b0bc6a520f8ec21252322e7">
10 <!ENTITY rust-size "145 MB">
11 <!ENTITY rust-buildsize "8.9 GB (292 MB installed); add 6.4 GB if running the tests">
12 <!ENTITY rust-time "6.7 SBU (including download time; add 6.2 SBU for tests, both using parallelism=8)">
13]>
14
15<sect1 id="rust" xreflabel="rustc-&rust-version;">
16 <?dbhtml filename="rust.html"?>
17
18
19 <title>Rustc-&rust-version;</title>
20
21 <indexterm zone="rust">
22 <primary sortas="a-rust">Rust</primary>
23 </indexterm>
24
25 <sect2 role="package">
26 <title>Introduction to Rust</title>
27 <para>
28 The <application>Rust</application> programming language is designed
29 to be a safe, concurrent, practical language.
30 </para>
31
32 <para>
33 This package is updated on a six-weekly release cycle. Because it is
34 such a large and slow package to build, is at the moment only required
35 by a few packages in this book, and particularly because newer versions
36 tend to break older mozilla packages, the BLFS editors take the view that
37 it should only be updated when that is necessary (either to fix problems,
38 or to allow a new version of a package to build).
39 </para>
40
41 <para>
42 As with many other programming languages, rustc (the rust compiler)
43 needs a binary from which to bootstrap. It will download a stage0
44 binary at the start of the build, so you cannot compile it without an
45 Internet connection.
46 </para>
47
48 <note>
49 <para>
50 Although BLFS usually installs in <filename
51 class="directory">/usr</filename>, when you later upgrade to a newer
52 version of <application>rust</application> the old libraries in <filename
53 class="directory">/usr/lib/rustlib</filename> will remain, with various
54 hashes in their names, but will not be usable and will waste space. The
55 editors recommend placing the files in the <filename
56 class="directory">/opt</filename> directory. In particular, if you
57 have reason to rebuild with a modified configuration (e.g. using the
58 shipped LLVM after building with shared LLVM, perhaps to compile crates
59 for architectures which the BLFS LLVM build does not support)
60 it is possible for the install to leave a broken
61 <command>cargo</command> program. In such a situation, either remove
62 the existing installation first, or use a different prefix such as
63 /opt/rustc-&rust-version;-build2.
64 </para>
65
66 <para>
67 If you prefer, you can of course change the prefix to <filename
68 class="directory">/usr</filename>.
69 </para>
70 </note>
71
72 <para>
73 The current <application>rustbuild</application> build-system will use
74 all processors, although it does not scale well and often falls
75 back to just using one core while waiting for a library to compile.
76 However it can be mostly limited to a specified number of processors by
77 a combination of adding the switch <literal>--jobs &lt;N&gt;</literal>
78 (e.g. '--jobs 4' to limit to 4 processors) on each invocation of
79 <command>python3 x.py</command> <emphasis>and</emphasis> using an
80 environment variable <envar>CARGO_BUILD_JOBS=&lt;N&gt;</envar>. At the
81 moment this is not effective when some of the rustc tests are run.
82 </para>
83
84 <para>
85 The current version of rust's num_cpus crate now recognizes that cgroups
86 can be used to restrict which processors it is allowed to use. So if your
87 machine lacks DRAM (typically, less than 2GB DRAM per core) that might be
88 an alternative to taking CPUs offline.
89 Read <xref linkend='build-in-cgroup'/> for how to use a cgroup.
90 </para>
91
92 <para>
93 At the moment <application>Rust</application> does not provide any
94 guarantees of a stable ABI.
95 </para>
96
97 <note>
98 <para>
99 Rustc defaults to building for ALL supported architectures, using a
100 shipped copy of LLVM. In BLFS the build is only for the X86
101 architecture.
102 If you intend to develop rust crates, this build may not be good
103 enough for your purposes.
104 </para>
105 <para>
106 The build times of this version when repeated on the same machine are
107 often reasonably consistent, but as with all compilations using
108 <command>rustc</command> there can be some very slow outliers.
109 </para>
110 </note>
111
112 &lfs120_checked;
113
114 <bridgehead renderas="sect3">Package Information</bridgehead>
115 <itemizedlist spacing="compact">
116 <listitem>
117 <para>
118 Download (HTTP): <ulink url="&rust-download-http;"/>
119 </para>
120 </listitem>
121 <listitem>
122 <para>
123 Download (FTP): <ulink url="&rust-download-ftp;"/>
124 </para>
125 </listitem>
126 <listitem>
127 <para>
128 Download MD5 sum: &rust-md5sum;
129 </para>
130 </listitem>
131 <listitem>
132 <para>
133 Download size: &rust-size;
134 </para>
135 </listitem>
136 <listitem>
137 <para>
138 Estimated disk space required: &rust-buildsize;
139 </para>
140 </listitem>
141 <listitem>
142 <para>
143 Estimated build time: &rust-time;
144 </para>
145 </listitem>
146 </itemizedlist>
147
148<!--<bridgehead renderas="sect3">Additional Downloads</bridgehead>
149 <itemizedlist spacing="compact">
150 <listitem>
151 <para>
152 Required patch:
153 <ulink url="&patch-root;/rustc-&rust-version;-llvm9_fixes-1.patch"/>
154 </para>
155 </listitem>
156 </itemizedlist>-->
157
158 <bridgehead renderas="sect3">Rust Dependencies</bridgehead>
159
160 <bridgehead renderas="sect4">Required</bridgehead>
161 <para role="required">
162 <xref linkend="cmake"/> and
163 <!-- Required for downloading stage 0 binaries.
164 Otherwise it's recommended (if not installed, a vendored copy
165 will be built). -->
166 <xref linkend="curl"/>
167 </para>
168
169 &build-use-internet;
170
171 <bridgehead renderas="sect4">Recommended</bridgehead>
172 <para role="recommended">
173 <xref linkend="libssh2"/> and
174 <xref linkend="llvm"/>
175 (built with -DLLVM_LINK_LLVM_DYLIB=ON so that rust can link to
176 system LLVM instead of building its shipped version)
177 </para>
178
179 <note>
180 <para>
181 If a recommended dependency is not installed, a shipped copy in the
182 Rustc source tarball will be built and used.
183 </para>
184 </note>
185
186 <bridgehead renderas="sect4">Optional</bridgehead>
187 <para role="optional">
188 <xref linkend="gdb"/> (used by the test suite if it is present),
189 <xref linkend="git"/> (required by the test suite), and
190 <ulink url='https://libgit2.org/'>libgit2</ulink>
191 </para>
192
193 <para condition="html" role="usernotes">
194 Editor Notes: <ulink url="&blfs-wiki;/rust"/>
195 </para>
196 </sect2>
197
198 <sect2 role="installation">
199 <title>Installation of Rust</title>
200
201 <note>
202 <para>
203 Currently the rust compiler produces SSE2 instructions for 32-bit x86,
204 causing the generated code to be broken on 32-bit systems without a
205 SSE2-capable processor. All x86 processor models released after
206 2004 should be SSE2-capable. Run
207 <command>lscpu | grep sse2</command> as a test. If it outputs
208 anything, your CPU is SSE2-capable and OK. Otherwise you may try
209 to build this package <emphasis>on a SSE2-capable system</emphasis>
210 with the following fix applied:
211 </para>
212
213 <!-- computeroutput used deliberately to stop anyone from copying
214 blindly -->
215<screen role="nodump"><computeroutput>sed 's@pentium4@pentiumpro@' -i \
216 compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs</computeroutput></screen>
217
218 <para>
219 And copy the resulting
220 <filename class="directory">/opt/rustc-&rust-version;</filename>
221 to the system without SSE2 capability. But this change is still
222 under upstream review and not tested by BLFS editors.
223 </para>
224 </note>
225
226 <para>
227 To install into the
228 <filename class="directory">/opt</filename> directory, remove any
229 existing <filename>/opt/rustc</filename> symlink
230 and create a new directory (i.e. with a different name if trying a
231 modified build of the same version).
232 As the <systemitem class="username">root</systemitem>
233 user:
234 </para>
235
236<screen role="root"><userinput>mkdir -pv /opt/rustc-&rust-version; &amp;&amp;
237ln -svfn rustc-&rust-version; /opt/rustc</userinput></screen>
238
239 <note>
240 <para>
241 If multiple versions of <application>Rust</application> are installed
242 in <filename class="directory">/opt</filename>, changing to another
243 version only requires changing the <filename> /opt/rustc</filename>
244 symbolic link and then running <command>ldconfig</command>.
245 </para>
246 </note>
247
248 <para>
249 Create a suitable <filename>config.toml</filename> file which will
250 configure the build.
251 </para>
252
253<screen><userinput>cat &lt;&lt; EOF &gt; config.toml
254<literal># see config.toml.example for more possible options
255# See the 8.4 book for an old example using shipped LLVM
256# e.g. if not installing clang, or using a version before 13.0
257
258# tell x.py to not keep printing an annoying warning
259changelog-seen = 2
260
261[llvm]
262# by default, rust will build for a myriad of architectures
263targets = "X86"
264
265# When using system llvm prefer shared libraries
266link-shared = true
267
268[build]
269# omit docs to save time and space (default is to build them)
270docs = false
271
272# install extended tools: cargo, clippy, etc
273extended = true
274
275# Do not query new versions of dependencies online.
276locked-deps = true
277
278# Specify which extended tools (those from the default install).
279tools = ["cargo", "clippy", "rustdoc", "rustfmt"]
280
281# Use the source code shipped in the tarball for the dependencies.
282# The combination of this and the "locked-deps" entry avoids downloading
283# many crates from Internet, and makes the Rustc build more stable.
284vendor = true
285
286[install]
287prefix = "/opt/rustc-&rust-version;"
288docdir = "share/doc/rustc-&rust-version;"
289
290[rust]
291channel = "stable"
292description = "for BLFS &version;"
293
294# BLFS used to not install the FileCheck executable from llvm,
295# so disabled codegen tests. The assembly tests rely on FileCheck
296# and cannot easily be disabled, so those will anyway fail if
297# FileCheck has not been installed.
298#codegen-tests = false
299
300[target.x86_64-unknown-linux-gnu]
301# NB the output of llvm-config (i.e. help options) may be
302# dumped to the screen when config.toml is parsed.
303llvm-config = "/usr/bin/llvm-config"
304
305[target.i686-unknown-linux-gnu]
306# NB the output of llvm-config (i.e. help options) may be
307# dumped to the screen when config.toml is parsed.
308llvm-config = "/usr/bin/llvm-config"</literal>
309EOF</userinput></screen>
310
311<!--<para>
312 Adapt rustc to allow it to build and function with the changes in LLVM-9:
313 </para>
314
315<screen><userinput remap="pre">patch -Np1 -i ../rustc-&rust-version;-llvm9_fixes-1.patch</userinput></screen>-->
316
317 <para>
318 Compile <application>Rust</application> by running the following
319 commands:
320 </para>
321
322<!-- fixed in 1.58.0, retain as a reminder that fixed crates can be used
323<screen><userinput>sed -i -e '/^curl /s/0.4.38/0.4.40/' \
324 -e '/^curl-sys /s/0.4.48/0.4.50/' \
325 src/tools/cargo/Cargo.toml &amp;&amp; -->
326
327<screen><userinput>{ [ ! -e /usr/include/libssh2.h ] ||
328 export LIBSSH2_SYS_USE_PKG_CONFIG=1; } &amp;&amp;
329python3 x.py build</userinput></screen>
330
331 <note>
332 <para>
333 The test suite will generate some messages in the
334 <phrase revision="sysv">system log</phrase>
335 <phrase revision="systemd">systemd journal</phrase>
336 for traps on invalid opcodes, and for segmentation faults.
337 In themselves these are nothing to worry about, just a way for the
338 test to be terminated.
339 </para>
340 </note>
341
342 <para>
343 To run the tests (again using all available CPUs) issue:
344 </para>
345
346<screen remap="test"><userinput>mkdir -pv .github/workflows &amp;&amp;
347python3 x.py run src/tools/expand-yaml-anchors &amp;&amp;
348SSL_CERT_DIR=/etc/ssl/certs \
349python3 x.py test --verbose --no-fail-fast | tee rustc-testlog</userinput></screen>
350
351 <!-- https://github.com/rust-lang/rust/issues/112209
352 I only saw 2 failures with 1.71.1, but Rainer saw 6 ones.
353 I don't want to find out the maximum number (by building rustc
354 in somewhere like /a/very/long/long/long/.../long/path) so I'd
355 just omit the exact number of failures here. -->
356 <para>
357 Some <literal>ui</literal> tests may fail (the number of failures
358 depends on the length of the absolute path to the
359 <filename class='directory'>rustc-&rust-version;-src</filename>
360 directory). These failures can be identified by viewing the
361 <filename>rustc-testlog</filename> file and search for the
362 <computeroutput>note: the full type name has been written
363 to</computeroutput>... messages and they can be safely ignored.
364 </para>
365
366 <para>
367 If <command>FileCheck</command> from <application>LLVM</application> has
368 not been installed, all 47 tests from the <quote>assembly</quote> suite
369 will fail.
370 </para>
371
372 <para>
373 On some systems, scripting the tests may result in the tests hanging on
374 <filename>test: combine_install_with_separate_uninstall</filename>. If
375 this happens, the problem can be worked around by pressing the Enter key.
376 The test can also be removed with:
377 </para>
378
379<screen role="nodump"><userinput>sed -e '/runtest combine_install_with/s/^/#/g' -i src/tools/rust-installer/test.sh</userinput></screen>
380
381 <para>
382 As with all large test suites, other tests might fail on some machines -
383 if the number of additional failures is low,
384 check the log for 'failures:' and review lines above that, particularly the
385 'stderr:' lines. Any mention of
386 SIGSEGV or signal 11 in a failing test is a cause for concern.
387 </para>
388
389 <para>
390 If you get any <emphasis>other</emphasis> failing test which reports an
391 issue number then you should search for that issue. For example, when
392 rustc &gt;= 1.41.1 was built with a version of sysllvm before 10.0 the test
393 for issue 69225 failed <ulink
394 url="https://github.com/rust-lang/rust/issues/69225"/> and that should be
395 regarded as a critical failure (they released 1.41.1 because of it).
396 Most other failures will not be critical.
397 </para>
398
399 <para>
400 Therefore, you should determine the number of failures.
401 </para>
402
403 <para>
404 The number of tests which passed and failed can be found by running:
405 </para>
406
407<!-- split into two lines for narrower screen windows -->
408<screen remap="test"><userinput>grep '^test result:' rustc-testlog |
409 awk '{sum1 += $4; sum2 += $6} END { print sum1 " passed; " sum2 " failed" }'</userinput></screen>
410
411 <para>
412 The other available fields are $8 for those which were ignored
413 (i.e. skipped), $10 for 'measured' and $12 for 'filtered out' but both
414 those last two are probably zero.
415 </para>
416
417 <para>
418 Now, as the &root; user, install the package:
419 </para>
420
421 <note>
422 <para>
423 If <command>sudo</command> or <command>su</command> is invoked for
424 switching to the &root; user, ensure
425 <envar>LIBSSH2_SYS_USE_PKG_CONFIG</envar> is correctly passed or the
426 following command may completely rebuild this package. For
427 <command>sudo</command>, use the
428 <option>--preserve-env=LIBSSH2_SYS_USE_PKG_CONFIG</option> option.
429 For <command>su</command>, do <emphasis>not</emphasis> use the
430 <option>-</option> or <option>--login</option>.
431 </para>
432 </note>
433
434<screen role='root'><userinput>python3 x.py install</userinput></screen>
435
436 <!-- TODO: Report to upstream if this persists in the next release -->
437 <para>
438 The building system attempts to install some files twice, and during
439 the second attempt it renames the old one (installed in the first
440 attempt) with the <filename class='extension'>.old</filename> suffix.
441 As the &root; user, remove these files:
442 </para>
443
444 <screen role='root'><userinput>find /opt/rustc-&rust-version; -name "*.old" -delete</userinput></screen>
445
446 <para>
447 Still as the &root; user, symlink a <application>Zsh</application>
448 completion file into the correct location:
449 </para>
450
451<screen role='root'><userinput>install -vdm755 /usr/share/zsh/site-functions &amp;&amp;
452ln -sfv /opt/rustc/share/zsh/site-functions/_cargo \
453 /usr/share/zsh/site-functions</userinput></screen>
454
455 </sect2>
456
457 <sect2 role="commands">
458 <title>Command Explanations</title>
459
460 <para>
461 <command>ln -svfn rustc-&rust-version; /opt/rustc</command>: if this is
462 not the first use of the <filename class="directory">/opt/rustc</filename>
463 symlink, overwrite it by forcing, and use the '-n' flag to avoid getting
464 confusing results from e.g. <command>ls -l</command>.
465 </para>
466
467 <para>
468 <literal>targets = "X86"</literal>: this avoids building all the available
469 linux cross-compilers (AArch64, MIPS, PowerPC, SystemZ, etc). Unfortunately,
470 rust insists on installing source files for these below
471 <filename class="directory">/opt/rustc/lib/src</filename>.
472 </para>
473
474 <para>
475 <literal>extended = true</literal>: this installs several tools
476 (specified by the <literal>tools</literal> entry) alongside
477 <command>rustc</command>.
478 </para>
479
480 <para>
481 <literal>tools = ["cargo", "clippy", "rustdoc", "rustfmt"]</literal>:
482 only build the tools from the 'default' profile in binary command
483 <command>rustup</command> which are recommended for most users.
484 The other tools are unlikely to be useful unless using (old) code
485 analyzers or editing the standard library.
486 </para>
487
488 <para>
489 <literal>channel = "stable"</literal>: this ensures only stable features
490 can be used, the default in <filename>config.toml</filename> is to use
491 development features, which is not appropriate for a released version.
492 </para>
493
494 <!-- comment while using shipped LLVM -->
495 <para>
496 <literal>[target.x86_64-unknown-linux-gnu]</literal>: the syntax of
497 <filename>config.toml</filename> requires an <literal>llvm-config</literal>
498 entry for each target for which system-llvm is to be used. Change the target
499 to <literal>[target.i686-unknown-linux-gnu]</literal> if you are building
500 on 32-bit x86. This whole section may be omitted if you wish to build
501 against the shipped llvm, or do not have clang, but the resulting build will
502 be larger and take longer.
503 </para>
504
505<!--<para>
506 <command>sed -i -e '/^curl /s/0.4.38/0.4.40/' ... </command>: two crates
507 normally downloaded for this release do not correctly initialise
508 <application>curl</application> if using
509 <application>openssl-3.0.0</application>. Upstream has fixed that for a
510 future release, this sed causes the fixed versions to be used.
511 </para>-->
512
513 <!-- https://github.com/alexcrichton/ssh2-rs/issues/173 -->
514 <para>
515 <command>export LIBSSH2_SYS_USE_PKG_CONFIG=1</command>: Allow
516 <command>cargo</command> to link to system libssh2.
517 </para>
518
519<!--<para>
520 <command>export RUSTFLAGS="$RUSTFLAGS -C link-args=-lffi"</command>:
521 This adds a link to libffi to any RUSTFLAGS you may already be passing
522 to the build. On some systems, linking fails to include libffi unless
523 this is used. The reason why this is needed is not clear.
524 2023-01-14 : assumed to be no longer needed, but it is some years
525 since one person reported needing this, keep it commented for the moment.
526 </para>-->
527
528 <!-- https://github.com/alexcrichton/openssl-probe/issues/25 -->
529 <para>
530 <envar>SSL_CERT_DIR=/etc/ssl/certs</envar>: Work around an issue
531 causing test failures with the CA certificate store layout used by
532 <xref linkend='make-ca'/>.
533 </para>
534
535 <para>
536 <parameter>--verbose</parameter>: this switch can sometimes provide more
537 information about a test which fails.
538 </para>
539
540 <para>
541 <parameter>--no-fail-fast</parameter>: this switch ensures that the test suite
542 will not stop at the first error.
543 </para>
544
545 </sect2>
546
547 <sect2 role="configuration">
548 <title>Configuring Rust</title>
549
550 <sect3 id="rustc-config">
551 <title>Configuration Information</title>
552
553 <para>
554 If you installed <application>rustc</application> in
555 <filename class="directory">/opt</filename>, you need to update the
556 following configuration files so that <application>rustc</application>
557 is correctly found by other packages and system processes.
558 </para>
559
560 <para>
561 As the <systemitem class="username">root</systemitem> user, create
562 the <filename>/etc/profile.d/rustc.sh</filename> file:
563 </para>
564
565<screen role="root"><userinput>cat &gt; /etc/profile.d/rustc.sh &lt;&lt; "EOF"
566<literal># Begin /etc/profile.d/rustc.sh
567
568pathprepend /opt/rustc/bin PATH
569
570# Include /opt/rustc/man in the MANPATH variable to access manual pages
571pathappend /opt/rustc/share/man MANPATH
572
573# End /etc/profile.d/rustc.sh</literal>
574EOF</userinput></screen>
575
576 <para>
577 Immediately after installation, update the current PATH
578 for your current shell as a normal user:
579 </para>
580
581<screen><userinput>source /etc/profile.d/rustc.sh</userinput></screen>
582
583 </sect3>
584 </sect2>
585
586
587 <sect2 role="content">
588 <title>Contents</title>
589
590 <segmentedlist>
591 <segtitle>Installed Programs</segtitle>
592 <segtitle>Installed Libraries</segtitle>
593 <segtitle>Installed Directories</segtitle>
594
595 <seglistitem>
596 <seg>
597 cargo-clippy, cargo-fmt, cargo, clippy-driver, rust-gdb,
598 rust-gdbgui, rust-lldb, rustc, rustdoc, and rustfmt
599 </seg>
600 <seg>
601 librustc-driver-&lt;16-byte-hash&gt;.so,
602 libstd-&lt;16-byte-hash&gt;.so, and
603 libtest-&lt;16-byte-hash&gt;.so
604 </seg>
605 <seg>
606 ~/.cargo,
607 /opt/rustc, symbolic link to
608 /opt/rustc-&rust-version;
609 </seg>
610 </seglistitem>
611 </segmentedlist>
612
613 <variablelist>
614 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
615 <?dbfo list-presentation="list"?>
616 <?dbhtml list-presentation="table"?>
617
618 <varlistentry id="cargo-clippy">
619 <term><command>cargo-clippy</command></term>
620 <listitem>
621 <para>
622 provides lint checks for a cargo package
623 </para>
624 <indexterm zone="rust cargo-clippy">
625 <primary sortas="b-cargo-clippy">cargo-clippy</primary>
626 </indexterm>
627 </listitem>
628 </varlistentry>
629
630 <varlistentry id="cargo-fmt">
631 <term><command>cargo-fmt</command></term>
632 <listitem>
633 <para>
634 formats all bin and lib files of the current crate using
635 rustfmt
636 </para>
637 <indexterm zone="rust cargo-fmt">
638 <primary sortas="b-cargo-fmt">cargo-fmt</primary>
639 </indexterm>
640 </listitem>
641 </varlistentry>
642
643<!-- <varlistentry id="cargo-miri">
644 <term><command>cargo-miri</command></term>
645 <listitem>
646 <para>
647 is for use by Miri to interpret bin crates and tests. It is
648 not installed by default.
649 </para>
650 <indexterm zone="rust cargo-miri">
651 <primary sortas="b-cargo-miri">cargo-miri</primary>
652 </indexterm>
653 </listitem>
654 </varlistentry>-->
655
656 <varlistentry id="cargo">
657 <term><command>cargo</command></term>
658 <listitem>
659 <para>
660 is the Package Manager for Rust
661 </para>
662 <indexterm zone="rust cargo">
663 <primary sortas="b-cargo">cargo</primary>
664 </indexterm>
665 </listitem>
666 </varlistentry>
667
668 <varlistentry id="clippy-driver">
669 <term><command>clippy-driver</command></term>
670 <listitem>
671 <para>
672 provides lint checks for Rust
673 </para>
674 <indexterm zone="rust clippy-driver">
675 <primary sortas="b-clippy-driver">clippy-driver</primary>
676 </indexterm>
677 </listitem>
678 </varlistentry>
679
680<!-- <varlistentry id="miri">
681 <term><command>miri</command></term>
682 <listitem>
683 <para>
684 is an interpreter for Rust's mid-level intermediate representation
685 (MIR). It is not installed by default.
686 </para>
687 <indexterm zone="rust miri">
688 <primary sortas="b-miri">miri</primary>
689 </indexterm>
690 </listitem>
691 </varlistentry>
692
693 <varlistentry id="rls">
694 <term><command>rls</command></term>
695 <listitem>
696 <para>
697 is the Rust Language Server. This can run in the background to
698 provide IDEs, editors, and other tools with information about Rust
699 programs
700 </para>
701 <indexterm zone="rust rls">
702 <primary sortas="b-rls">rls</primary>
703 </indexterm>
704 </listitem>
705 </varlistentry>
706
707 <varlistentry id="rust-analyzer">
708 <term><command>rust-analyzer</command></term>
709 <listitem>
710 <para>
711 is an implementation of Language Server Protocol for the Rust
712 programming language.
713 </para>
714 <indexterm zone="rust rust-analyzer">
715 <primary sortas="b-rust-analyzer">rust-analyzer</primary>
716 </indexterm>
717 </listitem>
718 </varlistentry>
719
720 <varlistentry id="rust-demangler">
721 <term><command>rust-demangler</command></term>
722 <listitem>
723 <para>
724 converts a list of Rust mangled symbols into a
725 corresponding list of demangled symbols
726 </para>
727 <indexterm zone="rust rust-demangler">
728 <primary sortas="b-rust-demangler">rust-demangler</primary>
729 </indexterm>
730 </listitem>
731 </varlistentry> -->
732
733 <varlistentry id="rust-gdb">
734 <term><command>rust-gdb</command></term>
735 <listitem>
736 <para>
737 is a wrapper script for gdb, pulling in Python pretty-printing
738 modules installed in
739 <filename class="directory">/opt/rustc-&rust-version;/lib/rustlib/etc</filename>
740 </para>
741 <indexterm zone="rust rust-gdb">
742 <primary sortas="b-rust-gdb">rust-gdb</primary>
743 </indexterm>
744 </listitem>
745 </varlistentry>
746
747 <varlistentry id="rust-gdbgui">
748 <term><command>rust-gdbgui</command></term>
749 <listitem>
750 <para>
751 is a wrapper script for a graphical front end to gdb that runs in a
752 browser
753 </para>
754 <indexterm zone="rust rust-gdbgui">
755 <primary sortas="b-rust-gdbgui">rust-gdbgui</primary>
756 </indexterm>
757 </listitem>
758 </varlistentry>
759
760 <varlistentry id="rust-lldb">
761 <term><command>rust-lldb</command></term>
762 <listitem>
763 <para>
764 is a wrapper script for LLDB (the LLVM debugger)
765 pulling in the Python pretty-printing modules
766 </para>
767 <indexterm zone="rust rust-lldb">
768 <primary sortas="b-rust-lldb">rust=lldb</primary>
769 </indexterm>
770 </listitem>
771 </varlistentry>
772
773 <varlistentry id="rustc">
774 <term><command>rustc</command></term>
775 <listitem>
776 <para>
777 is the rust compiler
778 </para>
779 <indexterm zone="rust rustc">
780 <primary sortas="b-rustc">rustc</primary>
781 </indexterm>
782 </listitem>
783 </varlistentry>
784
785 <varlistentry id="rustdoc">
786 <term><command>rustdoc</command></term>
787 <listitem>
788 <para>
789 generates documentation from rust source code
790 </para>
791 <indexterm zone="rust rustdoc">
792 <primary sortas="b-rustdoc">rustdoc</primary>
793 </indexterm>
794 </listitem>
795 </varlistentry>
796
797 <varlistentry id="rustfmt">
798 <term><command>rustfmt</command></term>
799 <listitem>
800 <para>
801 formats rust code
802 </para>
803 <indexterm zone="rust rustfmt">
804 <primary sortas="b-rustfmt">rustfmt</primary>
805 </indexterm>
806 </listitem>
807 </varlistentry>
808
809 <varlistentry id="libstd">
810 <term><filename class="libraryfile">libstd-&lt;16-byte-hash&gt;.so</filename></term>
811 <listitem>
812 <para>
813 is the Rust Standard Library, the foundation of portable Rust software
814 </para>
815 <indexterm zone="rust libstd">
816 <primary sortas="c-libstd">libstd-&lt;16-byte-hash&gt;.so</primary>
817 </indexterm>
818 </listitem>
819 </varlistentry>
820 </variablelist>
821 </sect2>
822
823</sect1>
Note: See TracBrowser for help on using the repository browser.