uv/Cargo.toml
Charlie Marsh 2a846e76b7
Store unzipped wheels in a cache (#49)
This PR massively speeds up the case in which you need to install wheels
that already exist in the global cache.

The new strategy is as follows:

- Download the wheel into the content-addressed cache.
- Unzip the wheel into the cache, but ignore content-addressing. It
turns out that writing to `cacache` for every file in the zip added a
ton of overhead, and I don't see any actual advantages to doing so.
Instead, we just unzip the contents into a directory at, e.g.,
`~/.cache/puffin/django-4.1.5`.
- (The unzip itself is now parallelized with Rayon.)
- When installing the wheel, we now support unzipping from a directory
instead of a zip archive. This required duplicating and tweaking a few
functions.
- When installing the wheel, we now use reflinks (or copy-on-write
links). These have a few fantastic properties: (1) they're extremely
cheap to create (on macOS, they are allegedly faster than hard links);
(2) they minimize disk space, since we avoid copying files entirely in
the vast majority of cases; and (3) if the user then edits a file
locally, the cache doesn't get polluted. Orogene, Bun, and soon pnpm all
use reflinks.

Puffin is now ~15x faster than `pip` for the common case of installing
cached data into a fresh environment.

Closes https://github.com/astral-sh/puffin/issues/21.

Closes https://github.com/astral-sh/puffin/issues/39.
2023-10-08 04:04:48 +00:00

56 lines
2 KiB
TOML

[workspace]
members = ["crates/*"]
resolver = "2"
[workspace.package]
edition = "2021"
rust-version = "1.72"
homepage = "https://astral.sh"
documentation = "https://astral.sh"
repository = "https://github.com/astral-sh/puffin"
authors = ["Astral Software Inc. <hey@astral.sh>"]
license = "MIT OR Apache-2.0"
[workspace.dependencies]
anyhow = { version = "1.0.75" }
bitflags = { version = "2.4.0" }
cacache = { version = "11.7.1", default-features = false, features = ["tokio-runtime"] }
clap = { version = "4.4.6" }
colored = { version = "2.0.4" }
configparser = { version = "3.0.2" }
csv = { version = "1.3.0" }
data-encoding = { version = "2.4.0" }
directories = { version = "5.0.1" }
fs-err = { version = "2.9.0" }
fs2 = { version = "0.4.3" }
futures = { version = "0.3.28" }
glibc_version = { version = "0.1.2" }
goblin = { version = "0.7.1" }
http-cache-reqwest = { version = "0.11.3" }
mailparse = { version = "0.14.0" }
memchr = { version = "2.6.4" }
once_cell = { version = "1.18.0" }
platform-info = { version = "2.0.2" }
plist = { version = "1.5.0" }
rayon = { version = "1.8.0" }
reflink-copy = { version = "0.1.9" }
regex = { version = "1.9.6" }
reqwest = { version = "0.11.22", features = ["json", "gzip", "brotli", "stream"] }
reqwest-middleware = { version = "0.2.3" }
reqwest-retry = { version = "0.3.0" }
rfc2047-decoder = { version = "1.0.1" }
serde = { version = "1.0.188" }
serde_json = { version = "1.0.107" }
sha2 = { version = "0.10.8" }
target-lexicon = { version = "0.12.11" }
tempfile = { version = "3.8.0" }
thiserror = { version = "1.0.49" }
tokio = { version = "1.16.1", features = ["rt-multi-thread"] }
tokio-util = { version = "0.7.9", features = ["compat"] }
tracing = { version = "0.1.37" }
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
tracing-tree = { version = "0.2.5" }
unicode-width = { version = "0.1.8" }
url = { version = "2.4.1" }
walkdir = { version = "2.4.0" }
zip = { version = "0.6.6", default-features = false, features = ["deflate"] }