Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
runtime_interface.hpp
Go to the documentation of this file.
1#pragma once
2#include <vector>
3#include <memory>
4
5namespace IR {
6 struct Module;
7}
8
9namespace sysio { namespace chain {
10
11class apply_context;
12
14 public:
15 virtual void apply(apply_context& context) = 0;
16 virtual void fast_shutdown() {}
17
19};
20
22 public:
23 virtual std::unique_ptr<wasm_instantiated_module_interface> instantiate_module(const char* code_bytes, size_t code_size, std::vector<uint8_t> initial_memory,
24 const digest_type& code_hash, const uint8_t& vm_type, const uint8_t& vm_version) = 0;
25
26 //immediately exit the currently running wasm_instantiated_module_interface. Yep, this assumes only one can possibly run at a time.
28
30};
31
32}}
virtual void apply(apply_context &context)=0
virtual std::unique_ptr< wasm_instantiated_module_interface > instantiate_module(const char *code_bytes, size_t code_size, std::vector< uint8_t > initial_memory, const digest_type &code_hash, const uint8_t &vm_type, const uint8_t &vm_version)=0
virtual void immediately_exit_currently_running_module()=0
unsigned char uint8_t
Definition stdint.h:124