source: general/prog/rust.xml@ 4be7bcd

11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since 4be7bcd was 13d9cb6a, checked in by Xi Ruoyao <xry111@…>, 20 months ago

rustc: list libgit2 as external dependency

We are using internally shipped libgit2 for now.

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