6 #ifndef KAGOME_CORE_RUNTIME_WAVM_MODULE_CACHE_HPP 7 #define KAGOME_CORE_RUNTIME_WAVM_MODULE_CACHE_HPP 11 #include <WAVM/Runtime/Runtime.h> 27 struct ModuleCache :
public WAVM::Runtime::ObjectCacheInterface {
29 ModuleCache(std::shared_ptr<crypto::Hasher> hasher, fs::path cache_dir);
31 std::vector<WAVM::U8> getCachedObject(
32 const WAVM::U8 *wasmBytes,
33 WAVM::Uptr numWASMBytes,
34 std::function<std::vector<WAVM::U8>()> &&compileThunk)
override;
44 #endif // KAGOME_CORE_RUNTIME_WAVM_MODULE_CACHE_HPP
std::shared_ptr< soralog::Logger > Logger
std::shared_ptr< crypto::Hasher > hasher_