6 releases (breaking)
0.7.0 | Apr 11, 2024 |
---|---|
0.6.0 | Feb 28, 2024 |
0.5.0 | Feb 3, 2024 |
0.4.0 | Feb 3, 2023 |
0.2.0 | Aug 7, 2022 |
#219 in Development tools
146 downloads per month
22KB
304 lines
zerus
Lightweight binary to download only project required crates for offline crates.io mirror
Build zerus
Either build from published source in crates.io.
$ cargo install zerus --locked
Or download from github releases.
Usage
Usage: zerus [OPTIONS] <MIRROR_PATH> [WORKSPACES]...
Arguments:
<MIRROR_PATH> new directory to contain offline mirror crate files
[WORKSPACES]... list of Cargo.toml files to vendor depends
Options:
--build-std <VERSION> Cache build-std depends for nightly version
-h, --help Print help
Example:
$ zerus new-mirror ../deku/Cargo.toml ../adsb_deku/Cargo.toml
# configure crates.io-index to point to our host
$ cat crates.io-index/config.json
{
"dl": "http://[IP]/crates/{prefix}/{crate}/{version}/{crate}-{version}.crate",
"api": "http://[IP]/crates"
}
Serve mirror
Use miniserve.
Build with mirror
Add the following to the .cargo/config
file(replacing IP with your ip).
[source.zerus]
registry = "sparse+http://[IP]/crates.io-index/"
[source.crates-io]
replace-with = "zerus"
Dependencies
~21–37MB
~647K SLoC