This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

1use cargo::{ 2 core::{ 3 compiler::{BuildConfig, CompileMode}, 4 resolver::CliFeatures, 5 Workspace, 6 }, 7 ops::{self, CompileFilter, Packages}, 8 GlobalContext, 9}; 10use std::path::Path; 11 12pub fn run_project(package_path: &Path) -> anyhow::Result<()> { 13 let cargoctx = GlobalContext::default()?; 14 let workspace = Workspace::new(&package_path.join("Cargo.toml"), &cargoctx)?; 15 16 ops::run( 17 &workspace, 18 &ops::CompileOptions { 19 build_config: BuildConfig::new( 20 &cargoctx, 21 None, 22 false, 23 &[], 24 CompileMode::Build, 25 )?, 26 cli_features: CliFeatures::new_all(false), 27 spec: Packages::Default, 28 filter: CompileFilter::new_all_targets(), 29 target_rustdoc_args: None, 30 target_rustc_args: None, 31 target_rustc_crate_types: None, 32 rustdoc_document_private_items: false, 33 honor_rust_version: None, 34 }, 35 &[], 36 )?; 37 Ok(()) 38}