6 #ifndef KAGOME_CORE_RUNTIME_BINARYEN_BINARYEN_MEMORY_PROVIDER_HPP 7 #define KAGOME_CORE_RUNTIME_BINARYEN_BINARYEN_MEMORY_PROVIDER_HPP 15 class RuntimeExternalInterface;
22 enum class Error { OUTDATED_EXTERNAL_INTERFACE = 1 };
25 std::shared_ptr<const BinaryenMemoryFactory> memory_factory);
27 std::optional<std::reference_wrapper<runtime::Memory>> getCurrentMemory()
30 [[nodiscard]] outcome::result<void> resetMemory(
33 void setExternalInterface(std::weak_ptr<RuntimeExternalInterface> rei);
46 #endif // KAGOME_CORE_RUNTIME_BINARYEN_BINARYEN_MEMORY_PROVIDER_HPP
uint32_t WasmSize
Size type is uint32_t because we are working in 32 bit address space.
std::shared_ptr< MemoryImpl > memory_
std::shared_ptr< const BinaryenMemoryFactory > memory_factory_
OUTCOME_HPP_DECLARE_ERROR(kagome::runtime::binaryen, BinaryenMemoryProvider::Error)
std::weak_ptr< RuntimeExternalInterface > external_interface_