Go to file
bors f9e54817e5 Auto merge of #3781 - alexcrichton:beta-backport, r=alexcrichton
[backport] Fix deps with `cargo test --all` and doctests

This commit fixes `cargo test --all` with the way we ship libraries to `rustdoc
--test`. I'm... not entirely sure what the previous incarnation was doing but
the current organization is to interpret `compilation.libraries` as a mapping
from a package to the list of crates it needs to link to test.

This updates the support in `cargo_rustc/mod.rs` to create the map appropriately
and tweaks the loop in `cargo_test.rs` as well.

Closes rust-lang/rust#39879
2017-03-03 19:21:26 +00:00
src Fix deps with cargo test --all and doctests 2017-03-01 09:20:16 -08:00
tests make build tests not depend on minutiæ of rustc output 2017-03-03 11:21:09 -08:00
.gitignore Use externally sourced shell-escape 2016-12-30 10:21:10 -08:00
.gitmodules Use rust-installer for installation 2014-12-11 12:18:29 -08:00
.travis.yml Remove travis/appveyor caches 2017-03-03 09:50:10 -08:00
appveyor.yml Remove travis/appveyor caches 2017-03-03 09:50:10 -08:00
Cargo.lock Update libz-sys to fix build errors on Windows 2017-03-03 10:43:25 -08:00
Cargo.toml make certain dependencies Windows-only 2017-01-06 07:03:05 -05:00
configure Add support for release branches in Cargo 2016-11-30 09:36:16 -08:00
LICENSE-APACHE Add the standard Rust Apache/MIT license 2014-06-24 12:26:13 -07:00
LICENSE-MIT Add the standard Rust Apache/MIT license 2014-06-24 12:26:13 -07:00
LICENSE-THIRD-PARTY Clean whitespace 2015-10-06 13:15:40 -04:00
Makefile.in Update OPENSSL_CC_powerpc64-unknown-linux-gnu 2017-02-04 21:50:46 -08:00
README.md Delete manual installation URLs 2016-12-29 08:06:38 -08:00

Cargo downloads your Rust projects dependencies and compiles your project.

Learn more at http://doc.crates.io/

Code Status

Build Status Build Status

Installing Cargo

Cargo is distributed by default with Rust, so if you've got rustc installed locally you probably also have cargo installed locally.

Compiling from Source

Cargo requires the following tools and packages to build:

  • python
  • curl (on Unix)
  • cmake
  • OpenSSL headers (only for Unix, this is the libssl-dev package on ubuntu)
  • cargo and rustc

First, you'll want to check out this repository

git clone --recursive https://github.com/rust-lang/cargo
cd cargo

With cargo already installed, you can simply run:

cargo build --release

Otherwise, you can also use a more traditional approach:

./configure
make
make install

More options can be discovered through ./configure, such as compiling cargo for more than one target. For example, if you'd like to compile both 32 and 64 bit versions of cargo on unix you would use:

$ ./configure --target=i686-unknown-linux-gnu,x86_64-unknown-linux-gnu

Running the tests

To run cargo's tests, use cargo test. If you do not have the cross-compilers installed locally, ignore the cross-compile test failures, or disable them by using CFG_DISABLE_CROSS_TESTS=1 cargo test.

Adding new subcommands to Cargo

Cargo is designed to be extensible with new subcommands without having to modify Cargo itself. See the Wiki page for more details and a list of known community-developed subcommands.

Contributing to the Docs

To contribute to the docs, all you need to do is change the markdown files in the src/doc directory. To view the rendered version of changes you have made locally, run:

./configure
make doc
open target/doc/index.html

Releases

High level release notes are available as part of Rust's release notes. Cargo releases coincide with Rust releases.

Table of Rust versions with their Cargo versions
Rust version Cargo version
1.12.0 0.13.0
1.11.0 0.12.0
1.10.0 0.11.0
1.9.0 0.10.0
1.8.0 0.9.0
1.7.0 0.8.0
1.6.0 0.7.0
1.5.0 0.6.0
1.4.0 0.5.0
1.3.0 0.4.0
1.2.0 0.3.0
1.1.0 0.2.0
1.0.0 0.1.0

Reporting Issues

Found a bug? We'd love to know about it!

Please report all issues on the github issue tracker.

License

Cargo is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT for details.

Third party software

This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/).

In binary form, this product includes software that is licensed under the terms of the GNU General Public License, version 2, with a linking exception, which can be obtained from the upstream repository.