109b8ed69STrevor GrossFROM ubuntu:24.10
24d990a59SAlex Crichton
34d990a59SAlex CrichtonCOPY wasi.sh /
4*3e48e4b2STrevor GrossRUN /wasi.sh
54d990a59SAlex Crichton
64d990a59SAlex Crichton# Note that most of these are copied from `wasm32-wasip1/Dockerfile`
74d990a59SAlex Crichton#
84d990a59SAlex Crichton# FIXME: the `-Clink-arg` to export `cabi_realloc` is a bug in the target
94d990a59SAlex Crichton# itself, this should be fixed upstream.
104d990a59SAlex CrichtonENV CARGO_TARGET_WASM32_WASIP2_RUNNER=wasmtime \
114d990a59SAlex Crichton    CARGO_TARGET_WASM32_WASIP2_LINKER=/opt/wasi-sdk/bin/clang \
124d990a59SAlex Crichton    CARGO_TARGET_WASM32_WASIP2_RUSTFLAGS="-lwasi-emulated-process-clocks -Ctarget-feature=-crt-static -Clink-arg=-Wl,--export,cabi_realloc" \
134d990a59SAlex Crichton    CC_wasm32_wasip2=/opt/wasi-sdk/bin/clang \
144d990a59SAlex Crichton    CFLAGS_wasm32_wasip2=-D_WASI_EMULATED_PROCESS_CLOCKS \
154d990a59SAlex Crichton    PATH=$PATH:/rust/bin:/wasmtime
16