|
|
@ -77,11 +77,16 @@ pub fn cargo_build_wasm( |
|
|
|
path: &Path, |
|
|
|
path: &Path, |
|
|
|
profile: BuildProfile, |
|
|
|
profile: BuildProfile, |
|
|
|
extra_options: &[String], |
|
|
|
extra_options: &[String], |
|
|
|
|
|
|
|
curr_target: &str, |
|
|
|
) -> Result<()> { |
|
|
|
) -> Result<()> { |
|
|
|
let msg = format!("{}Compiling to Wasm...", emoji::CYCLONE); |
|
|
|
let msg = format!("{}Compiling to Wasm...", emoji::CYCLONE); |
|
|
|
PBAR.info(&msg); |
|
|
|
PBAR.info(&msg); |
|
|
|
|
|
|
|
|
|
|
|
let mut cmd = Command::new("cargo"); |
|
|
|
let mut cmd = Command::new("cargo"); |
|
|
|
|
|
|
|
cmd.env( |
|
|
|
|
|
|
|
"RUSTFLAGS", |
|
|
|
|
|
|
|
format!("--cfg=wasmpack_target=\"{}\"", curr_target), |
|
|
|
|
|
|
|
); |
|
|
|
cmd.current_dir(path).arg("build").arg("--lib"); |
|
|
|
cmd.current_dir(path).arg("build").arg("--lib"); |
|
|
|
|
|
|
|
|
|
|
|
if PBAR.quiet() { |
|
|
|
if PBAR.quiet() { |
|
|
|