zerus =========================== [github](https://github.com/wcampbell0x2a/zerus) [crates.io](https://crates.io/crates/zerus) [docs.rs](https://docs.rs/zerus) [build status](https://github.com/wcampbell0x2a/zerus/actions?query=branch%3Amaster) 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](https://github.com/wcampbell0x2a/zerus/releases). ## Usage ```console Usage: zerus [OPTIONS] [WORKSPACES]... Arguments: new directory to contain offline mirror crate files [WORKSPACES]... list of Cargo.toml files to vendor depends Options: --build-std Cache build-std depends for nightly version -h, --help Print help ``` Example: ```console $ 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](https://github.com/svenstaro/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" ```