Squashed 'vendor/ruvector/' content from commit b64c2172
git-subtree-dir: vendor/ruvector git-subtree-split: b64c21726f2bb37286d9ee36a7869fef60cc6900
This commit is contained in:
18
crates/rvlite/build.rs
Normal file
18
crates/rvlite/build.rs
Normal file
@@ -0,0 +1,18 @@
|
||||
use std::env;
|
||||
|
||||
fn main() {
|
||||
let target = env::var("TARGET").unwrap_or_default();
|
||||
|
||||
if target.starts_with("wasm32") {
|
||||
// Configure getrandom for WASM
|
||||
// This tells getrandom 0.3 to use the wasm_js backend
|
||||
println!("cargo:rustc-env=GETRANDOM_BACKEND=wasm_js");
|
||||
println!("cargo:rustc-cfg=getrandom_backend=\"wasm_js\"");
|
||||
|
||||
// Enable check-cfg to avoid warnings
|
||||
println!("cargo:rustc-check-cfg=cfg(getrandom_backend, values(\"wasm_js\"))");
|
||||
|
||||
// Also set the cfg for getrandom 0.2 compatibility
|
||||
println!("cargo:rustc-cfg=getrandom_v0_2");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user