#download #version #io #directory #checksum #index #registry

app get-all-crates

Download .crate files of all version of all crates from crates.io

14 releases

0.1.13 Mar 21, 2024
0.1.11 Dec 25, 2023
0.1.10 Oct 4, 2023
0.1.7 Jun 17, 2023
0.1.1 Dec 27, 2022

#67 in Development tools

Download history 40/week @ 2023-12-23 28/week @ 2023-12-30 5/week @ 2024-01-06 5/week @ 2024-01-13 3/week @ 2024-01-20 5/week @ 2024-01-27 7/week @ 2024-02-03 7/week @ 2024-02-10 47/week @ 2024-02-17 49/week @ 2024-02-24 23/week @ 2024-03-02 44/week @ 2024-03-09 133/week @ 2024-03-16 35/week @ 2024-03-23 34/week @ 2024-03-30 17/week @ 2024-04-06

226 downloads per month

MIT license

23KB
471 lines

get-all-crates

github crates.io build status

Download .crate files of all versions of all crates from crates.io.

Useful for things like noisy-clippy which need to analyze the source code of all crates.

I wrote this tool to saturate a 1000 Mbps connection. From scratch, it can finish downloading in under 20 minutes. It can also check the checksums of a directory of downloaded crates in 40 seconds on 64 cores. For a more fully featured tool, which some of this code is based on, but which is much slower in my experience, check out https://git.shipyard.rs/jstrong/registry-backup.


Usage

$ cargo install get-all-crates
$ git clone https://github.com/rust-lang/crates.io-index /path/to/index
$ get-all-crates --index /path/to/index --out /path/to/crates

Warning: as of 2022 this writes out more than 100 GB of crates.

The output directory structure is similar to how Cargo's registry index is structured:

/path/to/crates
 ├── 1
 │  └── m
 │     └── m-0.1.1.crate
 ├── 2
 │  └── nu
 │     └── nu-0.73.0.crate
 ├── 3
 │  └── s
 │     └── syn
 │        └── syn-1.0.107.crate
 └── se
    └── rd
       ├── serde
       │  └── serde-1.0.151.crate
       └── serde_json
          └── serde_json-1.0.91.crate

License

MIT license.

Dependencies

~14–31MB
~488K SLoC