]>
Commit | Line | Data |
---|---|---|
b4e86302 YK |
1 | Cargo downloads your Rust project’s dependencies and compiles your project. |
2 | ||
3 | Learn more at http://crates.io/. | |
4 | ||
1aaaf851 | 5 | ## Installing cargo from nightlies |
ffd985f1 AC |
6 | |
7 | Cargo has nightlies available for use. The cargo source is not always guaranteed | |
8 | to compile on rust master as it may lag behind by a day or two. Nightlies, | |
9 | however, will run regardless of this fact! | |
10 | ||
a39a331a CD |
11 | ```sh |
12 | triple=x86_64-unknown-linux-gnu | |
cce8d582 | 13 | curl -O https://static.rust-lang.org/cargo-dist/cargo-nightly-$triple.tar.gz |
a39a331a CD |
14 | tar xf cargo-nightly-$triple.tar.gz |
15 | ./cargo-nightly-$triple/install.sh | |
ffd985f1 AC |
16 | ``` |
17 | ||
c1bbc721 | 18 | Nightlies are available for the following triples: |
ffd985f1 | 19 | |
cce8d582 BA |
20 | * [`x86_64-unknown-linux-gnu`](https://static.rust-lang.org/cargo-dist/cargo-nightly-x86_64-unknown-linux-gnu.tar.gz) |
21 | * [`i686-unknown-linux-gnu`](https://static.rust-lang.org/cargo-dist/cargo-nightly-i686-unknown-linux-gnu.tar.gz) | |
22 | * [`x86_64-apple-darwin`](https://static.rust-lang.org/cargo-dist/cargo-nightly-x86_64-apple-darwin.tar.gz) | |
23 | * [`i686-apple-darwin`](https://static.rust-lang.org/cargo-dist/cargo-nightly-i686-apple-darwin.tar.gz) | |
24 | * [`x86_64-w64-mingw32`](https://static.rust-lang.org/cargo-dist/cargo-nightly-x86_64-w64-mingw32.tar.gz) | |
25 | * [`i686-w64-mingw32`](https://static.rust-lang.org/cargo-dist/cargo-nightly-i686-w64-mingw32.tar.gz) | |
c1bbc721 AC |
26 | |
27 | Note that if you're using the windows snapshot you will need Mingw-w64 installed | |
28 | as well as MSYS. The installation script needs to be run inside the MSYS shell. | |
ffd985f1 | 29 | |
41a4df26 | 30 | ## Compiling cargo |
31 | ||
5ef03758 AC |
32 | Cargo requires the following tools and packages to build: |
33 | ||
34 | * `rustc` | |
35 | * `python` | |
36 | * `curl` or `wget` | |
37 | * `cmake` | |
38 | * `pkg-config` | |
39 | * OpenSSL headers (`libssl-dev` package on ubuntu) | |
40 | ||
41 | Cargo can then be compiled like many other standard unix-like projects: | |
c1bbc721 | 42 | |
a39a331a CD |
43 | ```sh |
44 | git clone https://github.com/rust-lang/cargo | |
45 | cd cargo | |
46 | ./configure | |
47 | make | |
48 | make install | |
c1bbc721 | 49 | ``` |
e2353a5b | 50 | |
c1bbc721 AC |
51 | More options can be discovered through `./configure`, such as compiling cargo |
52 | for more than one target. For example, if you'd like to compile both 32 and 64 | |
53 | bit versions of cargo on unix you would use: | |
54 | ||
55 | ``` | |
3b77b2c7 | 56 | $ ./configure --target=i686-unknown-linux-gnu,x86_64-unknown-linux-gnu |
c1bbc721 | 57 | ``` |
41a4df26 | 58 | |
fe624014 YK |
59 | ## Contributing to the Docs |
60 | ||
2f86d742 EB |
61 | To contribute to the docs, all you need to do is change the markdown files in |
62 | the `src/doc` directory. | |
fe624014 | 63 | |
c1bbc721 AC |
64 | ## Reporting Issues |
65 | ||
66 | Found a bug? We'd love to know about it! | |
67 | ||
68 | Please report all issues on the github [issue tracker][issues]. | |
69 | ||
70 | [issues]: https://github.com/rust-lang/cargo/issues | |
71 | ||
c6fc2f58 AC |
72 | ## License |
73 | ||
74 | Cargo is primarily distributed under the terms of both the MIT license | |
75 | and the Apache License (Version 2.0). | |
76 | ||
77 | See LICENSE-APACHE and LICENSE-MIT for details. |