Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > 0c2243f8a1696816431e7210e991fa52 > files > 1066

rust-doc-1.35.0-1.mga7.armv7hl.rpm

<!DOCTYPE HTML>
<html lang="en" class="sidebar-visible no-js">
    <head>
        <!-- Book generated using mdBook -->
        <meta charset="UTF-8">
        <title>metadata - The Cargo Book</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="theme-color" content="#ffffff" />

        <base href="../">

        <link rel="stylesheet" href="book.css">
        <link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
        <link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">

        <link rel="shortcut icon" href="favicon.png">

        <!-- Font Awesome -->
        <link rel="stylesheet" href="_FontAwesome/css/font-awesome.css">

        <link rel="stylesheet" href="highlight.css">
        <link rel="stylesheet" href="tomorrow-night.css">
        <link rel="stylesheet" href="ayu-highlight.css">

        <!-- Custom theme stylesheets -->
        

        

    </head>
    <body class="light">
        <!-- Work around some values being stored in localStorage wrapped in quotes -->
        <script type="text/javascript">
            try {
                var theme = localStorage.getItem('mdbook-theme');
                var sidebar = localStorage.getItem('mdbook-sidebar');

                if (theme.startsWith('"') && theme.endsWith('"')) {
                    localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
                }

                if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
                    localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
                }
            } catch (e) { }
        </script>

        <!-- Set the theme before any content is loaded, prevents flash -->
        <script type="text/javascript">
            var theme;
            try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } 
            if (theme === null || theme === undefined) { theme = 'light'; }
            document.body.className = theme;
            document.querySelector('html').className = theme + ' js';
        </script>

        <!-- Hide / unhide sidebar before it is displayed -->
        <script type="text/javascript">
            var html = document.querySelector('html');
            var sidebar = 'hidden';
            if (document.body.clientWidth >= 1080) {
                try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
                sidebar = sidebar || 'visible';
            }
            html.classList.remove('sidebar-visible');
            html.classList.add("sidebar-" + sidebar);
        </script>

        <nav id="sidebar" class="sidebar" aria-label="Table of contents">
            <ol class="chapter"><li class="affix"><a href="index.html">Introduction</a></li><li><a href="getting-started/index.html"><strong aria-hidden="true">1.</strong> Getting Started</a></li><li><ol class="section"><li><a href="getting-started/installation.html"><strong aria-hidden="true">1.1.</strong> Installation</a></li><li><a href="getting-started/first-steps.html"><strong aria-hidden="true">1.2.</strong> First Steps with Cargo</a></li></ol></li><li><a href="guide/index.html"><strong aria-hidden="true">2.</strong> Cargo Guide</a></li><li><ol class="section"><li><a href="guide/why-cargo-exists.html"><strong aria-hidden="true">2.1.</strong> Why Cargo Exists</a></li><li><a href="guide/creating-a-new-project.html"><strong aria-hidden="true">2.2.</strong> Creating a New Package</a></li><li><a href="guide/working-on-an-existing-project.html"><strong aria-hidden="true">2.3.</strong> Working on an Existing Package</a></li><li><a href="guide/dependencies.html"><strong aria-hidden="true">2.4.</strong> Dependencies</a></li><li><a href="guide/project-layout.html"><strong aria-hidden="true">2.5.</strong> Package Layout</a></li><li><a href="guide/cargo-toml-vs-cargo-lock.html"><strong aria-hidden="true">2.6.</strong> Cargo.toml vs Cargo.lock</a></li><li><a href="guide/tests.html"><strong aria-hidden="true">2.7.</strong> Tests</a></li><li><a href="guide/continuous-integration.html"><strong aria-hidden="true">2.8.</strong> Continuous Integration</a></li><li><a href="guide/build-cache.html"><strong aria-hidden="true">2.9.</strong> Build Cache</a></li></ol></li><li><a href="reference/index.html"><strong aria-hidden="true">3.</strong> Cargo Reference</a></li><li><ol class="section"><li><a href="reference/specifying-dependencies.html"><strong aria-hidden="true">3.1.</strong> Specifying Dependencies</a></li><li><a href="reference/manifest.html"><strong aria-hidden="true">3.2.</strong> The Manifest Format</a></li><li><a href="reference/config.html"><strong aria-hidden="true">3.3.</strong> Configuration</a></li><li><a href="reference/environment-variables.html"><strong aria-hidden="true">3.4.</strong> Environment Variables</a></li><li><a href="reference/build-scripts.html"><strong aria-hidden="true">3.5.</strong> Build Scripts</a></li><li><a href="reference/publishing.html"><strong aria-hidden="true">3.6.</strong> Publishing on crates.io</a></li><li><a href="reference/pkgid-spec.html"><strong aria-hidden="true">3.7.</strong> Package ID Specifications</a></li><li><a href="reference/source-replacement.html"><strong aria-hidden="true">3.8.</strong> Source Replacement</a></li><li><a href="reference/external-tools.html"><strong aria-hidden="true">3.9.</strong> External Tools</a></li><li><a href="reference/registries.html"><strong aria-hidden="true">3.10.</strong> Registries</a></li><li><a href="reference/unstable.html"><strong aria-hidden="true">3.11.</strong> Unstable Features</a></li></ol></li><li><a href="commands/index.html"><strong aria-hidden="true">4.</strong> Cargo Commands</a></li><li><ol class="section"><li><a href="commands/build-commands.html"><strong aria-hidden="true">4.1.</strong> Build Commands</a></li><li><ol class="section"><li><a href="commands/cargo-bench.html"><strong aria-hidden="true">4.1.1.</strong> bench</a></li><li><a href="commands/cargo-build.html"><strong aria-hidden="true">4.1.2.</strong> build</a></li><li><a href="commands/cargo-check.html"><strong aria-hidden="true">4.1.3.</strong> check</a></li><li><a href="commands/cargo-clean.html"><strong aria-hidden="true">4.1.4.</strong> clean</a></li><li><a href="commands/cargo-doc.html"><strong aria-hidden="true">4.1.5.</strong> doc</a></li><li><a href="commands/cargo-fetch.html"><strong aria-hidden="true">4.1.6.</strong> fetch</a></li><li><a href="commands/cargo-fix.html"><strong aria-hidden="true">4.1.7.</strong> fix</a></li><li><a href="commands/cargo-run.html"><strong aria-hidden="true">4.1.8.</strong> run</a></li><li><a href="commands/cargo-rustc.html"><strong aria-hidden="true">4.1.9.</strong> rustc</a></li><li><a href="commands/cargo-rustdoc.html"><strong aria-hidden="true">4.1.10.</strong> rustdoc</a></li><li><a href="commands/cargo-test.html"><strong aria-hidden="true">4.1.11.</strong> test</a></li></ol></li><li><a href="commands/manifest-commands.html"><strong aria-hidden="true">4.2.</strong> Manifest Commands</a></li><li><ol class="section"><li><a href="commands/cargo-generate-lockfile.html"><strong aria-hidden="true">4.2.1.</strong> generate-lockfile</a></li><li><a href="commands/cargo-locate-project.html"><strong aria-hidden="true">4.2.2.</strong> locate-project</a></li><li><a href="commands/cargo-metadata.html" class="active"><strong aria-hidden="true">4.2.3.</strong> metadata</a></li><li><a href="commands/cargo-pkgid.html"><strong aria-hidden="true">4.2.4.</strong> pkgid</a></li><li><a href="commands/cargo-update.html"><strong aria-hidden="true">4.2.5.</strong> update</a></li><li><a href="commands/cargo-verify-project.html"><strong aria-hidden="true">4.2.6.</strong> verify-project</a></li></ol></li><li><a href="commands/package-commands.html"><strong aria-hidden="true">4.3.</strong> Package Commands</a></li><li><ol class="section"><li><a href="commands/cargo-init.html"><strong aria-hidden="true">4.3.1.</strong> init</a></li><li><a href="commands/cargo-install.html"><strong aria-hidden="true">4.3.2.</strong> install</a></li><li><a href="commands/cargo-new.html"><strong aria-hidden="true">4.3.3.</strong> new</a></li><li><a href="commands/cargo-search.html"><strong aria-hidden="true">4.3.4.</strong> search</a></li><li><a href="commands/cargo-uninstall.html"><strong aria-hidden="true">4.3.5.</strong> uninstall</a></li></ol></li><li><a href="commands/publishing-commands.html"><strong aria-hidden="true">4.4.</strong> Publishing Commands</a></li><li><ol class="section"><li><a href="commands/cargo-login.html"><strong aria-hidden="true">4.4.1.</strong> login</a></li><li><a href="commands/cargo-owner.html"><strong aria-hidden="true">4.4.2.</strong> owner</a></li><li><a href="commands/cargo-package.html"><strong aria-hidden="true">4.4.3.</strong> package</a></li><li><a href="commands/cargo-publish.html"><strong aria-hidden="true">4.4.4.</strong> publish</a></li><li><a href="commands/cargo-yank.html"><strong aria-hidden="true">4.4.5.</strong> yank</a></li></ol></li><li><a href="commands/general-commands.html"><strong aria-hidden="true">4.5.</strong> General Commands</a></li><li><ol class="section"><li><a href="commands/cargo-help.html"><strong aria-hidden="true">4.5.1.</strong> help</a></li><li><a href="commands/cargo-version.html"><strong aria-hidden="true">4.5.2.</strong> version</a></li></ol></li></ol></li><li><a href="faq.html"><strong aria-hidden="true">5.</strong> FAQ</a></li><li><a href="appendix/glossary.html"><strong aria-hidden="true">6.</strong> Appendix: Glossary</a></li></ol>
        </nav>

        <div id="page-wrapper" class="page-wrapper">

            <div class="page">
                
                <div id="menu-bar" class="menu-bar">
                    <div id="menu-bar-sticky-container">
                        <div class="left-buttons">
                            <button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
                                <i class="fa fa-bars"></i>
                            </button>
                            <button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
                                <i class="fa fa-paint-brush"></i>
                            </button>
                            <ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
                                <li role="none"><button role="menuitem" class="theme" id="light">Light <span class="default">(default)</span></button></li>
                                <li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
                                <li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
                                <li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
                                <li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
                            </ul>
                            
                            <button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
                                <i class="fa fa-search"></i>
                            </button>
                            
                        </div>

                        <h1 class="menu-title">The Cargo Book</h1> 

                        <div class="right-buttons">
                            <a href="print.html" title="Print this book" aria-label="Print this book">
                                <i id="print-button" class="fa fa-print"></i>
                            </a>
                        </div>
                    </div>
                </div>

                
                <div id="search-wrapper" class="hidden">
                    <form id="searchbar-outer" class="searchbar-outer">
                        <input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
                    </form>
                    <div id="searchresults-outer" class="searchresults-outer hidden">
                        <div id="searchresults-header" class="searchresults-header"></div>
                        <ul id="searchresults">
                        </ul>
                    </div>
                </div>
                

                <!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
                <script type="text/javascript">
                    document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
                    document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
                    Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
                        link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
                    });
                </script>

                <div id="content" class="content">
                    <main>
                        <a class="header" href="commands/cargo-metadata.html#cargo-metadata" id="cargo-metadata"><h1>cargo metadata</h1></a>
<style>
    /* Include some space between definition elements. */
    dd {
        margin-bottom: 1em;
    }
    /* asciidoctor includes extra <p> tags which causes too much spacing. */
    dd p {
        margin-top: 0;
    }
    li p {
        margin: 0;
    }
    /* asciidoctor uses a content class which conflicts with mdbook's content
    class which causes too much spacing. */
    .content {
        padding-bottom: 0;
    }
</style>
<h2 id="cargo_metadata_name">NAME</h2>
<div class="sectionbody">
<p>cargo-metadata - Machine-readable metadata about the current package</p>
</div>
<div class="sect1">
<h2 id="cargo_metadata_synopsis">SYNOPSIS</h2>
<div class="sectionbody">
<div class="paragraph">
<p><code>cargo metadata [<em>OPTIONS</em>]</code></p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="cargo_metadata_description">DESCRIPTION</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Output the resolved dependencies of a package, the concrete used versions
including overrides, in JSON to stdout.</p>
</div>
<div class="paragraph">
<p>It is recommended to include the <code>--format-version</code> flag to future-proof
your code to ensure the output is in the format you are expecting.</p>
</div>
<div class="paragraph">
<p>See the <a href="https://crates.io/crates/cargo_metadata">cargo_metadata crate</a>
for a Rust API for reading the metadata.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="cargo_metadata_output_format">OUTPUT FORMAT</h2>
<div class="sectionbody">
<div class="paragraph">
<p>The output has the following format:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-javascript hljs" data-lang="javascript">{
    /* Array of all packages in the workspace.
       It also includes all feature-enabled dependencies unless --no-deps is used.
    */
    "packages": [
        {
            /* The name of the package. */
            "name": "my-package",
            /* The version of the package. */
            "version": "0.1.0",
            /* The Package ID, a unique identifier for referring to the package. */
            "id": "my-package 0.1.0 (path+file:///path/to/my-package)",
            /* The license value from the manifest, or null. */
            "license": "MIT/Apache-2.0",
            /* The license-file value from the manifest, or null. */
            "license_file": "LICENSE",
            /* The description value from the manifest, or null. */
            "description": "Package description.",
            /* The source ID of the package. This represents where
               a package is retrieved from.
               This is null for path dependencies and workspace members.
               For other dependencies, it is a string with the format:
               - "registry+URL" for registry-based dependencies.
                 Example: "registry+https://github.com/rust-lang/crates.io-index"
               - "git+URL" for git-based dependencies.
                 Example: "git+https://github.com/rust-lang/cargo?rev=5e85ba14aaa20f8133863373404cb0af69eeef2c#5e85ba14aaa20f8133863373404cb0af69eeef2c"
            */
            "source": null,
            /* Array of dependencies declared in the package's manifest. */
            "dependencies": [
                {
                    /* The name of the dependency. */
                    "name": "bitflags",
                    /* The source ID of the dependency. May be null, see
                       description for the package source.
                    */
                    "source": "registry+https://github.com/rust-lang/crates.io-index",
                    /* The version requirement for the dependency.
                       Dependencies without a version requirement have a value of "*".
                    */
                    "req": "^1.0",
                    /* The dependency kind.
                       "dev", "build", or null for a normal dependency.
                    */
                    "kind": null,
                    /* If the dependency is renamed, this is the new name for
                       the dependency as a string.  null if it is not renamed.
                    */
                    "rename": null,
                    /* Boolean of whether or not this is an optional dependency. */
                    "optional": false,
                    /* Boolean of whether or not default features are enabled. */
                    "uses_default_features": true,
                    /* Array of features enabled. */
                    "features": [],
                    /* The target platform for the dependency.
                       null if not a target dependency.
                    */
                    "target": "cfg(windows)",
                    /* A string of the URL of the registry this dependency is from.
                       If not specified or null, the dependency is from the default
                       registry (crates.io).
                    */
                    "registry": null
                }
            ],
            /* Array of Cargo targets. */
            "targets": [
                {
                    /* Array of target kinds.
                       - lib targets list the `crate-type` values from the
                         manifest such as "lib", "rlib", "dylib",
                         "proc-macro", etc. (default ["lib"])
                       - binary is ["bin"]
                       - example is ["example"]
                       - integration test is ["test"]
                       - benchmark is ["bench"]
                       - build script is ["custom-build"]
                    */
                    "kind": [
                        "bin"
                    ],
                    /* Array of crate types.
                       - lib and example libraries list the `crate-type` values
                         from the manifest such as "lib", "rlib", "dylib",
                         "proc-macro", etc. (default ["lib"])
                       - all other target kinds are ["bin"]
                    */
                    "crate_types": [
                        "bin"
                    ],
                    /* The name of the target. */
                    "name": "my-package",
                    /* Absolute path to the root source file of the target. */
                    "src_path": "/path/to/my-package/src/main.rs",
                    /* The Rust edition of the target.
                       Defaults to the package edition.
                    */
                    "edition": "2018",
                    /* Array of required features.
                       This property is not included if no required features are set.
                    */
                    "required-features": ["feat1"]
                }
            ],
            /* Set of features defined for the package.
               Each feature maps to an array of features or dependencies it
               enables.
            */
            "features": {
                "default": [
                    "feat1"
                ],
                "feat1": [],
                "feat2": []
            },
            /* Absolute path to this package's manifest. */
            "manifest_path": "/path/to/my-package/Cargo.toml",
            /* Package metadata.
               This is null if no metadata is specified.
            */
            "metadata": {
                "docs": {
                    "rs": {
                        "all-features": true
                    }
                }
            },
            /* Array of authors from the manifest.
               Empty array if no authors specified.
            */
            "authors": [
                "Jane Doe &lt;user@example.com&gt;"
            ],
            /* Array of categories from the manifest. */
            "categories": [
                "command-line-utilities"
            ],
            /* Array of keywords from the manifest. */
            "keywords": [
                "cli"
            ],
            /* The readme value from the manifest or null if not specified. */
            "readme": "README.md",
            /* The repository value from the manifest or null if not specified. */
            "repository": "https://github.com/rust-lang/cargo",
            /* The default edition of the package.
               Note that individual targets may have different editions.
            */
            "edition": "2018",
            /* Optional string that is the name of a native library the package
               is linking to.
            */
            "links": null,
        }
    ],
    /* Array of members of the workspace.
       Each entry is the Package ID for the package.
    */
    "workspace_members": [
        "my-package 0.1.0 (path+file:///path/to/my-package)",
    ],
    /* The resolved dependency graph, with the concrete versions and features
       selected. The set depends on the enabled features.
       This is null if --no-deps is specified.
    */
    "resolve": {
        /* Array of nodes within the dependency graph.
           Each node is a package.
        */
        "nodes": [
            {
                /* The Package ID of this node. */
                "id": "my-package 0.1.0 (path+file:///path/to/my-package)",
                /* The dependencies of this package, an array of Package IDs. */
                "dependencies": [
                    "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)"
                ],
                /* The dependencies of this package. This is an alternative to
                   "dependencies" which contains additional information. In
                   particular, this handles renamed dependencies.
                */
                "deps": [
                    {
                        /* The name of the dependency's library target.
                           If this is a renamed dependency, this is the new
                           name.
                        */
                        "name": "bitflags",
                        /* The Package ID of the dependency. */
                        "pkg": "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)"
                    }
                ],
                /* Array of features enabled on this package. */
                "features": [
                    "default"
                ]
            }
        ],
        /* The root package of the workspace.
           This is null if this is a virtual workspace. Otherwise it is
           the Package ID of the root package.
        */
        "root": "my-package 0.1.0 (path+file:///path/to/my-package)"
    },
    /* The absolute path to the build directory where Cargo places its output. */
    "target_directory": "/path/to/my-package/target",
    /* The version of the schema for this metadata structure.
       This will be changed if incompatible changes are ever made.
    */
    "version": 1,
    /* The absolute path to the root of the workspace. */
    "workspace_root": "/path/to/my-package"
}</code></pre>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="cargo_metadata_options">OPTIONS</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="cargo_metadata_output_options">Output Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>--no-deps</strong></dt>
<dd>
<p>Output information only about the workspace members and don&#8217;t fetch
dependencies.</p>
</dd>
<dt class="hdlist1"><strong>--format-version</strong> <em>VERSION</em></dt>
<dd>
<p>Specify the version of the output format to use. Currently <code>1</code> is the only
possible value.</p>
</dd>
</dl>
</div>
</div>
<div class="sect2">
<h3 id="cargo_metadata_feature_selection">Feature Selection</h3>
<div class="paragraph">
<p>When no feature options are given, the <code>default</code> feature is activated for
every selected package.</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>--features</strong> <em>FEATURES</em></dt>
<dd>
<p>Space or comma separated list of features to activate. These features only
apply to the current directory&#8217;s package. Features of direct dependencies
may be enabled with <code>&lt;dep-name&gt;/&lt;feature-name&gt;</code> syntax.</p>
</dd>
<dt class="hdlist1"><strong>--all-features</strong></dt>
<dd>
<p>Activate all available features of all selected packages.</p>
</dd>
<dt class="hdlist1"><strong>--no-default-features</strong></dt>
<dd>
<p>Do not activate the <code>default</code> feature of the current directory&#8217;s
package.</p>
</dd>
</dl>
</div>
</div>
<div class="sect2">
<h3 id="cargo_metadata_display_options">Display Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>-v</strong></dt>
<dt class="hdlist1"><strong>--verbose</strong></dt>
<dd>
<p>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 <code>term.verbose</code>
<a href="reference/config.html">config value</a>.</p>
</dd>
<dt class="hdlist1"><strong>-q</strong></dt>
<dt class="hdlist1"><strong>--quiet</strong></dt>
<dd>
<p>No output printed to stdout.</p>
</dd>
<dt class="hdlist1"><strong>--color</strong> <em>WHEN</em></dt>
<dd>
<p>Control when colored output is used. Valid values:</p>
<div class="ulist">
<ul>
<li>
<p><code>auto</code> (default): Automatically detect if color support is available on the
terminal.</p>
</li>
<li>
<p><code>always</code>: Always display colors.</p>
</li>
<li>
<p><code>never</code>: Never display colors.</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>May also be specified with the <code>term.color</code>
<a href="reference/config.html">config value</a>.</p>
</div>
</dd>
</dl>
</div>
</div>
<div class="sect2">
<h3 id="cargo_metadata_manifest_options">Manifest Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>--manifest-path</strong> <em>PATH</em></dt>
<dd>
<p>Path to the <code>Cargo.toml</code> file. By default, Cargo searches in the current
directory or any parent directory for the <code>Cargo.toml</code> file.</p>
</dd>
<dt class="hdlist1"><strong>--frozen</strong></dt>
<dt class="hdlist1"><strong>--locked</strong></dt>
<dd>
<p>Either of these flags requires that the <code>Cargo.lock</code> file is
up-to-date. If the lock file is missing, or it needs to be updated, Cargo will
exit with an error. The <code>--frozen</code> flag also prevents Cargo from
attempting to access the network to determine if it is out-of-date.</p>
<div class="paragraph">
<p>These may be used in environments where you want to assert that the
<code>Cargo.lock</code> file is up-to-date (such as a CI build) or want to avoid network
access.</p>
</div>
</dd>
</dl>
</div>
</div>
<div class="sect2">
<h3 id="cargo_metadata_common_options">Common Options</h3>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>-h</strong></dt>
<dt class="hdlist1"><strong>--help</strong></dt>
<dd>
<p>Prints help information.</p>
</dd>
<dt class="hdlist1"><strong>-Z</strong> <em>FLAG</em>&#8230;&#8203;</dt>
<dd>
<p>Unstable (nightly-only) flags to Cargo. Run <code>cargo -Z help</code> for
details.</p>
</dd>
</dl>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="cargo_metadata_environment">ENVIRONMENT</h2>
<div class="sectionbody">
<div class="paragraph">
<p>See <a href="reference/environment-variables.html">the reference</a> for
details on environment variables that Cargo reads.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="cargo_metadata_exit_status">Exit Status</h2>
<div class="sectionbody">
<div class="dlist">
<dl>
<dt class="hdlist1">0</dt>
<dd>
<p>Cargo succeeded.</p>
</dd>
<dt class="hdlist1">101</dt>
<dd>
<p>Cargo failed to complete.</p>
</dd>
</dl>
</div>
</div>
</div>
<div class="sect1">
<h2 id="cargo_metadata_examples">EXAMPLES</h2>
<div class="sectionbody">
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Output JSON about the current package:</p>
<div class="literalblock">
<div class="content">
<pre>cargo metadata --format-version=1</pre>
</div>
</div>
</li>
</ol>
</div>
</div>
</div>
<div class="sect1">
<h2 id="cargo_metadata_see_also">SEE ALSO</h2>
<div class="sectionbody">
<div class="paragraph">
<p><a href="commands/index.html">cargo(1)</a></p>
</div>
</div>
</div>

                    </main>

                    <nav class="nav-wrapper" aria-label="Page navigation">
                        <!-- Mobile navigation buttons -->
                        
                            <a rel="prev" href="commands/cargo-locate-project.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
                                <i class="fa fa-angle-left"></i>
                            </a>
                        

                        
                            <a rel="next" href="commands/cargo-pkgid.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
                                <i class="fa fa-angle-right"></i>
                            </a>
                        

                        <div style="clear: both"></div>
                    </nav>
                </div>
            </div>

            <nav class="nav-wide-wrapper" aria-label="Page navigation">
                
                    <a href="commands/cargo-locate-project.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
                        <i class="fa fa-angle-left"></i>
                    </a>
                

                
                    <a href="commands/cargo-pkgid.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
                        <i class="fa fa-angle-right"></i>
                    </a>
                
            </nav>

        </div>

        

        

        

        

        
        <script src="searchindex.js" type="text/javascript" charset="utf-8"></script>
        
        
        <script src="elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
        <script src="mark.min.js" type="text/javascript" charset="utf-8"></script>
        <script src="searcher.js" type="text/javascript" charset="utf-8"></script>
        

        <script src="clipboard.min.js" type="text/javascript" charset="utf-8"></script>
        <script src="highlight.js" type="text/javascript" charset="utf-8"></script>
        <script src="book.js" type="text/javascript" charset="utf-8"></script>

        <!-- Custom JS scripts -->
        

    </body>
</html>