cargo-tarpaulin 0.24.0

Cargo-Tarpaulin is a tool to determine code coverage achieved via tests
Documentation
use rustc_version::{version, version_meta, Channel};
use std::env;

fn main() {
    assert!(version().expect("Couldn't get compiler version").major >= 1);

    let channel = version_meta()
        .expect("Couldn't get compiler metadata")
        .channel;
    if channel == Channel::Nightly {
        println!("cargo:rustc-cfg=nightly");
    }

    let target_arch = env::var("CARGO_CFG_TARGET_ARCH").expect("CARGO_CFG_TARGET_ARCH not set");
    let target_os = env::var("CARGO_CFG_TARGET_OS").expect("CARGO_CFG_TARGET_OS not set");
    if target_os == "linux" && target_arch == "x86_64" {
        println!("cargo:rustc-cfg=ptrace_supported");
    }
}