From 5a10654f465bbe2ad81763ef609956f59688cfd6 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 23 Jul 2020 10:54:05 -0700 Subject: [PATCH] Fix benchmarks build --- azure-pipelines.yml | 9 +++++---- crates/cli/Cargo.toml | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a9015e582a4..73d9396962b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -211,11 +211,12 @@ jobs: displayName: "Build benchmarks" steps: - template: ci/azure-install-rust.yml - - template: ci/azure-install-wasm-pack.yml - - script: wasm-pack build --target web benchmarks + - script: rustup target add wasm32-unknown-unknown + displayName: "add target" + - script: cargo build --manifest-path benchmarks/Cargo.toml --release --target wasm32-unknown-unknown displayName: "build benchmarks" - - script: rm -f benchmarks/pkg/.gitignore - displayName: "remove stray gitignore" + - script: cargo run -p wasm-bindgen-cli target/wasm32-unknown-unknown/release/wasm_bindgen_benchmark.wasm --out-dir benchmarks/pkg --target web + displayName: "run wasm-bindgen" - task: PublishPipelineArtifact@0 inputs: artifactName: benchmarks diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index c8369119b38..048b8d91f55 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -12,6 +12,7 @@ Command line interface of the `#[wasm_bindgen]` attribute and project. For more information see https://github.com/rustwasm/wasm-bindgen. """ edition = '2018' +default-run = 'wasm-bindgen' [dependencies] curl = "0.4.13"