-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for wasm32-wasi target (#119)
- Loading branch information
Showing
6 changed files
with
82 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM ubuntu:18.04 | ||
|
||
RUN apt-get update -y && apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
curl wget \ | ||
make \ | ||
perl \ | ||
gcc \ | ||
xz-utils \ | ||
libc6-dev | ||
|
||
# cargo-wasi setup (cargo-wasi depends on wasmtime to be present) | ||
RUN curl https://wasmtime.dev/install.sh -sSf | bash | ||
ENV PATH="$PATH:/root/.wasmtime/bin" | ||
|
||
# Install WASI-SDK | ||
ENV WASI_VERSION=14 | ||
ENV WASI_VERSION_FULL=${WASI_VERSION}.0 | ||
RUN wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_VERSION}/wasi-sdk-${WASI_VERSION_FULL}-linux.tar.gz | ||
RUN tar xvf wasi-sdk-${WASI_VERSION_FULL}-linux.tar.gz -C /root | ||
|
||
# WASI env setup | ||
ENV WASI_SDK_PATH=/root/wasi-sdk-${WASI_VERSION_FULL} | ||
ENV CC_wasm32-wasi="${WASI_SDK_PATH}/bin/clang --sysroot=${WASI_SDK_PATH}/share/wasi-sysroot" | ||
ENV CARGO_TARGET_WASM32_WASI_LINKER="${WASI_SDK_PATH}/bin/clang" | ||
|
||
ENV RUSTFLAGS=-Ctarget-feature=-crt-static | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters