1use anyhow::{Context as _, Result};
2use cargo_metadata::{Metadata, MetadataCommand};
3
4/// Returns the Cargo workspace.
5pub fn load_workspace() -> Result<Metadata> {
6 MetadataCommand::new()
7 .exec()
8 .context("failed to load cargo metadata")
9}