1FROM ubuntu:24.10 2 3COPY wasi.sh / 4RUN /wasi.sh 5 6# Note that most of these are copied from `wasm32-wasip1/Dockerfile` 7# 8# FIXME: the `-Clink-arg` to export `cabi_realloc` is a bug in the target 9# itself, this should be fixed upstream. 10ENV CARGO_TARGET_WASM32_WASIP2_RUNNER=wasmtime \ 11 CARGO_TARGET_WASM32_WASIP2_LINKER=/opt/wasi-sdk/bin/clang \ 12 CARGO_TARGET_WASM32_WASIP2_RUSTFLAGS="-lwasi-emulated-process-clocks -Ctarget-feature=-crt-static -Clink-arg=-Wl,--export,cabi_realloc" \ 13 CC_wasm32_wasip2=/opt/wasi-sdk/bin/clang \ 14 CFLAGS_wasm32_wasip2=-D_WASI_EMULATED_PROCESS_CLOCKS \ 15 PATH=$PATH:/rust/bin:/wasmtime 16