1 2 3 4 5 6 7 8
fn main() { // Check if the target is WebAssembly let target = std::env::var("TARGET").unwrap_or_default(); if target.contains("wasm32") { println!("cargo:rustc-cfg=wasm"); } }