File: build.rs

package info (click to toggle)
rust-zstd-safe 7.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 228 kB
  • sloc: makefile: 4
file content (10 lines) | stat: -rw-r--r-- 345 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
fn main() {
    // Force the `std` feature in some cases
    let target_arch =
        std::env::var("CARGO_CFG_TARGET_ARCH").unwrap_or_default();
    let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default();

    if target_arch == "wasm32" || target_os == "hermit" {
        println!("cargo:rustc-cfg=feature=\"std\"");
    }
}