Skip to content

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

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

wcampbell0x2a/zerus

Repository files navigation

zerus

github crates.io docs.rs build status

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
      --git-index-url <GIT_INDEX_URL>  hostname for git index crates.io
      --skip-git-index                 Skip download of git index crates.io
  -h, --help                           Print help

Example:

$ zerus new-mirror ../deku/Cargo.toml ../adsb_deku/Cargo.toml --git-index-url http://127.0.0.1

Serve mirror

Use any http(s) server.

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"

Margo

Through the use of margo, you can make a alternate Cargo registry without downloading the entire crates.io git index.

$ zerus mirror ../deku/Cargo.toml --build-std nightly --skip-git-index
$ margo add --registry my-registry-directory mirror/*/*/*/*/*/*.crate

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

No packages published