roxy-loader-utils 0.2.1

Host-side utilities for building and packaging roxy-loader artifacts.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use std::path::PathBuf;

use anyhow::Result;

/// Returns the Cargo target directory for the current workspace.
pub fn cargo_target_dir() -> Result<PathBuf> {
    Ok(cargo_metadata()?.target_directory.into())
}

fn cargo_metadata() -> Result<cargo_metadata::Metadata> {
    Ok(cargo_metadata::MetadataCommand::new().exec()?)
}