Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update package dependencies: WAMR, WASI SDK, and parson #460

Merged
merged 4 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion build/__tools__/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ while true ; do
*) echo "Internal error!" ; exit 1 ;;
esac
done
TEMP

if [ ${F_CLIENT} == "yes" ]; then
CMAKE_ARGS="-DBUILD_CLIENT=1 -DBUILD_TRUSTED=0 -DBUILD_UNTRUSTED=0"
Expand Down
15 changes: 13 additions & 2 deletions common/interpreter/wawaka_wasm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,18 @@ ENABLE_LANGUAGE (ASM)
#################################################################
# WAMR Library
#################################################################

# include the build config template file
INCLUDE (${WAMR_ROOT_DIR}/build-scripts/config_common.cmake)

INCLUDE (${SHARED_DIR}/platform/${WAMR_BUILD_PLATFORM}/shared_platform.cmake)
INCLUDE (${SHARED_DIR}/mem-alloc/mem_alloc.cmake)
INCLUDE (${SHARED_DIR}/utils/shared_utils.cmake)

# this picks up the libc_erro.h, this appears to be an error in WAMR in that the
# test for WASI is AFTER the attempt to include a file that is only available when
# WASI is turned on.
INCLUDE (${SHARED_DIR}/platform/common/libc-util/platform_common_libc_util.cmake)

IF (WAMR_BUILD_LIBC_BUILTIN EQUAL 1)
INCLUDE (${IWASM_DIR}/libraries/libc-builtin/libc_builtin.cmake)
ENDIF ()
Expand All @@ -126,13 +131,19 @@ ENDIF ()

ADD_LIBRARY (${IWASM_STATIC_NAME}
${PLATFORM_SHARED_SOURCE}
${PLATFORM_COMMON_LIBC_UTIL_SOURCE}
${MEM_ALLOC_SHARED_SOURCE}
${UTILS_SHARED_SOURCE}
${LIBC_BUILTIN_SOURCE}
${LIBC_WASI_SOURCE}
${WAMR_POSIX_SOURCES}
${IWASM_COMMON_SOURCE}
${IWASM_INTERP_SOURCE}
${IWASM_COMPL_SOURCE})
${IWASM_COMPL_SOURCE}
# this is necessary because WAMR currently does not have a definition
# for os_is_handle_valid in the sgx_platform.c file
${CMAKE_CURRENT_SOURCE_DIR}/wamr_fixes.c
)

TARGET_INCLUDE_DIRECTORIES(${IWASM_STATIC_NAME} PUBLIC ${SHARED_DIR}/include)
TARGET_INCLUDE_DIRECTORIES(${IWASM_STATIC_NAME} PUBLIC ${IWASM_DIR}/include)
Expand Down
8 changes: 4 additions & 4 deletions common/interpreter/wawaka_wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ enclave with Wawaka enabled, you will need to do the following:
There are many toolchains that could be used to build a WASM code. By default, Wawaka contracts are
compiled with the compilers provided by [WASI SDK](https://github.com/WebAssembly/wasi-sdk). To use
WASI SDK, download and install the appropriate package file from
https://github.com/WebAssembly/wasi-sdk/releases (we have verified that release wasi-sdk-12 works
with WAMR version WAMR-1.1.2).
https://github.com/WebAssembly/wasi-sdk/releases (we have verified that release wasi-sdk-21 works
with WAMR version WAMR-1.3).

```bash
wget -q -P /tmp https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-12/wasi-sdk_12.0_amd64.deb
Expand All @@ -46,14 +46,14 @@ SDK would be installed in the directory `/opt/wasi-sdk`.
If wawaka is configured as the contract interpreter, the libraries implementing the WASM interpreter
will be built for use with Intel SGX. The source for the WAMR interpreter is
included as a submodule in the interpreters/ folder, and will
always point to the latest tagged commit that we have validated: `WAMR-1.1.2`.
always point to the latest tagged commit that we have validated: `WAMR-1.3`.
If the PDO parent repo was not cloned with the `--recurse-submodules` flag,
you will have to explictly pull the submodule source.

```
cd ${PDO_SOURCE_ROOT}/interpreters/wasm-micro-runtime
git submodule update --init
git checkout WAMR-1.1.2 # optional
git checkout WAMR-1.3 # optional
```

The WAMR API is built during the Wawaka build, so no additional
Expand Down
8 changes: 8 additions & 0 deletions common/interpreter/wawaka_wasm/wamr_fixes.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include "platform_internal.h"

bool
os_is_handle_valid(os_file_handle *handle)
{
assert(handle != NULL);
return *handle > -1;
}
Loading
Loading