2022-01-02 03:40:22 +01:00
|
|
|
# common.webassembly
|
|
|
|
#
|
|
|
|
# Common WebAssembly tools.
|
|
|
|
|
2024-04-02 19:12:10 +02:00
|
|
|
# main 2024-04-02
|
|
|
|
ENV BINARYEN_GIT_TAG 4e2ebbd6de6f99e5972654b3f50ddbc1c6839a73
|
2022-12-28 04:21:08 +01:00
|
|
|
RUN git clone --recursive https://github.com/WebAssembly/binaryen.git && \
|
2022-01-02 03:40:22 +01:00
|
|
|
cd binaryen && \
|
|
|
|
git checkout ${BINARYEN_GIT_TAG} && \
|
|
|
|
cd ../ && \
|
|
|
|
mkdir binaryen-build && \
|
|
|
|
cd binaryen-build && \
|
|
|
|
/usr/bin/cmake \
|
|
|
|
-DCMAKE_C_COMPILER=/usr/bin/cc \
|
|
|
|
-DCMAKE_CXX_COMPILER=/usr/bin/c++ \
|
|
|
|
-G Ninja \
|
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
|
|
|
|
-DCMAKE_TOOLCHAIN_FILE="" \
|
|
|
|
../binaryen && \
|
|
|
|
ninja && \
|
|
|
|
ninja install && \
|
|
|
|
cd ../ && \
|
|
|
|
rm -rf binaryen*
|
|
|
|
|
2024-04-02 19:12:10 +02:00
|
|
|
# main 2024-04-02
|
|
|
|
ENV WABT_GIT_TAG 356931a867c7d642bc282fff46a1c95ab0e843f3
|
2022-01-02 03:40:22 +01:00
|
|
|
RUN git clone --recurse-submodules https://github.com/WebAssembly/wabt.git && \
|
|
|
|
cd wabt && \
|
|
|
|
git checkout ${WABT_GIT_TAG} && \
|
|
|
|
cd ../ && \
|
|
|
|
mkdir wabt-build && \
|
|
|
|
cd wabt-build && \
|
|
|
|
/usr/bin/cmake \
|
|
|
|
-DCMAKE_C_COMPILER=/usr/bin/cc \
|
|
|
|
-DCMAKE_CXX_COMPILER=/usr/bin/c++ \
|
|
|
|
-G Ninja \
|
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
|
|
|
|
-DCMAKE_TOOLCHAIN_FILE="" \
|
|
|
|
../wabt && \
|
|
|
|
ninja && \
|
|
|
|
ninja install && \
|
|
|
|
cd ../ && \
|
|
|
|
rm -rf wabt*
|
|
|
|
|
|
|
|
RUN mkdir /wasi-runtimes
|
|
|
|
|
|
|
|
ENV WASMTIME_HOME /wasi-runtimes/wasmtime
|
|
|
|
RUN mkdir ${WASMTIME_HOME} && curl https://wasmtime.dev/install.sh -sSf | bash
|
|
|
|
COPY imagefiles/wasmtime-pwd.sh ${WASMTIME_HOME}/bin/
|
2024-04-02 19:32:34 +02:00
|
|
|
COPY imagefiles/wasmtime-pwd-threads.sh ${WASMTIME_HOME}/bin/
|
2022-01-02 03:40:22 +01:00
|
|
|
ENV PATH "$WASMTIME_HOME/bin:$PATH"
|
|
|
|
|
2022-03-08 01:23:55 +01:00
|
|
|
# For wasmer
|
|
|
|
RUN \
|
|
|
|
apt-get update --yes && \
|
|
|
|
apt-get install --no-install-recommends --yes \
|
|
|
|
libxkbcommon0
|
|
|
|
|
2022-01-02 03:40:22 +01:00
|
|
|
ENV WASMER_DIR /wasi-runtimes/wasmer
|
|
|
|
RUN curl https://get.wasmer.io -sSfL | sh
|
|
|
|
COPY imagefiles/wasmer-pwd.sh ${WASMER_DIR}/bin/
|
|
|
|
ENV PATH "$WASMER_DIR/bin:$PATH"
|
|
|
|
|
|
|
|
ENV WASM3_VERSION 0.5.0
|
|
|
|
RUN mkdir -p /wasi-runtimes/wasm3/bin && \
|
|
|
|
curl -LO https://github.com/wasm3/wasm3/releases/download/v${WASM3_VERSION}/wasm3-linux-x64.elf && \
|
|
|
|
mv wasm3-linux-x64.elf /wasi-runtimes/wasm3/bin/wasm3 && \
|
|
|
|
chmod +x /wasi-runtimes/wasm3/bin/wasm3
|
|
|
|
ENV PATH "/wasi-runtimes/wasm3/bin:$PATH"
|
|
|
|
|
2022-12-28 04:26:26 +01:00
|
|
|
ENV WAVM_VERSION 2022-05-14
|
2022-01-02 03:40:22 +01:00
|
|
|
RUN mkdir -p /wasi-runtimes/wavm/ && \
|
|
|
|
curl -LO https://github.com/WAVM/WAVM/releases/download/nightly%2F${WAVM_VERSION}/wavm-0.0.0-prerelease-linux.tar.gz && \
|
|
|
|
tar -xv -C /wasi-runtimes/wavm/ -f wavm-0.0.0-prerelease-linux.tar.gz
|
2022-03-08 01:23:55 +01:00
|
|
|
ENV PATH "/wasi-runtimes/wavm/bin:$PATH"
|