wasm32-wasi to wasm32-wasip1 (#1716)

This commit is contained in:
007gzs
2025-02-05 15:35:48 +08:00
committed by GitHub
parent fab3ebb35a
commit b997e6fd26
11 changed files with 4553 additions and 8 deletions

View File

@@ -1,14 +1,14 @@
FROM rust:1.80 as builder
WORKDIR /workspace
RUN rustup target add wasm32-wasi
RUN rustup target add wasm32-wasip1
ARG PLUGIN_NAME="say-hello"
ARG BUILD_OPTS="--release"
ARG BUILDRC=".buildrc"
COPY . .
WORKDIR /workspace/extensions/$PLUGIN_NAME
RUN if [ -f $BUILDRC ]; then sh $BUILDRC; fi
RUN cargo build --target wasm32-wasi $BUILD_OPTS \
&& cp target/wasm32-wasi/release/*.wasm /main.wasm
RUN cargo build --target wasm32-wasip1 $BUILD_OPTS \
&& cp target/wasm32-wasip1/release/*.wasm /main.wasm
FROM scratch
COPY --from=builder /main.wasm plugin.wasm