Kagome
Polkadot Runtime Engine in C++17
|
#include <module_instance.hpp>
Public Types | |
using | SegmentOffset = size_t |
using | SegmentData = gsl::span< const uint8_t > |
using | DataSegmentProcessor = std::function< void(SegmentOffset, SegmentData)> |
Public Member Functions | |
virtual | ~ModuleInstance ()=default |
virtual const common::Hash256 & | getCodeHash () const =0 |
virtual outcome::result< PtrSize > | callExportFunction (std::string_view name, common::BufferView encoded_args) const =0 |
virtual outcome::result< std::optional< WasmValue > > | getGlobal (std::string_view name) const =0 |
virtual void | forDataSegment (DataSegmentProcessor const &callback) const =0 |
virtual InstanceEnvironment const & | getEnvironment () const =0 |
virtual outcome::result< void > | resetEnvironment ()=0 |
An instance of a WebAssembly code module Exposes a set of functions and global variables
Definition at line 30 of file module_instance.hpp.
using kagome::runtime::ModuleInstance::DataSegmentProcessor = std::function<void(SegmentOffset, SegmentData)> |
Definition at line 52 of file module_instance.hpp.
using kagome::runtime::ModuleInstance::SegmentData = gsl::span<const uint8_t> |
Definition at line 50 of file module_instance.hpp.
using kagome::runtime::ModuleInstance::SegmentOffset = size_t |
Definition at line 49 of file module_instance.hpp.
|
virtualdefault |
|
pure virtual |
Call the instance's function
name | - name of the function |
args | - a pointer-size describing a buffer with the function parameters |
Implemented in kagome::runtime::wavm::ModuleInstanceImpl, kagome::runtime::binaryen::ModuleInstanceImpl, and kagome::runtime::BorrowedInstance.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |