From 691b11ced8af36510a2297bc5b590b1c3aeafa93 Mon Sep 17 00:00:00 2001 From: wangshishuo Date: Tue, 11 Aug 2020 07:40:40 +0800 Subject: [PATCH] required wasm-bindgen version && cargo build for --all-targets --- src/build/mod.rs | 2 +- src/lockfile.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/build/mod.rs b/src/build/mod.rs index 18aa7ee..fa098e2 100644 --- a/src/build/mod.rs +++ b/src/build/mod.rs @@ -59,7 +59,7 @@ pub fn cargo_build_wasm( PBAR.info(&msg); let mut cmd = Command::new("cargo"); - cmd.current_dir(path).arg("build").arg("--lib").arg("--bins"); + cmd.current_dir(path).arg("build").arg("--all-targets"); if PBAR.quiet() { cmd.arg("--quiet"); diff --git a/src/lockfile.rs b/src/lockfile.rs index 3edd6cf..dac361e 100644 --- a/src/lockfile.rs +++ b/src/lockfile.rs @@ -46,8 +46,8 @@ impl Lockfile { format_err!( "Ensure that you have \"{}\" as a dependency in your Cargo.toml file:\n\ [dependencies]\n\ - wasm-bindgen = \"0.2\"", - style("wasm-bindgen").bold().dim(), + wasm-bindgen = \"=0.2.61\"", + style("wasm-bindgen 0.2.61").bold().dim(), ) }) }