1
use cfg_aliases::cfg_aliases;
2

            
3
3
fn main() {
4
    // Check if the target is WebAssembly
5
3
    let target = std::env::var("TARGET").unwrap_or_default();
6

            
7
3
    if target.contains("wasm32") {
8
        println!("cargo:rustc-cfg=wasm");
9
3
    }
10

            
11
3
    cfg_aliases! {
12
        wasm_browser: { all(target_family = "wasm", target_os = "unknown") },
13
        cloudflare: { all(target_arch = "wasm32", target_os = "unknown", feature = "worker") },
14
        unix_with_tokio: { all(unix, feature = "tokio") },
15
    }
16
3
}