source: general/prog/cargo.xml@ 8e848de9

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 8e848de9 was 8e848de9, checked in by Bruce Dubbs <bdubbs@…>, 7 years ago

Add gcc7_checked entity.
Minor editorial changes.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@18716 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 8.8 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
7 <!ENTITY cargo-download-http "https://github.com/rust-lang/cargo/archive/&cargo-version;.tar.gz">
8 <!ENTITY cargo-download-ftp " ">
9 <!ENTITY cargo-md5sum "c0bdbfdeead6a7cdfd7fbfe2183bfc61">
10 <!ENTITY cargo-size "624 KB">
11 <!ENTITY cargo-buildsize "129 MB plus extra 115 MB in ~/.cargo and 2.2GB for the testsuite">
12 <!ENTITY cargo-time "1.8 SBU plus 2.4 SBU for the testsuite on a machine with 4 cores">
13
14 <!-- RUSTIDATE is deined in packages.ent -->
15 <!-- temporarily at higgs so people can download it -->
16 <!ENTITY rusti-download-http "&sources-anduin-http;/rust/rust-installer-&RUSTIDATE;.tar.xz">
17 <!ENTITY rusti-md5sum "8fb6c87f12d735b0a8bc1304d7640c69">
18 <!ENTITY rusti-size "18 KB">
19
20 <!-- similarly, CARGOPREV is defined in packages.ent -->
21 <!ENTITY cargoprev64-download-http "https://static.rust-lang.org/dist/cargo-&CARGOPREV;-x86_64-unknown-linux-gnu.tar.gz">
22 <!ENTITY cargoprev64-md5sum "ad2b513d591f35271f1041e2e04f484c">
23 <!ENTITY cargoprev64-size "4.4 MB">
24 <!ENTITY cargoprev32-download-http "https://static.rust-lang.org/dist/cargo-&CARGOPREV;-i686-unknown-linux-gnu.tar.gz">
25 <!ENTITY cargoprev32-md5sum "24d4eda62991bfbaecb3a6d1e09df143">
26 <!ENTITY cargoprev32-size "4.3 MB">
27]>
28
29<sect1 id="cargo" xreflabel="cargo-&cargo-version;">
30 <?dbhtml filename="cargo.html"?>
31
32 <sect1info>
33 <othername>$LastChangedBy$</othername>
34 <date>$Date$</date>
35 </sect1info>
36
37 <title>Cargo-&cargo-version;</title>
38
39 <indexterm zone="cargo">
40 <primary sortas="a-cargo">Cargo</primary>
41 </indexterm>
42
43 <sect2 role="package">
44 <title>Introduction to cargo</title>
45
46 <para>
47 <application>Cargo</application> is the Package Manager for
48 <application>Rust</application>. Like that, during the build it uses
49 <command>curl</command> to download <filename>cargo</filename> files
50 which are actually <filename>.tar.gz</filename> source archives.
51 </para>
52
53 <para>
54 This package requires internet access to build and at runtime (when
55 <command>rust</command> is compiling another package). It will use all
56 available cores. It also needs the current or previous version to compile
57 itself, so here a binary of the previous version is used to bootstrap.
58 </para>
59
60 &lfs80_checked;
61
62 <note><para><application>Firefox</application> will download a correctly
63 named tarball, or you can download it via wget as:</para>
64
65<screen><userinput>wget https://github.com/rust-lang/cargo/archive/&cargo-version;.tar.gz \
66 -O cargo-&cargo-version;.tar.gz</userinput></screen>
67 </note>
68
69 <bridgehead renderas="sect3">Package Information</bridgehead>
70 <itemizedlist spacing="compact">
71 <listitem>
72 <para>
73 Download (HTTP): <ulink url="&cargo-download-http;"/>
74 </para>
75 </listitem>
76 <listitem>
77 <para>
78 Download (FTP): <ulink url="&cargo-download-ftp;"/>
79 </para>
80 </listitem>
81 <listitem>
82 <para>
83 Download MD5 sum: &cargo-md5sum;
84 </para>
85 </listitem>
86 <listitem>
87 <para>
88 Download size: &cargo-size;
89 </para>
90 </listitem>
91 <listitem>
92 <para>
93 Estimated disk space required: &cargo-buildsize;
94 </para>
95 </listitem>
96 <listitem>
97 <para>
98 Estimated build time: &cargo-time;
99 </para>
100 </listitem>
101 </itemizedlist>
102
103 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
104 <itemizedlist spacing="compact">
105 <listitem>
106 <para>Rust Installer:
107 <ulink url="&rusti-download-http;"/></para>
108 </listitem>
109 <listitem>
110 <para>Installer MD5 sum: &rusti-md5sum;</para>
111 </listitem>
112 <listitem>
113 <para>Installer size: &rusti-size;</para>
114 </listitem>
115 </itemizedlist>
116 <itemizedlist spacing="compact">
117 <listitem>
118 <para>Binary download (x86_64):
119 <ulink url="&cargoprev64-download-http;"/></para>
120 </listitem>
121 <listitem>
122 <para>Binary x86_64 MD5 sum: &cargoprev64-md5sum;</para>
123 </listitem>
124 <listitem>
125 <para>Binary x86_64 download size: &cargoprev64-size;</para>
126 </listitem>
127 </itemizedlist>
128 <itemizedlist spacing="compact">
129 <listitem>
130 <para>Binary download (i686):
131 <ulink url="&cargoprev32-download-http;"/></para>
132 </listitem>
133 <listitem>
134 <para>Binary i686 MD5 sum: &cargoprev32-md5sum;</para>
135 </listitem>
136 <listitem>
137 <para>Binary i686 download size: &cargoprev32-size;</para>
138 </listitem>
139 </itemizedlist>
140
141 <bridgehead renderas="sect3">Cargo Dependencies</bridgehead>
142
143 <bridgehead renderas="sect4">Required</bridgehead>
144 <para role="required">
145 <xref linkend="cmake"/>,
146 <xref linkend="rust"/>
147 </para>
148
149 <bridgehead renderas="sect4">Optional</bridgehead>
150 <para role="optional">
151 <xref linkend="git"/>,
152 <xref linkend="openssl"/>
153 </para>
154
155 <para condition="html" role="usernotes">
156 User Notes: <ulink url="&blfs-wiki;/cargo"/>
157 </para>
158 </sect2>
159
160 <sect2 role="installation">
161 <title>Installation of cargo</title>
162
163 <para>
164 Install <application>cargo</application> by running the following
165 commands:
166 </para>
167
[8e848de9]168<screen><userinput>tar -xf ../../../rust-installer-&RUSTIDATE;.tar.xz \
169 --strip-components=1 --directory src/rust-installer &amp;&amp;
[03d537cd]170
171case $(uname -m) in
172 x86_64) tar -xf ../cargo-&CARGOPREV;-x86_64-unknown-linux-gnu.tar.gz
173 ;;
174 i686) tar -xf ../cargo-&CARGOPREV;-i686-unknown-linux-gnu.tar.gz
175 ;;
[8e848de9]176esac &amp;&amp;
[03d537cd]177
[8e848de9]178./configure --prefix=/usr \
179 --sysconfdir=/etc \
180 --docdir=/usr/share/doc/cargo-&cargo-version; \
181 --cargo=./cargo-nightly*/cargo/bin/cargo &amp;&amp;
[03d537cd]182make</userinput></screen>
183
184 <para>
185 To test the results, issue: <command>CFG_DISABLE_CROSS_TESTS=1
186 ./target/*-unknown-linux-gnu/release/cargo test</command>.
187 </para>
188
189 <para>
190 Now, as the <systemitem class="username">root</systemitem> user:
191 </para>
192
193<screen role="root"><userinput>make install &amp;&amp;
194mv -v /usr/etc/bash_completion.d/cargo /etc/bash_completion.d</userinput></screen>
195 </sect2>
196
197 <sect2 role="commands">
198 <title>Command Explanations</title>
199
200 <para>
201 <command>tar -xf ../../../rust-installer-&RUSTIDATE;.tar.xz ...</command>:
202 The rust-installer is needed, but not shipped with
203 <application>cargo</application>, so BLFS provides a repackaged git
204 snapshot.
205 </para>
206
207 <para>
208 <parameter>--cargo=</parameter>: This points to the binary of the previous
209 version, so that the package can be bootstrapped. When upgrading, or if
210 rebuilding, it is possible to use the current installed version without
211 this switch, but that takes longer and uses more space.
212 </para>
213
214 <para>
215 <command>CFG_DISABLE_CROSS_TESTS=1 ...</command>: By default the tests
216 will try to cover cross-builds for other architectures, but BLFS only
217 installs <command>rust</command> for the host architecture. This switch
218 also points to where cargo has been created, using a wildcard to match the
219 one target-triple directory which has been created.
220 </para>
221
222 <para>
223 <command>mv -v /usr/etc/bash_completion.d/cargo ...</command>: Cargo
224 accepts the sysconfdir switch but does not respect it. This fixes up the
225 misplaced file.
226 </para>
227 </sect2>
228
229 <sect2 role="content">
230 <title>Contents</title>
231
232 <segmentedlist>
233 <segtitle>Installed Program(s)</segtitle>
234 <segtitle>Installed Librar(y,ies)</segtitle>
235 <segtitle>Installed Director(y,ies)</segtitle>
236
237 <seglistitem>
238 <seg>
239 cargo
240 </seg>
241 <seg>
242 None
243 </seg>
244 <seg>
245 /usr/share/doc/cargo-&cargo-version; and
246 /usr/share/zsh/site-functions.
247 </seg>
248 </seglistitem>
249 </segmentedlist>
250
251 <variablelist>
252 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
253 <?dbfo list-presentation="list"?>
254 <?dbhtml list-presentation="table"?>
255
256 <varlistentry id="cargo-prog">
257 <term><command>cargo</command></term>
258 <listitem>
259 <para>
260 is the Package Manager for Rust.
261 </para>
262 <indexterm zone="cargo cargo-prog">
263 <primary sortas="b-cargo">cargo</primary>
264 </indexterm>
265 </listitem>
266 </varlistentry>
267
268 </variablelist>
269 </sect2>
270</sect1>
Note: See TracBrowser for help on using the repository browser.