source: general/prog/rust.xml@ f15d31d

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 f15d31d was f15d31d, checked in by Pierre Labastie <pierre.labastie@…>, 16 months ago

Use remap as in the template for rust tests

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