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:
@ -314,3 +314,7 @@ endif ()
|
||||
if (WAMR_BUILD_ALLOC_WITH_USER_DATA EQUAL 1)
|
||||
add_definitions(-DWASM_MEM_ALLOC_WITH_USER_DATA=1)
|
||||
endif()
|
||||
if (WAMR_BUILD_WASM_CACHE EQUAL 1)
|
||||
add_definitions (-DWASM_ENABLE_WASM_CACHE=1)
|
||||
message (" Wasm files cache enabled")
|
||||
endif ()
|
||||
|
||||
Reference in New Issue
Block a user