cargo-samply 0.3.2

A cargo subcommand to automate the process of running samply for project binaries
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// build.rs

fn main() {
    // check if 'samply' binary is installed in the system
    let samply_available = std::process::Command::new("samply")
        .arg("--help")
        .status()
        .is_ok();

    if !samply_available {
        println!("cargo:warning='samply' is not installed. Please run `cargo install samply` and ensure it is in your PATH.");
        // Optionally, you can fail the build:
        // std::process::exit(1);
    }
    println!("cargo:rerun-if-changed=build.rs");
}