cargo-pkgid man page

cargo-pkgid — Print a fully qualified package specification

Synopsis

cargo pkgid [Options] [<SPEC>]

Description

Given a <SPEC> argument, print out the fully qualified package id specifier. This command will generate an error if <SPEC> is ambiguous as to which package it refers to in the dependency graph. If no <SPEC> is given, then the pkgid for the local package is printed.

This command requires that a lockfile is available and dependencies have been fetched.

Options

-h, --help
Print this message.
--manifest-path PATH
Path to the manifest to the package to clean.
-v, --verbose
Use verbose output.
-q, --quiet
No output printed to stdout.
--color WHEN
Coloring: auto, always, never.

Examples

Retrive package specification for foo package

$ cargo pkgid foo

Retrieve package specification for version 1.0.0 of foo

$ cargo pkgid foo:1.0.0

Retrive package specification for foo from crates.io

$ cargo pkgid crates.io/foo

See Also

cargo(1), cargo-generate-lockfile(1), cargo-search(1), cargo-metadata(1)

Info

July 2016 The Rust package manager Cargo Manual