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 31
31
steps :
32
32
- name : Install tools/deps
33
33
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
35
35
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))
36
36
37
37
- uses : actions/checkout@v3
55
55
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))
56
56
curl https://sh.rustup.rs -sSf | sh -s -- -y
57
57
. "$HOME/.cargo/env"
58
- rustup target add wasm32-wasi
58
+ rustup target add wasm32-wasip1
59
59
wget -O- https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/wasi-sysroot-20.0.tar.gz | tar -xzf - -C ${RUNNER_TEMP}
60
60
61
61
- uses : actions/checkout@v3
Original file line number Diff line number Diff line change 1
1
include ../../shared.mk
2
2
3
+ TARGET = wasm32-wasip1
4
+ CARGO_CMD = cargo build --target=$(TARGET )
5
+
3
6
SDIR = examples/rust
4
7
5
8
examples : rust-echo-request \
@@ -8,20 +11,20 @@ examples: rust-echo-request \
8
11
rust-large-upload
9
12
10
13
rust-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 )
13
16
14
17
rust-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 )
17
20
18
21
rust-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 )
21
24
22
25
rust-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 )
25
28
26
29
clean :
27
30
rm -f * /Cargo.lock
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ include ../../shared.mk
3
3
SDIR = src/rust
4
4
5
5
rustlib :
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
8
8
9
9
clean :
10
10
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
9
9
10
10
## Prerequisites
11
11
12
- - target add wasm32-wasi . ` rustup target add wasm32-wasi `
12
+ - target add wasm32-wasip1 . ` rustup target add wasm32-wasip1 `
13
13
14
14
## From Source
15
15
You can’t perform that action at this time.
0 commit comments