source: general/prog/rust.xml@ 7a3a458

trunk
Last change on this file since 7a3a458 was c1325868, checked in by Xi Ruoyao <xry111@…>, 6 weeks ago

rust: Work around upstream issue 94147 to save some build time

  • Property mode set to 100644
File size: 30.8 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
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 "14a8ac688b461a3127090cad513aee05">
10 <!ENTITY rust-size "155 MB">
11 <!ENTITY rust-buildsize "8.9 GB (298 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 &lfs121_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 Optional patch (recommended if running the test suite):
153 <ulink url="&patch-root;/rustc-&rust-version;-testsuite_fix-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"/>,
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), and
177 <xref linkend="sqlite"/>
178 </para>
179
180 <note>
181 <para>
182 If a recommended dependency is not installed, a shipped copy in the
183 Rustc source tarball will be built and used.
184 </para>
185 </note>
186
187 <bridgehead renderas="sect4">Optional</bridgehead>
188 <para role="optional">
189 <xref linkend="gdb"/> (used by the test suite if it is present),
190 <xref linkend="git"/> (required by the test suite),
191 <ulink url="https://github.com/bytecodealliance/wasmtime/tree/main/cranelift">cranelift</ulink>,
192 <ulink url="https://jemalloc.net/">jemalloc</ulink>,
193 libgccjit (read command explanation in
194 <xref role="nodep" linkend="gcc"/>), and
195 <ulink url='https://libgit2.org/'>libgit2</ulink>
196 </para>
197
198 <para condition="html" role="usernotes">
199 Editor Notes: <ulink url="&blfs-wiki;/rust"/>
200 </para>
201 </sect2>
202
203 <sect2 role="installation">
204 <title>Installation of Rust</title>
205
206 <note>
207 <para>
208 Currently the rust compiler produces SSE2 instructions for 32-bit x86,
209 causing the generated code to be broken on 32-bit systems without a
210 SSE2-capable processor. All x86 processor models released after
211 2004 should be SSE2-capable. Run
212 <command>lscpu | grep sse2</command> as a test. If it outputs
213 anything, your CPU is SSE2-capable and OK. Otherwise you may try
214 to build this package <emphasis>on a SSE2-capable system</emphasis>
215 with the following fix applied:
216 </para>
217
218 <!-- computeroutput used deliberately to stop anyone from copying
219 blindly -->
220<screen role="nodump"><computeroutput>sed 's@pentium4@pentiumpro@' -i \
221 compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs</computeroutput></screen>
222
223 <para>
224 And copy the resulting
225 <filename class="directory">/opt/rustc-&rust-version;</filename>
226 to the system without SSE2 capability. But this change is still
227 under upstream review and not tested by BLFS editors.
228 </para>
229 </note>
230
231 <para>
232 To install into the
233 <filename class="directory">/opt</filename> directory, remove any
234 existing <filename>/opt/rustc</filename> symlink
235 and create a new directory (i.e. with a different name if trying a
236 modified build of the same version).
237 As the <systemitem class="username">root</systemitem>
238 user:
239 </para>
240
241<screen role="root"><userinput>mkdir -pv /opt/rustc-&rust-version; &amp;&amp;
242ln -svfn rustc-&rust-version; /opt/rustc</userinput></screen>
243
244 <note>
245 <para>
246 If multiple versions of <application>Rust</application> are installed
247 in <filename class="directory">/opt</filename>, changing to another
248 version only requires changing the <filename> /opt/rustc</filename>
249 symbolic link and then running <command>ldconfig</command>.
250 </para>
251 </note>
252
253 <para>
254 If running the test suite, apply a patch to prevent the build
255 system from unnecessarily rebuilding the compiler:
256 </para>
257
258 <screen><userinput>patch -Np1 -i ../rustc-&rust-version;-testsuite_fix-1.patch</userinput></screen>
259
260 <para>
261 Create a suitable <filename>config.toml</filename> file which will
262 configure the build.
263 </para>
264
265<screen><userinput>cat &lt;&lt; EOF &gt; config.toml
266<literal># see config.toml.example for more possible options
267# See the 8.4 book for an old example using shipped LLVM
268# e.g. if not installing clang, or using a version before 13.0
269
270# Tell x.py the editors have reviewed the content of this file
271# and updated it to follow the major changes of the building system,
272# so x.py will not warn us to do such a review.
273change-id = 118703
274
275[llvm]
276# by default, rust will build for a myriad of architectures
277targets = "X86"
278
279# When using system llvm prefer shared libraries
280link-shared = true
281
282[build]
283# omit docs to save time and space (default is to build them)
284docs = false
285
286# install extended tools: cargo, clippy, etc
287extended = true
288
289# Do not query new versions of dependencies online.
290locked-deps = true
291
292# Specify which extended tools (those from the default install).
293tools = ["cargo", "clippy", "rustdoc", "rustfmt"]
294
295# Use the source code shipped in the tarball for the dependencies.
296# The combination of this and the "locked-deps" entry avoids downloading
297# many crates from Internet, and makes the Rustc build more stable.
298vendor = true
299
300[install]
301prefix = "/opt/rustc-&rust-version;"
302docdir = "share/doc/rustc-&rust-version;"
303
304[rust]
305channel = "stable"
306description = "for BLFS &version;"
307
308# BLFS used to not install the FileCheck executable from llvm,
309# so disabled codegen tests. The assembly tests rely on FileCheck
310# and cannot easily be disabled, so those will anyway fail if
311# FileCheck has not been installed.
312#codegen-tests = false
313
314# Enable the same optimizations as the official upstream build.
315lto = "thin"
316codegen-units = 1
317
318[target.x86_64-unknown-linux-gnu]
319# NB the output of llvm-config (i.e. help options) may be
320# dumped to the screen when config.toml is parsed.
321llvm-config = "/usr/bin/llvm-config"
322
323[target.i686-unknown-linux-gnu]
324# NB the output of llvm-config (i.e. help options) may be
325# dumped to the screen when config.toml is parsed.
326llvm-config = "/usr/bin/llvm-config"</literal>
327EOF</userinput></screen>
328
329 <note>
330 <para>
331 The <command>python3 x.py</command> commands may output a warning
332 message complaining <quote><computeroutput>no codegen-backends
333 config matched the requested path to build a codegen
334 backend</computeroutput></quote>. And the provided
335 <quote>suggestion</quote> (<computeroutput>add backend to
336 codegen-backends in config.toml</computeroutput>) will not silence
337 it. This warning is <ulink
338 url='https://github.com/rust-lang/rust/issues/110692'>bogus</ulink>
339 and it should be ignored.
340 </para>
341 </note>
342
343 <!-- https://github.com/rust-lang/rust/pull/116672 -->
344 <para>
345 If building with system <xref linkend='llvm'/>,
346 adapt rustc to allow it to build and function with the changes in
347 LLVM-18:
348 </para>
349
350<screen><userinput remap="pre">sed 's/f[0-9][0-9]:/i128:128-&amp;/' \
351 -i compiler/rustc_target/src/spec/targets/{i?86,x86_64}*.rs &amp;&amp;
352sed '/static_assert_size!\((Lit|MetaItemLit|BasicBlockData|Terminator)/d' \
353 -ri compiler/{rustc_ast/src/ast.rs,rustc_middle/src/mir/mod.rs}</userinput></screen>
354
355 <para>
356 Compile <application>Rust</application> by running the following
357 commands:
358 </para>
359
360<!-- fixed in 1.58.0, retain as a reminder that fixed crates can be used
361<screen><userinput>sed -i -e '/^curl /s/0.4.38/0.4.40/' \
362 -e '/^curl-sys /s/0.4.48/0.4.50/' \
363 src/tools/cargo/Cargo.toml &amp;&amp; -->
364
365<screen><userinput>{ [ ! -e /usr/include/libssh2.h ] ||
366 export LIBSSH2_SYS_USE_PKG_CONFIG=1; } &amp;&amp;
367{ [ ! -e /usr/include/sqlite3.h ] ||
368 export LIBSQLITE3_SYS_USE_PKG_CONFIG=1; } &amp;&amp;
369python3 x.py build</userinput></screen>
370
371 <note>
372 <para>
373 The test suite will generate some messages in the
374 <phrase revision="sysv">system log</phrase>
375 <phrase revision="systemd">systemd journal</phrase>
376 for traps on invalid opcodes, and for segmentation faults.
377 In themselves these are nothing to worry about, just a way for the
378 test to be terminated.
379 </para>
380 </note>
381
382 <para>
383 To run the tests (again using all available CPUs) issue:
384 </para>
385
386<screen remap="test"><userinput>SSL_CERT_DIR=/etc/ssl/certs \
387python3 x.py test --verbose --no-fail-fast | tee rustc-testlog</userinput></screen>
388
389 <!-- https://github.com/rust-lang/rust/pull/115869 -->
390 <para>
391 Two tests,<filename>tests/ui/issues/issue-21763.rs</filename> and
392 <filename>tests/debuginfo/regression-bad-location-list-67992.rs</filename>,
393 are known to fail.
394 </para>
395
396 <para>
397 With LLVM-18, two codegen tests named
398 <!-- https://github.com/rust-lang/rust/pull/119523 -->
399 <filename>abi-main-signature-32bit-c-int.rs</filename> and
400 <!-- Don't know why yet ??? -->
401 <filename>slice-reverse.rs</filename> are
402 known to fail.
403 </para>
404
405 <para>
406 If <command>FileCheck</command> from <application>LLVM</application> has
407 not been installed, all 47 tests from the <quote>assembly</quote> suite
408 will fail.
409 </para>
410
411 <para>
412 As with all large test suites, other tests might fail on some machines -
413 if the number of additional failures is low,
414 check the log for 'failures:' and review lines above that, particularly the
415 'stderr:' lines. Any mention of
416 SIGSEGV or signal 11 in a failing test is a cause for concern.
417 </para>
418
419 <para>
420 If you get any <emphasis>other</emphasis> failing test which reports an
421 issue number then you should search for that issue. For example, when
422 rustc &gt;= 1.41.1 was built with a version of sysllvm before 10.0 the test
423 for issue 69225 failed <ulink
424 url="https://github.com/rust-lang/rust/issues/69225"/> and that should be
425 regarded as a critical failure (they released 1.41.1 because of it).
426 Most other failures will not be critical.
427 </para>
428
429 <para>
430 Therefore, you should determine the number of failures.
431 </para>
432
433 <para>
434 The number of tests which passed and failed can be found by running:
435 </para>
436
437<!-- split into two lines for narrower screen windows -->
438<screen remap="test"><userinput>grep '^test result:' rustc-testlog |
439 awk '{sum1 += $4; sum2 += $6} END { print sum1 " passed; " sum2 " failed" }'</userinput></screen>
440
441 <para>
442 The other available fields are $8 for those which were ignored
443 (i.e. skipped), $10 for 'measured' and $12 for 'filtered out' but both
444 those last two are probably zero.
445 </para>
446
447 <para>
448 Now, as the &root; user, install the package:
449 </para>
450
451 <note>
452 <para>
453 If <command>sudo</command> or <command>su</command> is invoked for
454 switching to the &root; user, ensure
455 <envar>LIBSSH2_SYS_USE_PKG_CONFIG</envar> and
456 <envar>LIBSQLITE3_SYS_USE_PKG_CONFIG</envar> are correctly passed or
457 the following command may rebuild <command>cargo</command> with
458 shipped copies of libssh2 and sqlite. For <command>sudo</command>,
459 use the
460 <option>--preserve-env=LIB{SSH2,SQLITE3}_SYS_USE_PKG_CONFIG</option>
461 option. For <command>su</command>, do <emphasis>not</emphasis> use
462 the <option>-</option> or <option>--login</option> options.
463 </para>
464 </note>
465
466<screen role='root'><userinput>python3 x.py install rustc std &amp;&amp;
467python3 x.py install --stage=1 cargo clippy rustfmt</userinput></screen>
468
469 <!-- https://github.com/rust-lang/rust/issues/115213 -->
470 <para>
471 The building system attempts to install some files twice, and during
472 the second attempt it renames the old one (installed in the first
473 attempt) with the <filename class='extension'>.old</filename> suffix.
474 As the &root; user, remove these files:
475 </para>
476
477 <screen role='root'><userinput>find /opt/rustc-&rust-version; -name "*.old" -delete</userinput></screen>
478
479 <para>
480 Still as the &root; user, symlink a <application>Zsh</application>
481 completion file into the correct location:
482 </para>
483
484<screen role='root'><userinput>install -vdm755 /usr/share/zsh/site-functions &amp;&amp;
485ln -sfv /opt/rustc/share/zsh/site-functions/_cargo \
486 /usr/share/zsh/site-functions</userinput></screen>
487
488 <para>
489 Finally, unset the exported environment variables:
490 </para>
491
492<screen><userinput>unset LIB{SSH2,SQLITE3}_SYS_USE_PKG_CONFIG</userinput></screen>
493
494 </sect2>
495
496 <sect2 role="commands">
497 <title>Command Explanations</title>
498
499 <para>
500 <command>ln -svfn rustc-&rust-version; /opt/rustc</command>: if this is
501 not the first use of the <filename class="directory">/opt/rustc</filename>
502 symlink, overwrite it by forcing, and use the '-n' flag to avoid getting
503 confusing results from e.g. <command>ls -l</command>.
504 </para>
505
506 <para>
507 <literal>targets = "X86"</literal>: this avoids building all the available
508 linux cross-compilers (AArch64, MIPS, PowerPC, SystemZ, etc). Unfortunately,
509 rust insists on installing source files for these below
510 <filename class="directory">/opt/rustc/lib/src</filename>.
511 </para>
512
513 <para>
514 <literal>extended = true</literal>: this installs several tools
515 (specified by the <literal>tools</literal> entry) alongside
516 <command>rustc</command>.
517 </para>
518
519 <para>
520 <literal>tools = ["cargo", "clippy", "rustdoc", "rustfmt"]</literal>:
521 only build the tools from the 'default' profile in binary command
522 <command>rustup</command> which are recommended for most users.
523 The other tools are unlikely to be useful unless using (old) code
524 analyzers or editing the standard library.
525 </para>
526
527 <para>
528 <literal>channel = "stable"</literal>: this ensures only stable features
529 can be used, the default in <filename>config.toml</filename> is to use
530 development features, which is not appropriate for a released version.
531 </para>
532
533 <!-- comment while using shipped LLVM -->
534 <para>
535 <literal>[target.x86_64-unknown-linux-gnu]</literal>: the syntax of
536 <filename>config.toml</filename> requires an <literal>llvm-config</literal>
537 entry for each target for which system-llvm is to be used. Change the target
538 to <literal>[target.i686-unknown-linux-gnu]</literal> if you are building
539 on 32-bit x86. This whole section may be omitted if you wish to build
540 against the shipped llvm, or do not have clang, but the resulting build will
541 be larger and take longer.
542 </para>
543
544<!--<para>
545 <command>sed -i -e '/^curl /s/0.4.38/0.4.40/' ... </command>: two crates
546 normally downloaded for this release do not correctly initialise
547 <application>curl</application> if using
548 <application>openssl-3.0.0</application>. Upstream has fixed that for a
549 future release, this sed causes the fixed versions to be used.
550 </para>-->
551
552 <!-- https://github.com/alexcrichton/ssh2-rs/issues/173 -->
553 <para>
554 <command>export LIBSSH2_SYS_USE_PKG_CONFIG=1</command>: Allow
555 <command>cargo</command> to link to system libssh2.
556 </para>
557
558 <!-- src/tools/cargo/Cargo.toml is specifying "bundled" as the
559 upstream is suggesting to avoid issues building for Windoge.
560 We don't care about Windoge so override this if we have
561 system sqlite3. -->
562 <para>
563 <command>export LIBSQLITE3_SYS_USE_PKG_CONFIG</command>: Allow
564 <command>cargo</command> to link to system sqlite.
565 </para>
566
567<!--<para>
568 <command>export RUSTFLAGS="$RUSTFLAGS -C link-args=-lffi"</command>:
569 This adds a link to libffi to any RUSTFLAGS you may already be passing
570 to the build. On some systems, linking fails to include libffi unless
571 this is used. The reason why this is needed is not clear.
572 2023-01-14 : assumed to be no longer needed, but it is some years
573 since one person reported needing this, keep it commented for the moment.
574 </para>-->
575
576 <!-- https://github.com/alexcrichton/openssl-probe/issues/25 -->
577 <para>
578 <envar>SSL_CERT_DIR=/etc/ssl/certs</envar>: Work around an issue
579 causing test failures with the CA certificate store layout used by
580 <xref linkend='make-ca'/>.
581 </para>
582
583 <para>
584 <parameter>--verbose</parameter>: this switch can sometimes provide more
585 information about a test which fails.
586 </para>
587
588 <para>
589 <parameter>--no-fail-fast</parameter>: this switch ensures that the test suite
590 will not stop at the first error.
591 </para>
592
593 <!-- https://github.com/rust-lang/rust/issues/94147 -->
594 <para>
595 <parameter>--stage=1</parameter>: this switch works around an issue
596 causing some Rustc components unnecessarily rebuilt running
597 <command>python3 x.py install</command>.
598 </para>
599
600 </sect2>
601
602 <sect2 role="configuration">
603 <title>Configuring Rust</title>
604
605 <sect3 id="rustc-config">
606 <title>Configuration Information</title>
607
608 <para>
609 If you installed <application>rustc</application> in
610 <filename class="directory">/opt</filename>, you need to update the
611 following configuration files so that <application>rustc</application>
612 is correctly found by other packages and system processes.
613 </para>
614
615 <para>
616 As the <systemitem class="username">root</systemitem> user, create
617 the <filename>/etc/profile.d/rustc.sh</filename> file:
618 </para>
619
620<screen role="root"><userinput>cat &gt; /etc/profile.d/rustc.sh &lt;&lt; "EOF"
621<literal># Begin /etc/profile.d/rustc.sh
622
623pathprepend /opt/rustc/bin PATH
624
625# Include /opt/rustc/man in the MANPATH variable to access manual pages
626pathappend /opt/rustc/share/man MANPATH
627
628# End /etc/profile.d/rustc.sh</literal>
629EOF</userinput></screen>
630
631 <para>
632 Immediately after installation, update the current PATH
633 for your current shell as a normal user:
634 </para>
635
636<screen><userinput>source /etc/profile.d/rustc.sh</userinput></screen>
637
638 </sect3>
639 </sect2>
640
641
642 <sect2 role="content">
643 <title>Contents</title>
644
645 <segmentedlist>
646 <segtitle>Installed Programs</segtitle>
647 <segtitle>Installed Libraries</segtitle>
648 <segtitle>Installed Directories</segtitle>
649
650 <seglistitem>
651 <seg>
652 cargo-clippy, cargo-fmt, cargo, clippy-driver, rust-gdb,
653 rust-gdbgui, rust-lldb, rustc, rustdoc, and rustfmt
654 </seg>
655 <seg>
656 librustc-driver-&lt;16-byte-hash&gt;.so,
657 libstd-&lt;16-byte-hash&gt;.so, and
658 libtest-&lt;16-byte-hash&gt;.so
659 </seg>
660 <seg>
661 ~/.cargo,
662 /opt/rustc, symbolic link to
663 /opt/rustc-&rust-version;
664 </seg>
665 </seglistitem>
666 </segmentedlist>
667
668 <variablelist>
669 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
670 <?dbfo list-presentation="list"?>
671 <?dbhtml list-presentation="table"?>
672
673 <varlistentry id="cargo-clippy">
674 <term><command>cargo-clippy</command></term>
675 <listitem>
676 <para>
677 provides lint checks for a cargo package
678 </para>
679 <indexterm zone="rust cargo-clippy">
680 <primary sortas="b-cargo-clippy">cargo-clippy</primary>
681 </indexterm>
682 </listitem>
683 </varlistentry>
684
685 <varlistentry id="cargo-fmt">
686 <term><command>cargo-fmt</command></term>
687 <listitem>
688 <para>
689 formats all bin and lib files of the current crate using
690 rustfmt
691 </para>
692 <indexterm zone="rust cargo-fmt">
693 <primary sortas="b-cargo-fmt">cargo-fmt</primary>
694 </indexterm>
695 </listitem>
696 </varlistentry>
697
698<!-- <varlistentry id="cargo-miri">
699 <term><command>cargo-miri</command></term>
700 <listitem>
701 <para>
702 is for use by Miri to interpret bin crates and tests. It is
703 not installed by default.
704 </para>
705 <indexterm zone="rust cargo-miri">
706 <primary sortas="b-cargo-miri">cargo-miri</primary>
707 </indexterm>
708 </listitem>
709 </varlistentry>-->
710
711 <varlistentry id="cargo">
712 <term><command>cargo</command></term>
713 <listitem>
714 <para>
715 is the Package Manager for Rust
716 </para>
717 <indexterm zone="rust cargo">
718 <primary sortas="b-cargo">cargo</primary>
719 </indexterm>
720 </listitem>
721 </varlistentry>
722
723 <varlistentry id="clippy-driver">
724 <term><command>clippy-driver</command></term>
725 <listitem>
726 <para>
727 provides lint checks for Rust
728 </para>
729 <indexterm zone="rust clippy-driver">
730 <primary sortas="b-clippy-driver">clippy-driver</primary>
731 </indexterm>
732 </listitem>
733 </varlistentry>
734
735<!-- <varlistentry id="miri">
736 <term><command>miri</command></term>
737 <listitem>
738 <para>
739 is an interpreter for Rust's mid-level intermediate representation
740 (MIR). It is not installed by default.
741 </para>
742 <indexterm zone="rust miri">
743 <primary sortas="b-miri">miri</primary>
744 </indexterm>
745 </listitem>
746 </varlistentry>
747
748 <varlistentry id="rls">
749 <term><command>rls</command></term>
750 <listitem>
751 <para>
752 is the Rust Language Server. This can run in the background to
753 provide IDEs, editors, and other tools with information about Rust
754 programs
755 </para>
756 <indexterm zone="rust rls">
757 <primary sortas="b-rls">rls</primary>
758 </indexterm>
759 </listitem>
760 </varlistentry>
761
762 <varlistentry id="rust-analyzer">
763 <term><command>rust-analyzer</command></term>
764 <listitem>
765 <para>
766 is an implementation of Language Server Protocol for the Rust
767 programming language.
768 </para>
769 <indexterm zone="rust rust-analyzer">
770 <primary sortas="b-rust-analyzer">rust-analyzer</primary>
771 </indexterm>
772 </listitem>
773 </varlistentry>
774
775 <varlistentry id="rust-demangler">
776 <term><command>rust-demangler</command></term>
777 <listitem>
778 <para>
779 converts a list of Rust mangled symbols into a
780 corresponding list of demangled symbols
781 </para>
782 <indexterm zone="rust rust-demangler">
783 <primary sortas="b-rust-demangler">rust-demangler</primary>
784 </indexterm>
785 </listitem>
786 </varlistentry> -->
787
788 <varlistentry id="rust-gdb">
789 <term><command>rust-gdb</command></term>
790 <listitem>
791 <para>
792 is a wrapper script for gdb, pulling in Python pretty-printing
793 modules installed in
794 <filename class="directory">/opt/rustc-&rust-version;/lib/rustlib/etc</filename>
795 </para>
796 <indexterm zone="rust rust-gdb">
797 <primary sortas="b-rust-gdb">rust-gdb</primary>
798 </indexterm>
799 </listitem>
800 </varlistentry>
801
802 <varlistentry id="rust-gdbgui">
803 <term><command>rust-gdbgui</command></term>
804 <listitem>
805 <para>
806 is a wrapper script for a graphical front end to gdb that runs in a
807 browser
808 </para>
809 <indexterm zone="rust rust-gdbgui">
810 <primary sortas="b-rust-gdbgui">rust-gdbgui</primary>
811 </indexterm>
812 </listitem>
813 </varlistentry>
814
815 <varlistentry id="rust-lldb">
816 <term><command>rust-lldb</command></term>
817 <listitem>
818 <para>
819 is a wrapper script for LLDB (the LLVM debugger)
820 pulling in the Python pretty-printing modules
821 </para>
822 <indexterm zone="rust rust-lldb">
823 <primary sortas="b-rust-lldb">rust=lldb</primary>
824 </indexterm>
825 </listitem>
826 </varlistentry>
827
828 <varlistentry id="rustc">
829 <term><command>rustc</command></term>
830 <listitem>
831 <para>
832 is the rust compiler
833 </para>
834 <indexterm zone="rust rustc">
835 <primary sortas="b-rustc">rustc</primary>
836 </indexterm>
837 </listitem>
838 </varlistentry>
839
840 <varlistentry id="rustdoc">
841 <term><command>rustdoc</command></term>
842 <listitem>
843 <para>
844 generates documentation from rust source code
845 </para>
846 <indexterm zone="rust rustdoc">
847 <primary sortas="b-rustdoc">rustdoc</primary>
848 </indexterm>
849 </listitem>
850 </varlistentry>
851
852 <varlistentry id="rustfmt">
853 <term><command>rustfmt</command></term>
854 <listitem>
855 <para>
856 formats rust code
857 </para>
858 <indexterm zone="rust rustfmt">
859 <primary sortas="b-rustfmt">rustfmt</primary>
860 </indexterm>
861 </listitem>
862 </varlistentry>
863
864 <varlistentry id="libstd">
865 <term><filename class="libraryfile">libstd-&lt;16-byte-hash&gt;.so</filename></term>
866 <listitem>
867 <para>
868 is the Rust Standard Library, the foundation of portable Rust software
869 </para>
870 <indexterm zone="rust libstd">
871 <primary sortas="c-libstd">libstd-&lt;16-byte-hash&gt;.so</primary>
872 </indexterm>
873 </listitem>
874 </varlistentry>
875 </variablelist>
876 </sect2>
877
878</sect1>
Note: See TracBrowser for help on using the repository browser.