Enable wasm cache loading in wasm-c-api (#1759)
Use sha256 to hash binary file content. If the incoming wasm binary is cached before, wasm_module_new() simply returns the existed one. Use -DWAMR_BUILD_WASM_CACHE=0/1 to control the feature. OpenSSL 1.1.1 is required if the feature is enabled.
This commit is contained in:
@ -27,6 +27,14 @@ if (DEFINED EXTRA_SDK_INCLUDE_PATH)
|
||||
)
|
||||
endif ()
|
||||
|
||||
# Need exactly OpenSSL 1.1.1
|
||||
if (WAMR_BUILD_WASM_CACHE EQUAL 1)
|
||||
# Set OPENSSL_ROOT_DIR to the root directory of an OpenSSL installation.
|
||||
# Like: cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl
|
||||
# Especially on MacOS
|
||||
find_package(OpenSSL 1.1.1 EXACT REQUIRED)
|
||||
endif ()
|
||||
|
||||
# Set default options
|
||||
|
||||
# Set WAMR_BUILD_TARGET, currently values supported:
|
||||
|
||||
Reference in New Issue
Block a user