13d0ce075e
* Integrate with emnapi * resolve conflict * ignore wasm * generate wasi file * Add wasi test to workflow * Fix wasi template * emnapi new initialize api * Finish test * Purne tsconfig * Generate wasi worker * Fix electron test * Finalize check * Noop adjust_external_memory * Apply cr suggestions
18 lines
400 B
Rust
18 lines
400 B
Rust
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();
|
|
}
|
|
Ok("android") => if android::setup().is_ok() {},
|
|
Ok("wasi") => {
|
|
wasi::setup();
|
|
}
|
|
_ => {}
|
|
}
|
|
}
|