cfg-every-src-file 0.0.1

Fixture for testing build script execution and cache invalidation in a non-Cargo build system
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use std::fs;

fn main() {
    for f in fs::read_dir("src").unwrap() {
        let os_str_name = f.unwrap().file_name();
        let name = os_str_name.to_string_lossy();
        println!(
            "cargo:rustc-cfg={}",
            name.strip_suffix(".rs").unwrap_or(&name),
        );
    }
}