cargo/Cargo.toml
Alex Crichton 5cca4e8c24 Leverage local links on git checkouts
This commit updates the handling of git checkouts from the database to use
hardlinks if possible, speeding up this operation for large repositories
significantly.

As a refresher, Cargo caches git repositories in a few locations to speed up
local usage of git repositories. Cargo has a "database" folder which is a bare
checkout of any git repository Cargo has cached historically. This database
folder contains effectively a bunch of databases for remote repos that are
updated periodically.

When actually building a crate Cargo will clone this database into a different
location, the checkouts folder. Each rev we build (ever) is cached in the
checkouts folder. This means that once a checkout directory is created it's
frozen for all of time.

This latter step is what this commit is optimizing. When checking out the
database onto the local filesystem at a particular revision. Previously we were
instructing libgit2 to fall back to a "git aware" transport which was
exceedingly slow on some systems for filesystem-to-filesystem transfers. This
optimization (we just forgot to turn it on in libgit2) is a longstanding one and
should speed this up significantly!

Closes #4604
2018-01-08 09:38:40 -08:00

90 lines
1.7 KiB
TOML

[package]
name = "cargo"
version = "0.26.0"
authors = ["Yehuda Katz <wycats@gmail.com>",
"Carl Lerche <me@carllerche.com>",
"Alex Crichton <alex@alexcrichton.com>"]
license = "MIT/Apache-2.0"
homepage = "https://crates.io"
repository = "https://github.com/rust-lang/cargo"
documentation = "https://docs.rs/cargo"
description = """
Cargo, a package manager for Rust.
"""
[lib]
name = "cargo"
path = "src/cargo/lib.rs"
[dependencies]
atty = "0.2"
crates-io = { path = "src/crates-io", version = "0.15" }
crossbeam = "0.3"
crypto-hash = "0.3"
curl = "0.4.6"
docopt = "0.8.1"
env_logger = "0.4"
failure = "0.1.1"
filetime = "0.1"
flate2 = "1.0"
fs2 = "0.4"
git2 = "0.6.11"
git2-curl = "0.7"
glob = "0.2"
hex = "0.3"
home = "0.3"
ignore = "0.3"
jobserver = "0.1.6"
libc = "0.2"
libgit2-sys = "0.6"
log = "0.4"
num_cpus = "1.0"
same-file = "1"
scoped-tls = "0.1"
semver = { version = "0.9.0", features = ["serde"] }
serde = "1.0"
serde_derive = "1.0"
serde_ignored = "0.0.4"
serde_json = "1.0"
shell-escape = "0.1"
tar = { version = "0.4", default-features = false }
tempdir = "0.3"
termcolor = "0.3"
toml = "0.4"
url = "1.1"
[target.'cfg(target_os = "macos")'.dependencies]
core-foundation = { version = "0.4.4", features = ["mac_os_10_7_support"] }
[target.'cfg(windows)'.dependencies]
miow = "0.2"
[target.'cfg(windows)'.dependencies.winapi]
version = "0.3"
features = [
"handleapi",
"jobapi",
"jobapi2",
"minwindef",
"ntdef",
"processenv",
"processthreadsapi",
"psapi",
"synchapi",
"winerror",
"winbase",
"wincon",
"winnt",
]
[dev-dependencies]
bufstream = "0.1"
cargotest = { path = "tests/cargotest", version = "0.1" }
filetime = "0.1"
hamcrest = "=0.1.1"
[[bin]]
name = "cargo"
test = false
doc = false