File tree Expand file tree Collapse file tree
packages/cli/src/lib/defaults/build-strategies/wasm/rust Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,8 +11,10 @@ RUN apk add curl pkgconfig openssl-dev bash
1111# Install clang
1212RUN apk add clang llvm build-base
1313
14- # Install the toml-cli
15- RUN cargo install toml-cli
14+ # Install wasm-opt
15+ RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.3/install.sh | bash
16+ RUN nvm install 18 && nvm use 18
17+ RUN npm i wasm-opt -g
1618
1719# Install wasm-snip
1820RUN cargo install wasm-snip
@@ -23,8 +25,8 @@ RUN cargo install wasm-tools
2325# Install wasm-bindgen
2426RUN cargo install wasm-bindgen-cli
2527
26- # Install wasm-opt
27- RUN cargo install wasm-opt
28+ # Install the toml-cli
29+ RUN cargo install toml-cli
2830
2931# Install cargo-build-deps
3032RUN cargo install cargo-build-deps
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ cargo install wasm-bindgen-cli
1616cargo install wasm-tools
1717
1818# Install wasm-opt
19- cargo install wasm-opt
19+ RUN npm i wasm-opt -g
2020
2121# Ensure the module at {{dir}} has the crate-type = ["cdylib"]
2222toml set " $1 " /Cargo.toml lib.crate-type [" cdylib" ] > " $1 " /Cargo-local.toml && \
Original file line number Diff line number Diff line change @@ -11,8 +11,10 @@ RUN apk add curl pkgconfig openssl-dev bash
1111# Install clang
1212RUN apk add clang llvm build-base
1313
14- # Install the toml-cli
15- RUN cargo install toml-cli
14+ # Install wasm-opt
15+ RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.3/install.sh | bash
16+ RUN nvm install 18 && nvm use 18
17+ RUN npm i wasm-opt -g
1618
1719# Install wasm-snip
1820RUN cargo install wasm-snip
@@ -23,8 +25,8 @@ RUN cargo install wasm-tools
2325# Install wasm-bindgen
2426RUN cargo install wasm-bindgen-cli
2527
26- # Install wasm-opt
27- RUN cargo install wasm-opt
28+ # Install the toml-cli
29+ RUN cargo install toml-cli
2830
2931# Ensure the Wasm module is configured to use imported memory
3032ENV RUSTFLAGS="-C link-arg=-z -C link-arg=stack-size=65536 -C link-arg=--import-memory"
You can’t perform that action at this time.
0 commit comments