cargo-pgo 0.3.0

Cargo subcommand for optimizing Rust binaries with PGO and BOLT.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::workspace::CargoContext;

pub fn clean_artifacts(ctx: CargoContext) -> anyhow::Result<()> {
    let pgo_dir = ctx.get_pgo_directory()?;
    let res = std::fs::remove_dir_all(pgo_dir);

    let bolt_dir = ctx.get_bolt_directory()?;
    std::fs::remove_dir_all(bolt_dir).and(res)?;

    Ok(())
}