Lightweight binary to download only project required crates for offline crates.io mirror
The example use case is with nightly feature sparse-registry. However, a crates.io-index mirror git repo can be hosted on its on and point towards this repo with stable rust.
Either build from published source in crates.io.
$ cargo install zerus --locked
Or download from github releases.
```console
Usage: zerus
Arguments:
Options: -h, --help Print help information ```
Example: ```console $ zerus new-mirror ../deku/Cargo.toml ../adsb_deku/Cargo.toml $ cd new-mirror $ git clone https://github.com/rust-lang/crates.io-index
$ cat crates.io-index/config.json { "dl": "http://[IP]/crates/{prefix}/{crate}/{version}/{crate}-{version}.crate", "api": "http://[IP]/crates" } ```
Use miniserve.
Add the following to the .cargo/config
file(replacing IP with your ip).
```
[registries.crates-io]
protocol = "sparse"
[source.zerus] registry = "sparse+http://[IP]/crates.io-index/"
[source.crates-io] replace-with = "zerus" ```