mirror of
https://github.com/alibaba/higress.git
synced 2026-05-10 05:47:26 +08:00
feat: add wasm-rust sdk with say-hello simple extension (#350)
This commit is contained in:
12
plugins/wasm-rust/Dockerfile
Normal file
12
plugins/wasm-rust/Dockerfile
Normal file
@@ -0,0 +1,12 @@
|
||||
FROM rust:1.69 as builder
|
||||
WORKDIR /workspace
|
||||
RUN rustup target add wasm32-wasi
|
||||
ARG PLUGIN_NAME="say-hello"
|
||||
ARG BUILD_OPTS="--release"
|
||||
COPY . .
|
||||
WORKDIR /workspace/extensions/$PLUGIN_NAME
|
||||
RUN cargo build --target wasm32-wasi $BUILD_OPTS \
|
||||
&& cp target/wasm32-wasi/release/*.wasm /main.wasm
|
||||
|
||||
FROM scratch
|
||||
COPY --from=builder /main.wasm plugin.wasm
|
||||
Reference in New Issue
Block a user