-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HPCC-29914 Add embedded wasm support
Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
- Loading branch information
1 parent
908a215
commit a633050
Showing
29 changed files
with
1,136 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 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 |
---|---|---|
|
@@ -41,6 +41,7 @@ set(PLUGINS_LIST | |
SQLITE3EMBED | ||
SQS | ||
V8EMBED | ||
WASMEMBED | ||
EXAMPLEPLUGIN | ||
) | ||
|
||
|
File renamed without changes.
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
3 changes: 2 additions & 1 deletion
3
dockerfiles/vcpkg/centos-7.dockerfile → dockerfiles/vcpkg/centos-7/Dockerfile
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
File renamed without changes.
File renamed without changes.
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,48 @@ | ||
project(wasmembed) | ||
|
||
if(WASMEMBED) | ||
ADD_PLUGIN(wasmembed) | ||
if(MAKE_WASMEMBED) | ||
|
||
add_subdirectory(secure-enclave) | ||
|
||
include_directories( | ||
./../../common/thorhelper | ||
./../../dali/base | ||
./../../rtl/eclrtl | ||
./../../rtl/include | ||
./../../rtl/nbcd | ||
./../../system/include | ||
./../../system/jlib | ||
./../../system/mp | ||
) | ||
|
||
add_definitions(-D_USRDLL -DWASMEMBED_EXPORTS) | ||
|
||
add_library(wasmembed SHARED | ||
wasmembed.cpp | ||
) | ||
|
||
target_link_libraries(wasmembed | ||
roxiemem | ||
eclrtl | ||
jlib | ||
secure-enclave | ||
) | ||
|
||
install( | ||
TARGETS wasmembed | ||
DESTINATION plugins | ||
) | ||
|
||
else() | ||
message(WARNING "Cannot build wasmembed plugin") | ||
endif() | ||
endif() | ||
|
||
if(PLATFORM OR CLIENTTOOLS_ONLY) | ||
install( | ||
FILES ${CMAKE_CURRENT_SOURCE_DIR}/wasm.ecllib | ||
DESTINATION plugins | ||
COMPONENT Runtime) | ||
endif() |
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,41 @@ | ||
project(secure-enclave) | ||
|
||
set(CMAKE_CXX_STANDARD 20) | ||
|
||
find_path(WASMTIME_CPP_API_INCLUDE_DIRS "wasmtime-cpp-api/wasmtime.hh" | ||
PATHS ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} | ||
) | ||
if (WIN32) | ||
find_library(WASMTIME_LIB NAMES wasmtime.dll | ||
PATHS ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} | ||
) | ||
else() | ||
find_library(WASMTIME_LIB NAMES wasmtime | ||
PATHS ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} | ||
) | ||
endif() | ||
|
||
include_directories( | ||
${WASMTIME_CPP_API_INCLUDE_DIRS}/wasmtime-c-api | ||
${WASMTIME_CPP_API_INCLUDE_DIRS}/wasmtime-cpp-api | ||
./../../../system/include | ||
./../../../rtl/eclrtl | ||
./../../../system/jlib | ||
) | ||
|
||
add_definitions(-D_USRDLL -DSECUREENCLAVE_EXPORTS) | ||
|
||
add_library(secure-enclave SHARED | ||
secure-enclave.cpp | ||
) | ||
|
||
target_link_libraries(secure-enclave PRIVATE | ||
${WASMTIME_LIB} | ||
) | ||
|
||
install( | ||
TARGETS secure-enclave | ||
DESTINATION plugins | ||
CALC_DEPS | ||
) | ||
|
Oops, something went wrong.