source: general/prog/rust.xml@ d271ed4

trunk
Last change on this file since d271ed4 was e1fe4a2, checked in by Xi Ruoyao <xry111@…>, 5 weeks ago

Update to rustc-1.77.0 (#19527)

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