napi-rs/crates/build/src/lib.rs
forehal a781a4f27e feat(cli): brand new cli tool with both cli and programmatical usage (#1492)
BREAKING CHANGE: requires node >= 16 and some cli options have been renamed
2023-04-06 11:04:53 +08:00

14 lines
343 B
Rust

mod android;
mod macos;
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();
}
Ok("android") => if android::setup().is_ok() {},
_ => {}
}
}