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:
liang.he
2022-12-05 12:25:26 +08:00
committed by GitHub
parent 84a23d43ec
commit f6d67c1cda
6 changed files with 107 additions and 2 deletions

View File

@ -430,4 +430,8 @@
#define WASM_MEM_ALLOC_WITH_USER_DATA 0
#endif
#ifndef WASM_ENABLE_WASM_CACHE
#define WASM_ENABLE_WASM_CACHE 0
#endif
#endif /* end of _CONFIG_H_ */