forked from dockcross/dockcross
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request dockcross#822 from thewtex/wasi-threads
Wasi threads
- Loading branch information
Showing
8 changed files
with
87 additions
and
8 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 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
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,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Mount the PWD and the /work mount dir to enable access in try_run commands | ||
exec ${WASMTIME_HOME}/bin/wasmtime -S threads=y run --dir=. --dir=$PWD --dir=/work/ "$@" |
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,11 @@ | ||
ARG ORG=dockcross | ||
FROM ${ORG}/web-wasi:latest | ||
|
||
LABEL maintainer="Matt McCormick matt.mccormick@kitware.com" | ||
|
||
ENV CROSS_TRIPLE=wasm32-wasi-threads | ||
|
||
COPY Toolchain.cmake ${CROSS_ROOT}/ | ||
ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/Toolchain.cmake | ||
|
||
#include "common.label-and-env" |
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,17 @@ | ||
set(WASI_SDK_PREFIX $ENV{WASI_SDK_PATH}) | ||
include($ENV{WASI_SDK_PATH}/share/cmake/wasi-sdk-pthread.cmake) | ||
|
||
set(CMAKE_FIND_ROOT_PATH $ENV{CROSS_ROOT}) | ||
set(CMAKE_SYSROOT $ENV{WASI_SYSROOT}) | ||
|
||
set(CMAKE_C_COMPILER /usr/local/bin/clang-wasi-sysroot.sh) | ||
set(CMAKE_CXX_COMPILER /usr/local/bin/clang++-wasi-sysroot.sh) | ||
set(CMAKE_AR llvm-ar-$ENV{LLVM_VERSION}) | ||
set(CMAKE_RANLIB llvm-ranlib-$ENV{LLVM_VERSION}) | ||
set(CMAKE_ASM_COMPILER clang-$ENV{LLVM_VERSION}) | ||
|
||
set(CMAKE_C_COMPILER_TARGET $ENV{CROSS_TRIPLE}) | ||
set(CMAKE_CXX_COMPILER_TARGET $ENV{CROSS_TRIPLE}) | ||
set(CMAKE_ASM_COMPILER_TARGET $ENV{CROSS_TRIPLE}) | ||
|
||
set(CMAKE_CROSSCOMPILING_EMULATOR /wasi-runtimes/wasmtime/bin/wasmtime-pwd-threads.sh) |
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