mirror of
https://github.com/bensuperpc/dockcross.git
synced 2025-06-11 21:49:24 +02:00
web-wasm,web-wasi: Add build tools
- Binaryen - wabt - WASI runtimes: wasmtime, wasmer, wavm, wasm3
This commit is contained in:
@ -2,12 +2,6 @@ FROM dockcross/base:latest
|
||||
|
||||
LABEL maintainer="Matt McCormick matt.mccormick@kitware.com"
|
||||
|
||||
# The cross-compiling emulator
|
||||
ENV WASMTIME_HOME /usr/local/wasmtime
|
||||
RUN mkdir ${WASMTIME_HOME} && curl https://wasmtime.dev/install.sh -sSf | bash
|
||||
COPY wasmtime-pwd.sh ${WASMTIME_HOME}/bin/
|
||||
ENV PATH "$WASMTIME_HOME/bin:$PATH"
|
||||
|
||||
ENV WASI_VERSION 14
|
||||
ENV WASI_VERSION_FULL ${WASI_VERSION}.0
|
||||
RUN cd /usr/ && \
|
||||
@ -17,7 +11,7 @@ RUN cd /usr/ && \
|
||||
ENV WASI_SDK_PATH /usr/wasi-sdk-${WASI_VERSION_FULL}
|
||||
ENV WASI_SYSROOT ${WASI_SDK_PATH}/share/wasi-sysroot
|
||||
|
||||
COPY clang-wasi-sysroot.sh clang++-wasi-sysroot.sh wasmtime-pwd.sh /usr/local/bin/
|
||||
COPY clang-wasi-sysroot.sh clang++-wasi-sysroot.sh /usr/local/bin/
|
||||
|
||||
ENV CROSS_TRIPLE=wasm32-wasi
|
||||
ENV CROSS_ROOT=${WASI_SDK_PATH}
|
||||
@ -27,6 +21,8 @@ ENV AR=${CROSS_ROOT}/bin/llvm-ar \
|
||||
CXX=clang++-wasi-sysroot.sh \
|
||||
LD=${CROSS_ROOT}/bin/wasm-ld
|
||||
|
||||
#include "common.webassembly"
|
||||
|
||||
COPY WASI.cmake /usr/src/
|
||||
RUN mv /usr/src/WASI.cmake /usr/share/cmake-*/Modules/Platform/
|
||||
COPY Toolchain.cmake ${CROSS_ROOT}/
|
||||
|
@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Mount the PWD to enable access in try_run commands
|
||||
exec ${WASMTIME_HOME}/bin/wasmtime run --dir=. --dir=$PWD "$@"
|
Reference in New Issue
Block a user