[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 |
|
---|
[614fc25f] | 7 | <!ENTITY rust-download-http "https://static.rust-lang.org/dist/rustc-&rust-version;-src.tar.gz">
|
---|
[d9bcc5f] | 8 | <!ENTITY rust-download-ftp " ">
|
---|
[25997c4a] | 9 | <!ENTITY rust-md5sum "366f049777e00d0d6f15d25895485efb">
|
---|
| 10 | <!ENTITY rust-size "152 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. -->
|
---|
| 15 |
|
---|
| 16 | <!ENTITY rust-buildsize "6.2 GB (475 MB installed) including 295MB of ~/.cargo files for the user building this. Add 1.5GB if installing the documentation (an extra 314MB is installed), and 2.0GB if running the tests">
|
---|
| 17 | <!ENTITY rust-time "34 SBU (add 3 SBU if installing the documentation and 15 SBU for tests, both with 4 processors)">
|
---|
[03d537cd] | 18 | ]>
|
---|
| 19 |
|
---|
| 20 | <sect1 id="rust" xreflabel="rustc-&rust-version;">
|
---|
| 21 | <?dbhtml filename="rust.html"?>
|
---|
| 22 |
|
---|
| 23 | <sect1info>
|
---|
| 24 | <othername>$LastChangedBy$</othername>
|
---|
| 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 |
|
---|
| 37 | <para>
|
---|
| 38 | The <application>Rust</application> programming language is designed
|
---|
| 39 | to be a safe, concurrent, practical language.
|
---|
| 40 | </para>
|
---|
| 41 |
|
---|
[25997c4a] | 42 | <para>
|
---|
| 43 | This package is updated on a six-weekly release cycle. Because it is
|
---|
| 44 | such a large and slow package to build, and is at the moment only required
|
---|
| 45 | by five packages in this book, the BLFS editors take the view that it
|
---|
| 46 | should only be updated when that is necessary (either to fix problems,
|
---|
| 47 | or to allow a new version of <application>firefox</application> to build).
|
---|
| 48 | </para>
|
---|
| 49 |
|
---|
[03d537cd] | 50 | <para>
|
---|
| 51 | As with many other programming languages, rustc (the rust compiler)
|
---|
[a7b1bddc] | 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
|
---|
[03d537cd] | 54 | the start of the build, so you cannot compile it without an internet
|
---|
| 55 | connection.
|
---|
| 56 | </para>
|
---|
| 57 |
|
---|
[25997c4a] | 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 (that would require <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 | When you upgrade to a newer version, the new libraries will have various
|
---|
| 77 | hashes in their names and therefore there will be a mix of versions but
|
---|
| 78 | only one of each will be usable. A binary distribution would use its
|
---|
| 79 | package manager to delete all the old <application>rust</application>
|
---|
| 80 | installation before updating. You may wish to do the same to save space.
|
---|
| 81 | </para>
|
---|
| 82 | </note>
|
---|
| 83 |
|
---|
[03d537cd] | 84 | <para>
|
---|
| 85 | The current <application>rustbuild</application> build-system will use
|
---|
| 86 | all available processors, although it does not scale well and often falls
|
---|
| 87 | back to just using one core while waiting for a library to compile.
|
---|
| 88 | </para>
|
---|
| 89 |
|
---|
| 90 | <para>
|
---|
| 91 | At the moment <application>Rust</application> does not provide any
|
---|
[4c6edac] | 92 | guarantees of a stable ABI.
|
---|
[03d537cd] | 93 | </para>
|
---|
| 94 |
|
---|
[326f830] | 95 | <note>
|
---|
[7d259126] | 96 | <para>
|
---|
| 97 | Rustc defaults to building for ALL supported architectures, using a
|
---|
| 98 | shipped copy of LLVM. In BLFS the build is only for the X86 architecture.
|
---|
[cfa8b6d] | 99 | If you
|
---|
[7d259126] | 100 | intend to develop rust crates, this build may not be good enough for your
|
---|
| 101 | purposes.
|
---|
| 102 | </para>
|
---|
[326f830] | 103 | <para>
|
---|
[25997c4a] | 104 | Unlike with previous versions, the build times of this version when
|
---|
| 105 | repeated on the same machine seem reasonably consistent.
|
---|
[326f830] | 106 | </para>
|
---|
| 107 | <para>
|
---|
[bb0652ca] | 108 | Unusually, a DESTDIR-style method is being used to install this package.
|
---|
| 109 | This is because running the install as root not only downloads all of the
|
---|
[a7b1bddc] | 110 | cargo files again (to <filename>/root/.cargo</filename>), it then spends
|
---|
[7d259126] | 111 | a very long time recompiling. Using this method saves a lot of time, at
|
---|
| 112 | the cost of extra disk space.
|
---|
[326f830] | 113 | </para>
|
---|
| 114 | </note>
|
---|
| 115 |
|
---|
[272f28b] | 116 | &lfs83_checked;
|
---|
[03d537cd] | 117 |
|
---|
| 118 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 119 | <itemizedlist spacing="compact">
|
---|
| 120 | <listitem>
|
---|
| 121 | <para>
|
---|
| 122 | Download (HTTP): <ulink url="&rust-download-http;"/>
|
---|
| 123 | </para>
|
---|
| 124 | </listitem>
|
---|
| 125 | <listitem>
|
---|
| 126 | <para>
|
---|
| 127 | Download (FTP): <ulink url="&rust-download-ftp;"/>
|
---|
| 128 | </para>
|
---|
| 129 | </listitem>
|
---|
| 130 | <listitem>
|
---|
| 131 | <para>
|
---|
| 132 | Download MD5 sum: &rust-md5sum;
|
---|
| 133 | </para>
|
---|
| 134 | </listitem>
|
---|
| 135 | <listitem>
|
---|
| 136 | <para>
|
---|
| 137 | Download size: &rust-size;
|
---|
| 138 | </para>
|
---|
| 139 | </listitem>
|
---|
| 140 | <listitem>
|
---|
| 141 | <para>
|
---|
| 142 | Estimated disk space required: &rust-buildsize;
|
---|
| 143 | </para>
|
---|
| 144 | </listitem>
|
---|
| 145 | <listitem>
|
---|
| 146 | <para>
|
---|
| 147 | Estimated build time: &rust-time;
|
---|
| 148 | </para>
|
---|
| 149 | </listitem>
|
---|
| 150 | </itemizedlist>
|
---|
| 151 |
|
---|
| 152 | <bridgehead renderas="sect3">Rust Dependencies</bridgehead>
|
---|
| 153 |
|
---|
| 154 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 155 | <para role="required">
|
---|
| 156 | <xref linkend="curl"/>,
|
---|
[4c6edac] | 157 | <xref linkend="cmake"/>,
|
---|
[cfa8b6d] | 158 | <xref linkend="libssh2"/>, and
|
---|
| 159 | <xref linkend="python2"/>
|
---|
[03d537cd] | 160 | </para>
|
---|
| 161 |
|
---|
[25997c4a] | 162 | <!-- comment out while using shipped LLVM
|
---|
[a7b1bddc] | 163 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 164 | <para role="recommended">
|
---|
| 165 | <package>clang</package> from <xref linkend="llvm"/>
|
---|
[bb0652ca] | 166 | (built with -DLLVM_LINK_LLVM_DYLIB=ON)
|
---|
[25997c4a] | 167 | </para>-->
|
---|
[a7b1bddc] | 168 |
|
---|
[03d537cd] | 169 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 170 | <para role="optional">
|
---|
[25997c4a] | 171 | <xref linkend="gdb"/> (used by the testsuite if it is present)
|
---|
[03d537cd] | 172 | </para>
|
---|
| 173 |
|
---|
| 174 | <para condition="html" role="usernotes">
|
---|
| 175 | User Notes: <ulink url="&blfs-wiki;/rust"/>
|
---|
| 176 | </para>
|
---|
| 177 | </sect2>
|
---|
| 178 |
|
---|
| 179 | <sect2 role="installation">
|
---|
| 180 | <title>Installation of Rust</title>
|
---|
| 181 |
|
---|
| 182 | <para>
|
---|
[25997c4a] | 183 | First create a suitable <filename>config.toml</filename> file which will
|
---|
| 184 | configure the build. Unlike with previous releases, where even quite old
|
---|
| 185 | system versions of <application>LLVM</application>worked well, this
|
---|
| 186 | version ships with a development version and using the current <xref
|
---|
| 187 | linkend="llvm"/> release is known to result in breakage in some
|
---|
| 188 | circumstances.
|
---|
[4c6edac] | 189 | </para>
|
---|
| 190 |
|
---|
[272f28b] | 191 | <screen><userinput>cat << EOF > config.toml
|
---|
[326f830] | 192 | # see config.toml.example for more possible options
|
---|
[4c6edac] | 193 | [llvm]
|
---|
| 194 |
|
---|
[25997c4a] | 195 | # use ninja
|
---|
| 196 | ninja = true
|
---|
| 197 |
|
---|
| 198 | targets = "X86"
|
---|
| 199 | # When compiling LLVM, the experimental targets (WebAssembly
|
---|
| 200 | # and RISCV) are built by default - omit them
|
---|
| 201 | experimental-targets = ""
|
---|
[a7b1bddc] | 202 |
|
---|
[4c6edac] | 203 | [build]
|
---|
[25997c4a] | 204 | # omiti HTML docs to save time and space (comment this to build them)
|
---|
| 205 | docs = false
|
---|
| 206 |
|
---|
[4c6edac] | 207 | # install cargo as well as rust
|
---|
| 208 | extended = true
|
---|
| 209 |
|
---|
| 210 | [install]
|
---|
| 211 | prefix = "/usr"
|
---|
[25997c4a] | 212 | # docdir is used even if the full awesome docs are not installed
|
---|
[326f830] | 213 | docdir = "share/doc/rustc-&rust-version;"
|
---|
| 214 |
|
---|
| 215 | [rust]
|
---|
[4c6edac] | 216 | channel = "stable"
|
---|
[326f830] | 217 | rpath = false
|
---|
[a7b1bddc] | 218 |
|
---|
| 219 | # BLFS does not install the FileCheck executable from llvm,
|
---|
| 220 | # so disable codegen tests
|
---|
| 221 | codegen-tests = false
|
---|
| 222 |
|
---|
[25997c4a] | 223 | # get a trace if there is an Internal Compiler Exception
|
---|
| 224 | backtrace-on-ice = true
|
---|
[a7b1bddc] | 225 |
|
---|
[4c6edac] | 226 | EOF</userinput></screen>
|
---|
| 227 |
|
---|
| 228 | <para>
|
---|
| 229 | Now install <application>Rust</application> by running the following
|
---|
[03d537cd] | 230 | commands:
|
---|
| 231 | </para>
|
---|
| 232 |
|
---|
[bb0652ca] | 233 | <screen><userinput>export RUSTFLAGS="$RUSTFLAGS -C link-args=-lffi" &&
|
---|
[25997c4a] | 234 | ./x.py build --exclude src/tools/miri</userinput></screen>
|
---|
[a7b1bddc] | 235 |
|
---|
[6bcd464] | 236 | <note>
|
---|
[a7b1bddc] | 237 | <para>
|
---|
[6bcd464] | 238 | The testsuite will generate some messages in the
|
---|
[a7b1bddc] | 239 | <phrase revision="sysv">system log</phrase>
|
---|
| 240 | <phrase revision="systemd">systemd journal</phrase>
|
---|
[6bcd464] | 241 | for traps on invalid opcodes, and for segmentation faults.
|
---|
[25997c4a] | 242 | In themselves these are nothing to worry about, just a way for the
|
---|
| 243 | test to be terminated. But if the output from the testsuite reports tests
|
---|
| 244 | which FAIL with segmentation faults (signal 11) then there may be a
|
---|
| 245 | problem.
|
---|
[a7b1bddc] | 246 | </para>
|
---|
[6bcd464] | 247 | </note>
|
---|
[a7b1bddc] | 248 |
|
---|
[03d537cd] | 249 | <para>
|
---|
[4c6edac] | 250 | To run the tests issue
|
---|
[cfa8b6d] | 251 | <command>./x.py test --verbose --no-fail-fast | tee rustc-testlog</command>:
|
---|
[25997c4a] | 252 | as with the build, that will use all available CPUs.
|
---|
[03d537cd] | 253 | </para>
|
---|
| 254 |
|
---|
| 255 | <para>
|
---|
[25997c4a] | 256 | The instructions above do not build ARM compilers, so the testsuite
|
---|
| 257 | <emphasis>will</emphasis> fail and the tests will be reported to end in
|
---|
| 258 | error, with a backtrace of the last failing test. On a good run, 3 tests
|
---|
| 259 | which need Thumb (ARM) compilers will fail, all in <filename
|
---|
| 260 | class="directory">ui/issues</filename> for issues 37131, 49851 and 50993.
|
---|
| 261 | Occasionally a fourth test, in run-make, 'sysroot-crates-are-unstable',
|
---|
| 262 | has been known to fail. That is probably harmless. As with all large
|
---|
| 263 | testsuites, other tests might fail on some machines - if the number of
|
---|
| 264 | failures is in the single digits, check the log for 'FAILED' and review
|
---|
| 265 | lines above that. Any mention of SIGSEGV or signal 11 in a failing test
|
---|
| 266 | is a cause for concern.
|
---|
| 267 | </para>
|
---|
| 268 |
|
---|
| 269 | <para>
|
---|
| 270 | Therefore, you should determine the number of tests, failures, etc. The
|
---|
| 271 | total number of tests which were considered is found by running:
|
---|
[03d537cd] | 272 | </para>
|
---|
| 273 |
|
---|
[7d259126] | 274 | <screen><command>grep 'running .* tests' rustc-testlog | awk '{ sum += $2 } END { print sum }'</command></screen>
|
---|
[4c6edac] | 275 |
|
---|
[03d537cd] | 276 | <para>
|
---|
[25997c4a] | 277 | That should report 15795 tests. Similarly, the total tests which failed can
|
---|
[4c6edac] | 278 | be found by running:
|
---|
[03d537cd] | 279 | </para>
|
---|
| 280 |
|
---|
[7d259126] | 281 | <screen><command>grep '^test result:' rustc-testlog | awk '{ sum += $6 } END { print sum }'</command></screen>
|
---|
[03d537cd] | 282 |
|
---|
[4c6edac] | 283 | <para>
|
---|
| 284 | And similarly for the tests which passed use $4, for those which were ignored
|
---|
| 285 | (i.e. skipped) use $8 (and $10 for 'measured', $12 for 'filtered out' but both
|
---|
[25997c4a] | 286 | are probably zero). The breakdown does not quite match the overall total.
|
---|
[4c6edac] | 287 | </para>
|
---|
| 288 |
|
---|
| 289 | <para>
|
---|
[a7b1bddc] | 290 | Still as your normal user, do a DESTDIR install:
|
---|
[4c6edac] | 291 | </para>
|
---|
| 292 |
|
---|
[fb940713] | 293 | <screen><userinput>export LIBSSH2_SYS_USE_PKG_CONFIG=1 &&
|
---|
[cfa8b6d] | 294 | DESTDIR=${PWD}/install ./x.py install &&
|
---|
[fb940713] | 295 | unset LIBSSH2_SYS_USE_PKG_CONFIG</userinput></screen>
|
---|
[a7b1bddc] | 296 |
|
---|
| 297 | <para>
|
---|
| 298 | Now, as the <systemitem class="username">root</systemitem> user
|
---|
| 299 | install the files from the DESTDIR:
|
---|
| 300 | </para>
|
---|
| 301 |
|
---|
[bb0652ca] | 302 | <screen role="root"><userinput>chown -R root:root install &&
|
---|
| 303 | cp -a install/* /</userinput></screen>
|
---|
[a7b1bddc] | 304 |
|
---|
[03d537cd] | 305 | </sect2>
|
---|
| 306 |
|
---|
| 307 | <sect2 role="commands">
|
---|
| 308 | <title>Command Explanations</title>
|
---|
| 309 |
|
---|
| 310 | <para>
|
---|
[4c6edac] | 311 | <command>targets = "X86"</command>: this avoids building all the available
|
---|
[a7b1bddc] | 312 | linux cross-compilers (Aarch64, MIPS, PowerPC, SystemZ, etc). Unfortunately,
|
---|
| 313 | rust insists on installing source files for these below
|
---|
| 314 | <filename class="directory">/usr/lib/rustlib/src</filename>.
|
---|
[03d537cd] | 315 | </para>
|
---|
| 316 |
|
---|
| 317 | <para>
|
---|
[4c6edac] | 318 | <command>extended = true</command>: this installs Cargo alongside Rust.
|
---|
[03d537cd] | 319 | </para>
|
---|
| 320 |
|
---|
| 321 | <para>
|
---|
[4c6edac] | 322 | <command>channel = "stable"</command>: this ensures only stable features
|
---|
| 323 | can be used, the default in <filename>config.toml</filename> is to use
|
---|
| 324 | development features, which is not appropriate for a released version.
|
---|
[03d537cd] | 325 | </para>
|
---|
| 326 |
|
---|
[326f830] | 327 | <para>
|
---|
| 328 | <command>rpath = false</command>: by default, <command>rust</command> can
|
---|
| 329 | be run from where it was built, without being installed. That adds DT_RPATH
|
---|
| 330 | entries to all of the ELF files, which produces very messy output from
|
---|
| 331 | <command>ldd</command>, showing the libraries in the place they were built,
|
---|
| 332 | even if they have been deleted from there after the install.
|
---|
| 333 | </para>
|
---|
| 334 |
|
---|
[25997c4a] | 335 | <!-- comment while using shipped LLVM
|
---|
[a7b1bddc] | 336 | <para>
|
---|
| 337 | <command>[target.x86_64-unknown-linux-gnu]</command>: the syntax of
|
---|
| 338 | <filename>config.toml</filename> requires an <literal>llvm-config</literal>
|
---|
| 339 | entry for each target for which system-llvm is to be used. Change the target
|
---|
| 340 | to <literal>[target.i686-unknown-linux-gnu]</literal> if you are building
|
---|
| 341 | on 32-bit x86. This whole section may be omitted if you wish to build
|
---|
| 342 | against the shipped llvm, or do not have clang, but the resulting build will
|
---|
[7d259126] | 343 | be larger and take longer.
|
---|
[25997c4a] | 344 | </para>-->
|
---|
[a7b1bddc] | 345 |
|
---|
[bb0652ca] | 346 | <para>
|
---|
| 347 | <command>export RUSTFLAGS="$RUSTFLAGS -C link-args=-lffi"</command>:
|
---|
| 348 | This adds a link to libffi to any RUSTFLAGS you may already be passing
|
---|
| 349 | to the build. On some systems, linking fails to include libffi unless
|
---|
| 350 | this is used. The reason why this is needed is not clear.
|
---|
| 351 | </para>
|
---|
| 352 |
|
---|
[25997c4a] | 353 | <para>
|
---|
| 354 | <command>--exclude src/tools/miri</command>: For a long time, the miri
|
---|
| 355 | crate (an interpreter for the Midlevel Intermediate Representation)
|
---|
| 356 | has failed to build on releases. It is optional, but the failure
|
---|
| 357 | messages can persuade people that the whole build failed.
|
---|
| 358 | </para>
|
---|
| 359 |
|
---|
[03d537cd] | 360 | <para>
|
---|
[4c6edac] | 361 | <command>--verbose</command>: this switch can sometimes provide more
|
---|
| 362 | information about a test which fails.
|
---|
[03d537cd] | 363 | </para>
|
---|
[4c6edac] | 364 |
|
---|
| 365 | <para>
|
---|
| 366 | <command>--no-fail-fast</command>: this switch ensures that the testsuite
|
---|
| 367 | will not stop at the first error.
|
---|
| 368 | </para>
|
---|
| 369 |
|
---|
[fb940713] | 370 | <para>
|
---|
| 371 | <command>export LIBSSH2_SYS_USE_PKG_CONFIG=1</command>: On some systems,
|
---|
| 372 | cairo fails to link during the install because it cannot find libssh2.
|
---|
| 373 | This seems to fix it, but again the reason why the problem occurs is not
|
---|
| 374 | understood.
|
---|
| 375 | </para>
|
---|
| 376 |
|
---|
[326f830] | 377 | <para>
|
---|
[bb0652ca] | 378 | <command>DESTDIR=${PWD}/install ./x.py install</command>: This effects a
|
---|
| 379 | DESTDIR-style install in the source tree,creating an <filename
|
---|
| 380 | class="directory">install</filename> directory. Note that DESTDIR installs
|
---|
| 381 | need an absolute path, passing 'install' will not work.
|
---|
[a7b1bddc] | 382 | </para>
|
---|
| 383 |
|
---|
| 384 | <para>
|
---|
[bb0652ca] | 385 | <command>chown -R root:root install</command>: the DESTDIR install
|
---|
[a7b1bddc] | 386 | was run by a regular user, who owns the files. For security, change their
|
---|
| 387 | owner before doing a simple copy to install them.
|
---|
[326f830] | 388 | </para>
|
---|
| 389 |
|
---|
[03d537cd] | 390 | </sect2>
|
---|
| 391 |
|
---|
| 392 | <sect2 role="content">
|
---|
| 393 | <title>Contents</title>
|
---|
| 394 |
|
---|
| 395 | <segmentedlist>
|
---|
[78399edc] | 396 | <segtitle>Installed Programs</segtitle>
|
---|
| 397 | <segtitle>Installed Libraries</segtitle>
|
---|
| 398 | <segtitle>Installed Directories</segtitle>
|
---|
[03d537cd] | 399 |
|
---|
| 400 | <seglistitem>
|
---|
| 401 | <seg>
|
---|
[7d259126] | 402 | cargo-clippy, cargo-fmt, cargo, clippy-driver, rls, rust-gdb, rust-lldb, rustc, rustdoc, rustfmt.
|
---|
[03d537cd] | 403 | </seg>
|
---|
| 404 | <seg>
|
---|
[4c6edac] | 405 | Many lib*<16-byte-hash>.so libraries.
|
---|
[03d537cd] | 406 | </seg>
|
---|
| 407 | <seg>
|
---|
| 408 | ~/.cargo,
|
---|
[4c6edac] | 409 | /usr/lib/rustlib,
|
---|
| 410 | /usr/share/doc/rustc-&rust-version;, and
|
---|
| 411 | /usr/share/zsh/site-functions/
|
---|
[03d537cd] | 412 | </seg>
|
---|
| 413 | </seglistitem>
|
---|
| 414 | </segmentedlist>
|
---|
| 415 |
|
---|
| 416 | <variablelist>
|
---|
| 417 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 418 | <?dbfo list-presentation="list"?>
|
---|
| 419 | <?dbhtml list-presentation="table"?>
|
---|
| 420 |
|
---|
[7d259126] | 421 | <varlistentry id="cargo-clippy">
|
---|
| 422 | <term><command>cargo-clippy</command></term>
|
---|
| 423 | <listitem>
|
---|
| 424 | <para>
|
---|
| 425 | provides lint checks for a cargo package.
|
---|
| 426 | </para>
|
---|
| 427 | <indexterm zone="rust cargo-clippy">
|
---|
| 428 | <primary sortas="b-cargo-clippy">cargo-clippy</primary>
|
---|
| 429 | </indexterm>
|
---|
| 430 | </listitem>
|
---|
| 431 | </varlistentry>
|
---|
| 432 |
|
---|
[a7b1bddc] | 433 | <varlistentry id="cargo-fmt">
|
---|
| 434 | <term><command>cargo-fmt</command></term>
|
---|
| 435 | <listitem>
|
---|
| 436 | <para>
|
---|
| 437 | formats all bin and lib files of the current crate using
|
---|
| 438 | rustfmt.
|
---|
| 439 | </para>
|
---|
| 440 | <indexterm zone="rust cargo-fmt">
|
---|
| 441 | <primary sortas="b-cargo-fmt">cargo-fmt</primary>
|
---|
| 442 | </indexterm>
|
---|
| 443 | </listitem>
|
---|
| 444 | </varlistentry>
|
---|
| 445 |
|
---|
[4c6edac] | 446 | <varlistentry id="cargo">
|
---|
| 447 | <term><command>cargo</command></term>
|
---|
| 448 | <listitem>
|
---|
| 449 | <para>
|
---|
| 450 | is the Package Manager for Rust.
|
---|
| 451 | </para>
|
---|
| 452 | <indexterm zone="rust cargo">
|
---|
| 453 | <primary sortas="b-cargo">cargo</primary>
|
---|
| 454 | </indexterm>
|
---|
| 455 | </listitem>
|
---|
| 456 | </varlistentry>
|
---|
| 457 |
|
---|
[7d259126] | 458 | <varlistentry id="clippy-driver">
|
---|
| 459 | <term><command>clippy-driver</command></term>
|
---|
| 460 | <listitem>
|
---|
| 461 | <para>
|
---|
| 462 | provides lint checks for Rust.
|
---|
| 463 | </para>
|
---|
| 464 | <indexterm zone="rust clippy-driver">
|
---|
| 465 | <primary sortas="b-clippy-driver">clippy-driver</primary>
|
---|
| 466 | </indexterm>
|
---|
| 467 | </listitem>
|
---|
| 468 | </varlistentry>
|
---|
| 469 |
|
---|
[326f830] | 470 | <varlistentry id="rls">
|
---|
| 471 | <term><command>rls</command></term>
|
---|
| 472 | <listitem>
|
---|
| 473 | <para>
|
---|
| 474 | is the Rust Language Server. This can run in the background to
|
---|
| 475 | provide IDEs, editors, and other tools with information about Rust
|
---|
| 476 | programs.
|
---|
| 477 | </para>
|
---|
| 478 | <indexterm zone="rust rls">
|
---|
| 479 | <primary sortas="b-rls">rls</primary>
|
---|
| 480 | </indexterm>
|
---|
| 481 | </listitem>
|
---|
| 482 | </varlistentry>
|
---|
| 483 |
|
---|
[03d537cd] | 484 | <varlistentry id="rust-gdb">
|
---|
| 485 | <term><command>rust-gdb</command></term>
|
---|
| 486 | <listitem>
|
---|
| 487 | <para>
|
---|
[a7b1bddc] | 488 | is a wrapper script for gdb, pulling in Python
|
---|
| 489 | pretty-printing modules installed in <filename
|
---|
| 490 | class="directory">/usr/lib/rustlib/etc</filename>.
|
---|
[03d537cd] | 491 | </para>
|
---|
| 492 | <indexterm zone="rust rust-gdb">
|
---|
| 493 | <primary sortas="b-rust-gdb">rust-gdb</primary>
|
---|
| 494 | </indexterm>
|
---|
| 495 | </listitem>
|
---|
| 496 | </varlistentry>
|
---|
| 497 |
|
---|
| 498 | <varlistentry id="rust-lldb">
|
---|
| 499 | <term><command>rust-lldb</command></term>
|
---|
| 500 | <listitem>
|
---|
| 501 | <para>
|
---|
[a7b1bddc] | 502 | is a wrapper script for LLDB (the LLVM debugger)
|
---|
| 503 | pulling in the Python pretty-printing modules.
|
---|
[03d537cd] | 504 | </para>
|
---|
| 505 | <indexterm zone="rust rust-lldb">
|
---|
| 506 | <primary sortas="b-rust-lldb">rust=lldb</primary>
|
---|
| 507 | </indexterm>
|
---|
| 508 | </listitem>
|
---|
| 509 | </varlistentry>
|
---|
| 510 |
|
---|
| 511 | <varlistentry id="rustc">
|
---|
| 512 | <term><command>rustc</command></term>
|
---|
| 513 | <listitem>
|
---|
| 514 | <para>
|
---|
| 515 | is the rust compiler.
|
---|
| 516 | </para>
|
---|
| 517 | <indexterm zone="rust rustc">
|
---|
| 518 | <primary sortas="b-rustc">rustc</primary>
|
---|
| 519 | </indexterm>
|
---|
| 520 | </listitem>
|
---|
| 521 | </varlistentry>
|
---|
| 522 |
|
---|
| 523 | <varlistentry id="rustdoc">
|
---|
| 524 | <term><command>rustdoc</command></term>
|
---|
| 525 | <listitem>
|
---|
| 526 | <para>
|
---|
| 527 | generates documentation from rust source code.
|
---|
| 528 | </para>
|
---|
| 529 | <indexterm zone="rust rustdoc">
|
---|
| 530 | <primary sortas="b-rustdoc">rustdoc</primary>
|
---|
| 531 | </indexterm>
|
---|
| 532 | </listitem>
|
---|
| 533 | </varlistentry>
|
---|
| 534 |
|
---|
[a7b1bddc] | 535 | <varlistentry id="rustfmt">
|
---|
| 536 | <term><command>rustfmt</command></term>
|
---|
| 537 | <listitem>
|
---|
| 538 | <para>
|
---|
| 539 | formats rust code.
|
---|
| 540 | </para>
|
---|
| 541 | <indexterm zone="rust rustfmt">
|
---|
| 542 | <primary sortas="b-rustfmt">rustfmt</primary>
|
---|
| 543 | </indexterm>
|
---|
| 544 | </listitem>
|
---|
| 545 | </varlistentry>
|
---|
| 546 |
|
---|
[03d537cd] | 547 | <varlistentry id="libstd">
|
---|
| 548 | <term><filename class="libraryfile">libstd-<16-byte-hash>.so</filename></term>
|
---|
| 549 | <listitem>
|
---|
| 550 | <para>
|
---|
| 551 | is the Rust Standard Library, the foundation of portable Rust software.
|
---|
| 552 | </para>
|
---|
| 553 | <indexterm zone="rust libstd">
|
---|
| 554 | <primary sortas="c-libstd">libstd-<16-byte-hash>.so</primary>
|
---|
| 555 | </indexterm>
|
---|
| 556 | </listitem>
|
---|
| 557 | </varlistentry>
|
---|
| 558 | </variablelist>
|
---|
| 559 | </sect2>
|
---|
| 560 | </sect1>
|
---|