363 lines
8.4 KiB
HTML
363 lines
8.4 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of CARGO-PKGID</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>CARGO-PKGID</H1>
|
|
Section: (1)<BR>Updated: 2019-09-05<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
cargo-pkgid - Print a fully qualified package specification
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<P>
|
|
<B>cargo pkgid [</B><I>OPTIONS</I>] [<I>SPEC</I>]
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
Given a <I>SPEC</I> argument, print out the fully qualified package ID specifier
|
|
for a package or dependency in the current workspace. This command will
|
|
generate an error if <I>SPEC</I> is ambiguous as to which package it refers to in
|
|
the dependency graph. If no <I>SPEC</I> is given, then the specifier for the local
|
|
package is printed.
|
|
<P>
|
|
This command requires that a lockfile is available and dependencies have been
|
|
fetched.
|
|
<P>
|
|
A package specifier consists of a name, version, and source URL. You are
|
|
allowed to use partial specifiers to succinctly match a specific package as
|
|
long as it matches only one package. The format of a <I>SPEC</I> can be one of the
|
|
following:
|
|
<P>
|
|
|
|
|
|
|
|
<BR>
|
|
|
|
<B>Table 1. SPEC Query Format</B>
|
|
|
|
<TABLE BORDER>
|
|
<TR VALIGN=top><TD>
|
|
<P>
|
|
SPEC Structure
|
|
</TD><TD>
|
|
<P>
|
|
Example SPEC
|
|
<BR></TD></TR>
|
|
<TR VALIGN=top><TD>
|
|
<P>
|
|
<I>NAME</I>
|
|
</TD><TD>
|
|
<P>
|
|
<B>bitflags</B>
|
|
<BR></TD></TR>
|
|
<TR VALIGN=top><TD>
|
|
<P>
|
|
<I>NAME</I><B>:</B><I>VERSION</I>
|
|
</TD><TD>
|
|
<P>
|
|
<B>bitflags:1.0.4</B>
|
|
<BR></TD></TR>
|
|
<TR VALIGN=top><TD>
|
|
<P>
|
|
<I>URL</I>
|
|
</TD><TD>
|
|
<P>
|
|
<B>
|
|
<I></I> <<A HREF="https://github.com/rust-lang/cargo">https://github.com/rust-lang/cargo</A>></B>
|
|
|
|
<BR></TD></TR>
|
|
<TR VALIGN=top><TD>
|
|
<P>
|
|
<I>URL</I><B>#</B><I>VERSION</I>
|
|
</TD><TD>
|
|
<P>
|
|
<B>
|
|
<I></I> <<A HREF="https://github.com/rust-lang/cargo#0.33.0">https://github.com/rust-lang/cargo#0.33.0</A>></B>
|
|
|
|
<BR></TD></TR>
|
|
<TR VALIGN=top><TD>
|
|
<P>
|
|
<I>URL</I><B>#</B><I>NAME</I>
|
|
</TD><TD>
|
|
<P>
|
|
<B>
|
|
<I></I> <<A HREF="https://github.com/rust-lang/crates.io-index#bitflags">https://github.com/rust-lang/crates.io-index#bitflags</A>></B>
|
|
|
|
<BR></TD></TR>
|
|
<TR VALIGN=top><TD>
|
|
<P>
|
|
<I>URL</I><B>#</B><I>NAME</I><B>:</B><I>VERSION</I>
|
|
</TD><TD>
|
|
<P>
|
|
<B>
|
|
<I></I> <<A HREF="https://github.com/rust-lang/cargo#crates-io:0.21.0">https://github.com/rust-lang/cargo#crates-io:0.21.0</A>></B>
|
|
|
|
<BR></TD></TR>
|
|
</TABLE>
|
|
|
|
<P>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H3>Package Selection</H3>
|
|
|
|
<P>
|
|
<B>-p</B> <I>SPEC</I>, <B>--package</B> <I>SPEC</I>
|
|
<DL COMPACT><DT id="1"><DD>
|
|
Get the package ID for the given package instead of the current package.
|
|
</DL>
|
|
|
|
<A NAME="lbAG"> </A>
|
|
<H3>Display Options</H3>
|
|
|
|
<P>
|
|
<B>-v</B>, <B>--verbose</B>
|
|
<DL COMPACT><DT id="2"><DD>
|
|
Use verbose output. May be specified twice for "very verbose" output which
|
|
includes extra output such as dependency warnings and build script output.
|
|
May also be specified with the <B>term.verbose</B>
|
|
|
|
<I>config value</I> <<A HREF="https://doc.rust-lang.org/cargo/reference/config.html">https://doc.rust-lang.org/cargo/reference/config.html</A>>.
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
<B>-q</B>, <B>--quiet</B>
|
|
<DL COMPACT><DT id="3"><DD>
|
|
No output printed to stdout.
|
|
</DL>
|
|
|
|
<P>
|
|
<B>--color</B> <I>WHEN</I>
|
|
<DL COMPACT><DT id="4"><DD>
|
|
Control when colored output is used. Valid values:
|
|
<P>
|
|
<DL COMPACT><DT id="5"><DD>
|
|
•
|
|
|
|
|
|
<B>auto</B> (default): Automatically detect if color support is available on the
|
|
terminal.
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="6"><DD>
|
|
•
|
|
|
|
|
|
<B>always</B>: Always display colors.
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="7"><DD>
|
|
•
|
|
|
|
|
|
<B>never</B>: Never display colors.
|
|
</DL>
|
|
|
|
<P>
|
|
May also be specified with the <B>term.color</B>
|
|
|
|
<I>config value</I> <<A HREF="https://doc.rust-lang.org/cargo/reference/config.html">https://doc.rust-lang.org/cargo/reference/config.html</A>>.
|
|
|
|
</DL>
|
|
|
|
<A NAME="lbAH"> </A>
|
|
<H3>Manifest Options</H3>
|
|
|
|
<P>
|
|
<B>--manifest-path</B> <I>PATH</I>
|
|
<DL COMPACT><DT id="8"><DD>
|
|
Path to the <B>Cargo.toml</B> file. By default, Cargo searches for the
|
|
<B>Cargo.toml</B> file in the current directory or any parent directory.
|
|
</DL>
|
|
|
|
<P>
|
|
<B>--frozen</B>, <B>--locked</B>
|
|
<DL COMPACT><DT id="9"><DD>
|
|
Either of these flags requires that the <B>Cargo.lock</B> file is
|
|
up-to-date. If the lock file is missing, or it needs to be updated, Cargo will
|
|
exit with an error. The <B>--frozen</B> flag also prevents Cargo from
|
|
attempting to access the network to determine if it is out-of-date.
|
|
<P>
|
|
These may be used in environments where you want to assert that the
|
|
<B>Cargo.lock</B> file is up-to-date (such as a CI build) or want to avoid network
|
|
access.
|
|
</DL>
|
|
|
|
<P>
|
|
<B>--offline</B>
|
|
<DL COMPACT><DT id="10"><DD>
|
|
Prevents Cargo from accessing the network for any reason. Without this
|
|
flag, Cargo will stop with an error if it needs to access the network and
|
|
the network is not available. With this flag, Cargo will attempt to
|
|
proceed without the network if possible.
|
|
<P>
|
|
Beware that this may result in different dependency resolution than online
|
|
mode. Cargo will restrict itself to crates that are downloaded locally, even
|
|
if there might be a newer version as indicated in the local copy of the index.
|
|
See the <B><A HREF="/cgi-bin/man/man2html?1+cargo-fetch">cargo-fetch</A></B>(1) command to download dependencies before going
|
|
offline.
|
|
<P>
|
|
May also be specified with the <B>net.offline</B>
|
|
<I>config value</I> <<A HREF="https://doc.rust-lang.org/cargo/reference/config.html">https://doc.rust-lang.org/cargo/reference/config.html</A>>.
|
|
|
|
</DL>
|
|
|
|
<A NAME="lbAI"> </A>
|
|
<H3>Common Options</H3>
|
|
|
|
<P>
|
|
<B>+TOOLCHAIN</B>
|
|
<DL COMPACT><DT id="11"><DD>
|
|
If Cargo has been installed with rustup, and the first argument to <B>cargo</B>
|
|
begins with <B>+</B>, it will be interpreted as a rustup toolchain name (such
|
|
as <B>+stable</B> or <B>+nightly</B>).
|
|
See the
|
|
<I>rustup documentation</I> <<A HREF="https://github.com/rust-lang/rustup/">https://github.com/rust-lang/rustup/</A>>
|
|
|
|
for more information about how toolchain overrides work.
|
|
</DL>
|
|
|
|
<P>
|
|
<B>-h</B>, <B>--help</B>
|
|
<DL COMPACT><DT id="12"><DD>
|
|
Prints help information.
|
|
</DL>
|
|
|
|
<P>
|
|
<B>-Z</B> <I>FLAG</I>...
|
|
<DL COMPACT><DT id="13"><DD>
|
|
Unstable (nightly-only) flags to Cargo. Run <B>cargo -Z help</B> for
|
|
details.
|
|
</DL>
|
|
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>ENVIRONMENT</H2>
|
|
|
|
<P>
|
|
See
|
|
<I>the reference</I> <<A HREF="https://doc.rust-lang.org/cargo/reference/environment-variables.html">https://doc.rust-lang.org/cargo/reference/environment-variables.html</A>>
|
|
|
|
for
|
|
details on environment variables that Cargo reads.
|
|
<A NAME="lbAK"> </A>
|
|
<H2>EXIT STATUS</H2>
|
|
|
|
<P>
|
|
0
|
|
<DL COMPACT><DT id="14"><DD>
|
|
Cargo succeeded.
|
|
</DL>
|
|
|
|
<P>
|
|
101
|
|
<DL COMPACT><DT id="15"><DD>
|
|
Cargo failed to complete.
|
|
</DL>
|
|
|
|
<A NAME="lbAL"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="16"><DD>
|
|
1.
|
|
|
|
|
|
Retrieve package specification for <B>foo</B> package:
|
|
<P>
|
|
<DL COMPACT><DT id="17"><DD>
|
|
|
|
<PRE>
|
|
cargo pkgid foo
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="18"><DD>
|
|
2.
|
|
|
|
|
|
Retrieve package specification for version 1.0.0 of <B>foo</B>:
|
|
<P>
|
|
<DL COMPACT><DT id="19"><DD>
|
|
|
|
<PRE>
|
|
cargo pkgid foo:1.0.0
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="20"><DD>
|
|
3.
|
|
|
|
|
|
Retrieve package specification for <B>foo</B> from crates.io:
|
|
<P>
|
|
<DL COMPACT><DT id="21"><DD>
|
|
|
|
<PRE>
|
|
cargo pkgid <A HREF="https://github.com/rust-lang/crates.io-index#foo">https://github.com/rust-lang/crates.io-index#foo</A>
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
</DL>
|
|
|
|
<A NAME="lbAM"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<P>
|
|
<B><A HREF="/cgi-bin/man/man2html?1+cargo">cargo</A></B>(1), <B><A HREF="/cgi-bin/man/man2html?1+cargo-generate-lockfile">cargo-generate-lockfile</A></B>(1), <B><A HREF="/cgi-bin/man/man2html?1+cargo-metadata">cargo-metadata</A></B>(1)
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="22"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="23"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="24"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="25"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DL>
|
|
<DT id="26"><A HREF="#lbAF">Package Selection</A><DD>
|
|
<DT id="27"><A HREF="#lbAG">Display Options</A><DD>
|
|
<DT id="28"><A HREF="#lbAH">Manifest Options</A><DD>
|
|
<DT id="29"><A HREF="#lbAI">Common Options</A><DD>
|
|
</DL>
|
|
<DT id="30"><A HREF="#lbAJ">ENVIRONMENT</A><DD>
|
|
<DT id="31"><A HREF="#lbAK">EXIT STATUS</A><DD>
|
|
<DT id="32"><A HREF="#lbAL">EXAMPLES</A><DD>
|
|
<DT id="33"><A HREF="#lbAM">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:08 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|