source: general/prog/rust.xml@ b112f043

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

rust: revise config.toml entries (#17520)

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