napi-rs/crates/build/src/lib.rs

19 lines
400 B
Rust
Raw Normal View History

mod android;
mod macos;
mod wasi;
pub fn setup() {
println!("cargo:rerun-if-env-changed=DEBUG_GENERATED_CODE");
println!("cargo:rerun-if-env-changed=TYPE_DEF_TMP_PATH");
match std::env::var("CARGO_CFG_TARGET_OS").as_deref() {
Ok("macos") => {
macos::setup();
}
2022-06-10 16:20:06 +09:00
Ok("android") => if android::setup().is_ok() {},
Ok("wasi") => {
wasi::setup();
}
_ => {}
2020-02-18 22:09:17 +09:00
}
}