From be62300b86856eb3c5596decddd44848de1df820 Mon Sep 17 00:00:00 2001 From: dOrgJelli Date: Thu, 2 Jun 2022 12:08:28 -0700 Subject: [PATCH] fixes --- .../src/lib/build-envs/wasm/rust/Dockerfile.mustache | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/cli/src/lib/build-envs/wasm/rust/Dockerfile.mustache b/packages/cli/src/lib/build-envs/wasm/rust/Dockerfile.mustache index 69b6ceddb1..d2503958c2 100644 --- a/packages/cli/src/lib/build-envs/wasm/rust/Dockerfile.mustache +++ b/packages/cli/src/lib/build-envs/wasm/rust/Dockerfile.mustache @@ -15,13 +15,11 @@ RUN curl -L https://github.com/WebAssembly/binaryen/releases/download/version_10 && cp binaryen-version_101/bin/wasm-opt /usr/local/bin/ \ && rm -rf binary-version_101 -{{#web3api_linked_packages.length}} -WORKDIR /linked-packages -{{/web3api_linked_packages.length}} - -{{#web3api_linked_packages.length}} # Install the toml-cli RUN cargo install toml-cli + +{{#web3api_linked_packages.length}} +WORKDIR /linked-packages {{/web3api_linked_packages.length}} {{#web3api_linked_packages}} @@ -106,5 +104,6 @@ RUN mkdir ./build # Use wasm-opt to perform the "asyncify" post-processing step over all modules {{#web3api_modules}} -RUN wasm-opt --asyncify -O2 ./{{dir}}/target/wasm32-unknown-unknown/release/{{name}}.wasm -o ./build/{{name}}.wasm +RUN WASM_MODULE=$(ls ./{{dir}}/target/wasm32-unknown-unknown/release/*.wasm); \ + wasm-opt --asyncify -O2 $WASM_MODULE -o ./build/{{name}}.wasm {{/web3api_modules}}