#cargo-subcommand #cargo

app cargo-local-registry

A Cargo subcommand for managing local registries

13 releases

0.2.6 Jul 17, 2023
0.2.3 Aug 6, 2022
0.2.2 Dec 2, 2021
0.2.1 Apr 26, 2020
0.1.0 Feb 13, 2016

#60 in Cargo plugins

Download history 8984/week @ 2023-06-06 9812/week @ 2023-06-13 11226/week @ 2023-06-20 11672/week @ 2023-06-27 13511/week @ 2023-07-04 12449/week @ 2023-07-11 8584/week @ 2023-07-18 7129/week @ 2023-07-25 5809/week @ 2023-08-01 4828/week @ 2023-08-08 3988/week @ 2023-08-15 3194/week @ 2023-08-22 2567/week @ 2023-08-29 1461/week @ 2023-09-05 492/week @ 2023-09-12 387/week @ 2023-09-19

5,337 downloads per month


328 lines

cargo local-registry

Build Status Build status

This is a Cargo subcommand to ease maintenance of local registries. Support for a local registry is being added in rust-lang/cargo#2361 and will be able to redirect all Cargo downloads/requests to a registry stored locally.

This support is often useful for "offline builds" by preparing the list of all Rust dependencies ahead of time and shipping them to a build machine in a pre-ordained format. A local registry is an index and a collection of tarballs, all of which currently originate from crates.io.

The purpose of this subcommand will be to manage these registries and allow adding/deleting packages with ease.


To install from source you can execute:

cargo install cargo-local-registry

Note that you'll need the build tools listed below for this to succeed. If you'd prefer to download precompiled binaries assembled on the CI for this repository, you may also use the GitHub releases


As part of the build process you will need gcc, openssl and cmake in your PATH.

Afterwards you can build this repository via:

cargo build

And the resulting binary will be inside target/debug


One of the primary operations will be to create a local registry from a lock file itself. This can be done via

cargo local-registry --sync path/to/Cargo.lock path/to/registry

This command will:

  • Download all dependencies from the crates.io registry
  • Verify all checksums of what's downloaded
  • Place all downloads in path/to/registry
  • Prepare the index of path/to/registry to reflect all this information


This project is licensed under either of

at your option.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in cargo-local-registry by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


~1.5M SLoC