File tree 3 files changed +38
-0
lines changed
3 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ jobs:
119
119
s390x-unknown-linux-gnu,
120
120
riscv64gc-unknown-linux-gnu,
121
121
wasm32-wasip1,
122
+ wasm32-wasip2,
122
123
sparc64-unknown-linux-gnu,
123
124
wasm32-unknown-emscripten,
124
125
x86_64-linux-android,
Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ RUN apt-get update && \
9
9
10
10
# Wasmtime is used to execute tests and wasi-sdk is used to compile tests.
11
11
# Download appropriate versions here and configure various flags below.
12
+ #
13
+ # Note that these versions are kept in sync with the `wasm32-wasip2/Dockerfile`
14
+ # as well.
12
15
ENV WASMTIME 24.0.0
13
16
ENV WASI_SDK 24
14
17
Original file line number Diff line number Diff line change
1
+ FROM ubuntu:24.04
2
+
3
+ RUN apt-get update && \
4
+ apt-get install -y --no-install-recommends \
5
+ ca-certificates \
6
+ curl \
7
+ clang \
8
+ xz-utils
9
+
10
+ # Wasmtime is used to execute tests and wasi-sdk is used to compile tests.
11
+ # Download appropriate versions here and configure various flags below.
12
+ #
13
+ # Note that these versions are kept in sync with the `wasm32-wasip2/Dockerfile`
14
+ # as well.
15
+ ENV WASMTIME 24.0.0
16
+ ENV WASI_SDK 24
17
+
18
+ RUN curl -L https://github.com/bytecodealliance/wasmtime/releases/download/v$WASMTIME/wasmtime-v$WASMTIME-x86_64-linux.tar.xz | \
19
+ tar xJf -
20
+ ENV PATH=$PATH:/wasmtime-v$WASMTIME-x86_64-linux
21
+
22
+ RUN curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$WASI_SDK/wasi-sdk-$WASI_SDK.0-x86_64-linux.deb
23
+ RUN dpkg -i ./wasi-sdk-*.deb
24
+
25
+ # Note that most of these are copied from `wasm32-wasip1/Dockerfile`
26
+ #
27
+ # FIXME: the `-Clink-arg` to export `cabi_realloc` is a bug in the target
28
+ # itself, this should be fixed upstream.
29
+ ENV CARGO_TARGET_WASM32_WASIP2_RUNNER=wasmtime \
30
+ CARGO_TARGET_WASM32_WASIP2_LINKER=/opt/wasi-sdk/bin/clang \
31
+ CARGO_TARGET_WASM32_WASIP2_RUSTFLAGS="-lwasi-emulated-process-clocks -Ctarget-feature=-crt-static -Clink-arg=-Wl,--export,cabi_realloc" \
32
+ CC_wasm32_wasip2=/opt/wasi-sdk/bin/clang \
33
+ CFLAGS_wasm32_wasip2=-D_WASI_EMULATED_PROCESS_CLOCKS \
34
+ PATH=$PATH:/rust/bin
You can’t perform that action at this time.
0 commit comments