]> git.proxmox.com Git - rustc.git/blob - src/tools/cargo/src/bin/cargo/commands/read_manifest.rs
New upstream version 1.70.0+dfsg2
[rustc.git] / src / tools / cargo / src / bin / cargo / commands / read_manifest.rs
1 use crate::command_prelude::*;
2
3 pub fn cli() -> Command {
4 subcommand("read-manifest")
5 .about(
6 "\
7 Print a JSON representation of a Cargo.toml manifest.
8
9 Deprecated, use `cargo metadata --no-deps` instead.\
10 ",
11 )
12 .arg_quiet()
13 .arg_manifest_path()
14 }
15
16 pub fn exec(config: &mut Config, args: &ArgMatches) -> CliResult {
17 let ws = args.workspace(config)?;
18 config.shell().print_json(&ws.current()?.serialized())?;
19 Ok(())
20 }