source: general/prog/rust.xml@ 0977d61

ken/TL2024 lazarus trunk
Last change on this file since 0977d61 was c87567a, checked in by Xi Ruoyao <xry111@…>, 3 months ago

rust: Adapt for LLVM 18 and note additional test failures

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