py-spy 0.4.1

Sampling profiler for Python programs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use std::env;

fn main() {
    let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap();
    let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
    match (target_arch.as_ref(), target_os.as_ref()) {
        ("x86_64", "windows") | ("x86_64", "linux") | ("arm", "linux") => {
            println!("cargo:rustc-cfg=unwind")
        }
        _ => {}
    }
}