This repository was archived by the owner on Oct 8, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +16
-13
lines changed Expand file tree Collapse file tree 4 files changed +16
-13
lines changed Original file line number Diff line number Diff line change 3131 steps :
3232 - name : Install tools/deps
3333 run : |
34- dnf -y install git wget clang llvm compiler-rt lld make wasi-libc-devel cargo rust rust-std-static-wasm32-unknown-unknown rust-std-static-wasm32-wasi
34+ dnf -y install git wget clang llvm compiler-rt lld make wasi-libc-devel cargo rust rust-std-static-wasm32-wasip1
3535 wget -O- https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/libclang_rt.builtins-wasm32-wasi-20.0.tar.gz | tar --strip-components=1 -xvzf - -C $(dirname $(clang -print-runtime-dir))
3636
3737 - uses : actions/checkout@v3
5555 wget -O- https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/libclang_rt.builtins-wasm32-wasi-20.0.tar.gz | tar --strip-components=1 -xvzf - -C $(dirname $(clang -print-runtime-dir))
5656 curl https://sh.rustup.rs -sSf | sh -s -- -y
5757 . "$HOME/.cargo/env"
58- rustup target add wasm32-wasi
58+ rustup target add wasm32-wasip1
5959 wget -O- https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/wasi-sysroot-20.0.tar.gz | tar -xzf - -C ${RUNNER_TEMP}
6060
6161 - uses : actions/checkout@v3
Original file line number Diff line number Diff line change 11include ../../shared.mk
22
3+ TARGET = wasm32-wasip1
4+ CARGO_CMD = cargo build --target=$(TARGET )
5+
36SDIR = examples/rust
47
58examples : rust-echo-request \
@@ -8,20 +11,20 @@ examples: rust-echo-request \
811 rust-large-upload
912
1013rust-echo-request : echo-request/Cargo.toml echo-request/src/lib.rs
11- $(PP_GEN ) $(SDIR ) /echo-request/target/wasm32-wasi /
12- $(v ) cd echo-request; cargo build --target=wasm32-wasi
14+ $(PP_GEN ) $(SDIR ) /echo-request/target/$( TARGET ) /
15+ $(v ) cd echo-request; $( CARGO_CMD )
1316
1417rust-upload-reflector : upload-reflector/Cargo.toml upload-reflector/src/lib.rs
15- $(PP_GEN ) $(SDIR ) /upload-reflector/target/wasm32-wasi /
16- $(v ) cd upload-reflector; cargo build --target=wasm32-wasi
18+ $(PP_GEN ) $(SDIR ) /upload-reflector/target/$( TARGET ) /
19+ $(v ) cd upload-reflector; $( CARGO_CMD )
1720
1821rust-hello-world : hello-world/Cargo.toml hello-world/src/lib.rs
19- $(PP_GEN ) $(SDIR ) /hello-world/target/wasm32-wasi /
20- $(v ) cd hello-world; cargo build --target=wasm32-wasi
22+ $(PP_GEN ) $(SDIR ) /hello-world/target/$( TARGET ) /
23+ $(v ) cd hello-world; $( CARGO_CMD )
2124
2225rust-large-upload : large-upload/Cargo.toml large-upload/src/lib.rs
23- $(PP_GEN ) $(SDIR ) /large-upload/target/wasm32-wasi /
24- $(v ) cd large-upload; cargo build --target=wasm32-wasi
26+ $(PP_GEN ) $(SDIR ) /large-upload/target/$( TARGET ) /
27+ $(v ) cd large-upload; $( CARGO_CMD )
2528
2629clean :
2730 rm -f * /Cargo.lock
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ include ../../shared.mk
33SDIR = src/rust
44
55rustlib :
6- $(PP_GEN ) $(SDIR ) /target/wasm32-wasi
7- $(v ) cargo build --target=wasm32-wasi
6+ $(PP_GEN ) $(SDIR ) /target/wasm32-wasip1
7+ $(v ) cargo build --target=wasm32-wasip1
88
99clean :
1010 rm -f Cargo.lock unit-wasm-sys/Cargo.lock
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ cargo add unit-wasm
99
1010## Prerequisites
1111
12- - target add wasm32-wasi . ` rustup target add wasm32-wasi `
12+ - target add wasm32-wasip1 . ` rustup target add wasm32-wasip1 `
1313
1414## From Source
1515
You can’t perform that action at this time.
0 commit comments