Skip to content

wcampbell0x2a/zerus

Repository files navigation

zerus

github crates.io docs.rs build status

Lightweight tool for creating project-specific offline crates.io mirrors

Build zerus

Either build from published source in crates.io.

$ cargo install zerus --locked

Or download from github releases.

Usage

Download crates

Use zerus mirror to download .crate files for your project's dependencies.

$ zerus mirror new-mirror ../deku/Cargo.toml ../adsb_deku/Cargo.toml

Adding the top 100 rust crates used by rust-playground is easy:

$ git clone https://github.com/rust-lang/rust-playground
$ zerus mirror new-mirror rust-playground/top-crates/Cargo.toml

Transfer to offline network

Copy the mirror directory to your proxy or offline network.

Generate index

On the offline network, use update-index to generate a registry index from the .crate files.

$ zerus update-index new-mirror --dl-url http://[IP]

Serve mirror

Use any http(s) server to host the mirror directory.

Build with mirror

Add the following to .cargo/config.toml (replacing [IP] with your server address).

[source.zerus]
registry = "sparse+http://[IP]/crates.io-index/"

[source.crates-io]
replace-with = "zerus"

About

Lightweight binary to download only project required crates for offline crates.io mirror

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors