-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.rs
More file actions
17 lines (16 loc) · 714 Bytes
/
Copy pathbuild.rs
File metadata and controls
17 lines (16 loc) · 714 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::{env, path::PathBuf};
fn main() {
println!("cargo::rerun-if-changed=worker/fs-library.js");
if env::var("CARGO_CFG_TARGET_OS").as_deref() != Ok("emscripten") {
return;
}
// Keep growth headroom bounded after generation's temporary allocations.
println!("cargo::rustc-link-arg-bins=-sMEMORY_GROWTH_LINEAR_STEP=2097152");
let library =
PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").unwrap()).join("worker/fs-library.js");
println!(
"cargo::rustc-link-arg-bins=-sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE=[\"$workerFilesystem\"]"
);
println!("cargo::rustc-link-arg-bins=--js-library");
println!("cargo::rustc-link-arg-bins={}", library.display());
}