]> git.proxmox.com Git - cargo.git/blob - src/bin/cargo/commands/read_manifest.rs
Stabilize namespaced and weak dependency features.
[cargo.git] / src / bin / cargo / commands / read_manifest.rs
1 use crate::command_prelude::*;
2
3 pub fn cli() -> App {
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 }