MCPcopy Index your code
hub / github.com/dhovart/cargo-local-registry

github.com/dhovart/cargo-local-registry @v0.2.12

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2.12 ↗ · + Follow
42 symbols 160 edges 2 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

CI Tests

cargo local-registry

This is a Cargo subcommand to ease maintenance of local registries.

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.

Installation

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

Building

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

Usage

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

Full usage informaton:

cargo-local-registry [OPTIONS] [PATH] [COMMAND]

Commands:
  sync  Sync the registry with a Cargo.lock file
  add   Add a crate to the registry
  help  Print this message or the help of the given subcommand(s)

Arguments:
  [PATH]  Path to the local registry

Options:
  -s, --sync <SYNC>    Sync the registry with lockfile (backwards compatibility)
      --host <HOST>    Registry index to sync with
      --git            Vendor git dependencies as well
      --no-delete      Don't delete older crates in the local registry directory
  -v, --verbose...     Use verbose output
  -q, --quiet          No output printed to stdout
  -c, --color <COLOR>  Coloring: auto, always, never
  -h, --help           Print help
  -V, --version        Print version

License

This project is licensed under either of

  • Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.

Contribution

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.

Core symbols most depended-on inside this repo

cmd
called by 26
tests/all.rs
run
called by 26
tests/all.rs
lock
called by 15
tests/all.rs
handle_sync
called by 2
src/main.rs
sync_lockfile
called by 2
src/main.rs
real_main
called by 1
src/main.rs
add_crate
called by 1
src/main.rs
scan_delete
called by 1
src/main.rs

Shape

Function 35
Class 4
Enum 2
Method 1

Languages

Rust100%

Modules by API surface

tests/all.rs23 symbols
src/main.rs19 symbols

For agents

$ claude mcp add cargo-local-registry \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page