1
2
3
4
5
6
7
8
9
10
use std::path::Path;

use cargo_metadata::{Metadata, MetadataCommand};

pub fn package_metadata(package_root: &Path) -> Result<Metadata, cargo_metadata::Error> {
    MetadataCommand::new()
        .current_dir(package_root)
        .no_deps()
        .exec()
}