cargo-index

Crates.iocargo-index
lib.rscargo-index
version0.2.7
sourcesrc
created_at2018-12-24 01:36:58.093675
updated_at2023-10-23 17:42:14.616415
descriptionCargo subcommand to manage a registry index.
homepagehttps://github.com/ehuss/cargo-index
repositoryhttps://github.com/ehuss/cargo-index
max_upload_size
id103553
size81,990
Eric Huss (ehuss)

documentation

README

cargo index

crates.io

An experimental Cargo subcommand to access and manipulate a registry index.

See reg-index for the corresponding library that implements this command's functionality.

Installation

cargo install cargo-index

This requires at a minimum Cargo 1.70.

Usage

The cargo index command provides several sub-commands:

Subcommand Description
add Add a package to an index.

init | Create a new index. list | List entries in the index. metadata | Generate JSON metadata for a package. unyank | Un-yank a crate from an index. validate | Validate the format of an index. yank | Yank a crate from an index.

Run the sub-command with --help to get more information.

Example

Example of creating an index and manually adding a new package:

  1. cargo index init --dl https://example.com --index index

    This creates a new git repository in the directory index with the appropriate config.json file.

  2. cargo new foo

    Create a sample project to add.

  3. cd foo

  4. cargo index add --index ../index --index-url https://example.com -- --allow-dirty

    Adds the foo package to the index.

  5. cargo index list --index ../index -p foo

    Shows the JSON metadata for every version of foo in the index.

Commit count: 70

cargo fmt