source: archive/cargo.xml@ 4c6edac

10.0 10.1 11.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind ken/refactor-virt lazarus perl-modules qt5new trunk xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since 4c6edac was 4c6edac, checked in by Ken Moffat <ken@…>, 4 years ago

Rustc-1.19.0, archive llvm-3 and also the separate cargo which is now installed by rust.

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

  • Property mode set to 100644
File size: 8.4 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 cargo-download-http "https://github.com/rust-lang/cargo/archive/&cargo-version;/cargo-&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 <bridgehead renderas="sect3">Package Information</bridgehead>
63 <itemizedlist spacing="compact">
64 <listitem>
65 <para>
66 Download (HTTP): <ulink url="&cargo-download-http;"/>
67 </para>
68 </listitem>
69 <listitem>
70 <para>
71 Download (FTP): <ulink url="&cargo-download-ftp;"/>
72 </para>
73 </listitem>
74 <listitem>
75 <para>
76 Download MD5 sum: &cargo-md5sum;
77 </para>
78 </listitem>
79 <listitem>
80 <para>
81 Download size: &cargo-size;
82 </para>
83 </listitem>
84 <listitem>
85 <para>
86 Estimated disk space required: &cargo-buildsize;
87 </para>
88 </listitem>
89 <listitem>
90 <para>
91 Estimated build time: &cargo-time;
92 </para>
93 </listitem>
94 </itemizedlist>
95
96 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
97 <itemizedlist spacing="compact">
98 <listitem>
99 <para>Rust Installer:
100 <ulink url="&rusti-download-http;"/></para>
101 </listitem>
102 <listitem>
103 <para>Installer MD5 sum: &rusti-md5sum;</para>
104 </listitem>
105 <listitem>
106 <para>Installer size: &rusti-size;</para>
107 </listitem>
108 </itemizedlist>
109 <itemizedlist spacing="compact">
110 <listitem>
111 <para>Binary download (x86_64):
112 <ulink url="&cargoprev64-download-http;"/></para>
113 </listitem>
114 <listitem>
115 <para>Binary x86_64 MD5 sum: &cargoprev64-md5sum;</para>
116 </listitem>
117 <listitem>
118 <para>Binary x86_64 download size: &cargoprev64-size;</para>
119 </listitem>
120 </itemizedlist>
121 <itemizedlist spacing="compact">
122 <listitem>
123 <para>Binary download (i686):
124 <ulink url="&cargoprev32-download-http;"/></para>
125 </listitem>
126 <listitem>
127 <para>Binary i686 MD5 sum: &cargoprev32-md5sum;</para>
128 </listitem>
129 <listitem>
130 <para>Binary i686 download size: &cargoprev32-size;</para>
131 </listitem>
132 </itemizedlist>
133
134 <bridgehead renderas="sect3">Cargo Dependencies</bridgehead>
135
136 <bridgehead renderas="sect4">Required</bridgehead>
137 <para role="required">
138 <xref linkend="cmake"/>,
139 <xref linkend="rust"/>
140 </para>
141
142 <bridgehead renderas="sect4">Optional</bridgehead>
143 <para role="optional">
144 <xref linkend="git"/>,
145 <xref linkend="openssl"/>
146 </para>
147
148 <para condition="html" role="usernotes">
149 User Notes: <ulink url="&blfs-wiki;/cargo"/>
150 </para>
151 </sect2>
152
153 <sect2 role="installation">
154 <title>Installation of cargo</title>
155
156 <para>
157 Install <application>cargo</application> by running the following
158 commands:
159 </para>
160
161<screen><userinput>tar -xf ../rust-installer-&RUSTIDATE;.tar.xz \
162 --strip-components=1 --directory src/rust-installer &amp;&amp;
163
164case $(uname -m) in
165 x86_64) tar -xf ../cargo-&CARGOPREV;-x86_64-unknown-linux-gnu.tar.gz
166 ;;
167 i686) tar -xf ../cargo-&CARGOPREV;-i686-unknown-linux-gnu.tar.gz
168 ;;
169esac &amp;&amp;
170
171./configure --prefix=/usr \
172 --sysconfdir=/etc \
173 --docdir=/usr/share/doc/cargo-&cargo-version; \
174 --cargo=./cargo-nightly*/cargo/bin/cargo &amp;&amp;
175make</userinput></screen>
176
177 <para>
178 To test the results, issue: <command>CFG_DISABLE_CROSS_TESTS=1
179 ./target/*-unknown-linux-gnu/release/cargo test</command>.
180 </para>
181
182 <para>
183 Now, as the <systemitem class="username">root</systemitem> user:
184 </para>
185
186<screen role="root"><userinput>make install &amp;&amp;
187mv -v /usr/etc/bash_completion.d/cargo /etc/bash_completion.d</userinput></screen>
188 </sect2>
189
190 <sect2 role="commands">
191 <title>Command Explanations</title>
192
193 <para>
194 <command>tar -xf ../rust-installer-&RUSTIDATE;.tar.xz ...</command>:
195 The rust-installer is needed, but not shipped with
196 <application>cargo</application>, so BLFS provides a repackaged git
197 snapshot.
198 </para>
199
200 <para>
201 <parameter>--cargo=</parameter>: This points to the binary of the previous
202 version, so that the package can be bootstrapped. When upgrading, or if
203 rebuilding, it is possible to use the current installed version without
204 this switch, but that takes longer and uses more space.
205 </para>
206
207 <para>
208 <command>CFG_DISABLE_CROSS_TESTS=1 ...</command>: By default the tests
209 will try to cover cross-builds for other architectures, but BLFS only
210 installs <command>rust</command> for the host architecture. This switch
211 also points to where cargo has been created, using a wildcard to match the
212 one target-triple directory which has been created.
213 </para>
214
215 <para>
216 <command>mv -v /usr/etc/bash_completion.d/cargo ...</command>: Cargo
217 accepts the sysconfdir switch but does not respect it. This fixes up the
218 misplaced file.
219 </para>
220 </sect2>
221
222 <sect2 role="content">
223 <title>Contents</title>
224
225 <segmentedlist>
226 <segtitle>Installed Program(s)</segtitle>
227 <segtitle>Installed Librar(y,ies)</segtitle>
228 <segtitle>Installed Director(y,ies)</segtitle>
229
230 <seglistitem>
231 <seg>
232 cargo
233 </seg>
234 <seg>
235 None
236 </seg>
237 <seg>
238 /usr/share/doc/cargo-&cargo-version; and
239 /usr/share/zsh/site-functions.
240 </seg>
241 </seglistitem>
242 </segmentedlist>
243
244 <variablelist>
245 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
246 <?dbfo list-presentation="list"?>
247 <?dbhtml list-presentation="table"?>
248
249 <varlistentry id="cargo-prog">
250 <term><command>cargo</command></term>
251 <listitem>
252 <para>
253 is the Package Manager for Rust.
254 </para>
255 <indexterm zone="cargo cargo-prog">
256 <primary sortas="b-cargo">cargo</primary>
257 </indexterm>
258 </listitem>
259 </varlistentry>
260
261 </variablelist>
262 </sect2>
263</sect1>
Note: See TracBrowser for help on using the repository browser.