Skip to content
wcampbell0x2aPublic

About

Lightweight tool for creating and hosting project-specific and/or general offline crates.io mirrors

Topics

Resources

Stars

48 stars

Watchers

1 watching

Forks

Repository files navigation

zerus

github crates.io docs.rs build status

Lightweight tool for creating and hosting project-specific and/or general offline crates.io mirrors.

  • Mirror: Download the crates of your projects, or of crates by name.
  • Transfer: Record each transfer with a manifest, and carry only the new crates the next time.
  • Serve: Serve a sparse registry for cargo, with search and a web UI to browse the transfers.
  • See the book for usage, every option, and screenshots.

Installation

Either build from published source in crates.io.

$ cargo install zerus --locked

Or download from github releases.

Example

$ zerus mirror new-mirror Cargo.toml                         # download the crates of a project
$ zerus mirror new-mirror --crate serde@1.0.210              # download a crate and its dependencies
$ zerus cull new-mirror manifests/*.txt                      # remove the crates of previous transfers
$ zerus generate-manifest new-mirror -o manifests/$(date +%F).txt  # record this transfer
$ zerus update-index new-mirror --dl-url http://[IP]         # on the offline network
$ zerus serve new-mirror --manifests manifests/              # serve the registry and the web UI

See the book to point cargo at the mirror.

Development

All patches/merge requests are welcome!

just test   # run all the tests
just demo   # serve a demo mirror at http://127.0.0.1:3000
just book   # build the book, with new screenshots of the web UI

License

MIT or Apache-2.0, at your option.

About

Lightweight tool for creating and hosting project-specific and/or general offline crates.io mirrors

Topics

Resources

Stars

48 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages