6 #ifndef KAGOME_CORE_RUNTIME_MODULE_INSTANCE_HPP 7 #define KAGOME_CORE_RUNTIME_MODULE_INSTANCE_HPP 11 #include <boost/variant.hpp> 22 static_assert(
sizeof(
float) == 4);
23 static_assert(
sizeof(
double) == 8);
24 using WasmValue = boost::variant<int32_t, int64_t, float, double>;
46 virtual outcome::result<std::optional<WasmValue>>
getGlobal(
47 std::string_view name)
const = 0;
52 std::function<void(SegmentOffset, SegmentData)>;
61 #endif // KAGOME_CORE_RUNTIME_MODULE_INSTANCE_HPP std::function< void(SegmentOffset, SegmentData)> DataSegmentProcessor
virtual outcome::result< void > resetEnvironment()=0
virtual ~ModuleInstance()=default
gsl::span< const uint8_t > SegmentData
virtual void forDataSegment(DataSegmentProcessor const &callback) const =0
virtual const common::Hash256 & getCodeHash() const =0
boost::variant< int32_t, int64_t, float, double > WasmValue
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 InstanceEnvironment const & getEnvironment() const =0