109b8ed69STrevor GrossFROM ubuntu:24.10
2ac6739c5SAlex Crichton
34d990a59SAlex CrichtonCOPY wasi.sh /
4*3e48e4b2STrevor GrossRUN /wasi.sh
5ac6739c5SAlex Crichton
6ac6739c5SAlex Crichton# Note that `-D_WASI_EMULATED_PROCESS_CLOCKS` is used to enable access to
7ac6739c5SAlex Crichton# clock-related defines even though they're emulated. Also note that the usage
8ac6739c5SAlex Crichton# of `-Ctarget-feature=-crt-static` here forces usage of the external wasi-libc
9ac6739c5SAlex Crichton# installed via `wasi-sdk` instead of the version that comes with the standard
10ac6739c5SAlex Crichton# library.
11ac6739c5SAlex CrichtonENV CARGO_TARGET_WASM32_WASIP1_RUNNER=wasmtime \
12ac6739c5SAlex Crichton    CARGO_TARGET_WASM32_WASIP1_LINKER=/opt/wasi-sdk/bin/clang \
13ac6739c5SAlex Crichton    CARGO_TARGET_WASM32_WASIP1_RUSTFLAGS="-lwasi-emulated-process-clocks -Ctarget-feature=-crt-static" \
14ac6739c5SAlex Crichton    CC_wasm32_wasip1=/opt/wasi-sdk/bin/clang \
15ac6739c5SAlex Crichton    CFLAGS_wasm32_wasip1=-D_WASI_EMULATED_PROCESS_CLOCKS \
164d990a59SAlex Crichton    PATH=$PATH:/rust/bin:/wasmtime
17