6 #ifndef KAGOME_CORE_RUNTIME_WAVM_IMPL_MODULE_INSTANCE_HPP 7 #define KAGOME_CORE_RUNTIME_WAVM_IMPL_MODULE_INSTANCE_HPP 11 #include <string_view> 13 #include <WAVM/Runtime/Runtime.h> 27 class CompartmentWrapper;
31 public std::enable_shared_from_this<ModuleInstanceImpl> {
42 WAVM::Runtime::GCPointer<WAVM::Runtime::Instance> instance,
43 WAVM::Runtime::ModuleRef module,
44 std::shared_ptr<const CompartmentWrapper> compartment,
51 outcome::result<PtrSize> callExportFunction(
54 outcome::result<std::optional<WasmValue>> getGlobal(
55 std::string_view name)
const override;
60 outcome::result<void> resetEnvironment()
override;
64 WAVM::Runtime::GCPointer<WAVM::Runtime::Instance>
instance_;
75 #endif // KAGOME_CORE_RUNTIME_WAVM_IMPL_MODULE_INSTANCE_HPP std::function< void(SegmentOffset, SegmentData)> DataSegmentProcessor
common::Hash256 code_hash_
OUTCOME_HPP_DECLARE_ERROR(kagome::api, JRpcServerImpl::Error)
const common::Hash256 & getCodeHash() const override
static const wasm::Name env
std::shared_ptr< soralog::Logger > Logger
std::shared_ptr< const CompartmentWrapper > compartment_
WAVM::Runtime::ModuleRef module_
WAVM::Runtime::GCPointer< WAVM::Runtime::Instance > instance_