Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sys-vm.hpp
Go to the documentation of this file.
1#pragma once
2
9#include <softfloat_types.h>
10
11//sys-vm includes
12#include <sysio/vm/backend.hpp>
13#include <sysio/vm/profile.hpp>
14
15namespace sysio { namespace chain { namespace webassembly { namespace eos_vm_runtime {
16
17struct apply_options;
18
19}}
20
21template <typename Impl>
23
24template <typename Options>
26
27namespace webassembly { namespace eos_vm_runtime {
28
29using namespace fc;
30using namespace sysio::vm;
31
32void validate(const bytes& code, const whitelisted_intrinsics_type& intrinsics );
33
34void validate(const bytes& code, const wasm_config& cfg, const whitelisted_intrinsics_type& intrinsics );
35
36struct apply_options;
37
39 boost::container::flat_set<name> accounts_to_profile;
40};
41
42template<typename Backend>
44 public:
46 std::unique_ptr<wasm_instantiated_module_interface> instantiate_module(const char* code_bytes, size_t code_size, std::vector<uint8_t>,
47 const digest_type& code_hash, const uint8_t& vm_type, const uint8_t& vm_version) override;
48
50
51 private:
52 // todo: managing this will get more complicated with sync calls;
53 // immediately_exit_currently_running_module() should probably
54 // move from wasm_runtime_interface to wasm_instantiated_module_interface.
55 eos_vm_backend_t<Backend>* _bkend = nullptr; // non owning pointer to allow for immediate exit
56
57 template<typename Impl>
59};
60
62 public:
64 std::unique_ptr<wasm_instantiated_module_interface> instantiate_module(const char* code_bytes, size_t code_size, std::vector<uint8_t>,
65 const digest_type& code_hash, const uint8_t& vm_type, const uint8_t& vm_version) override;
66
68};
69
70}}}}// sysio::chain::webassembly::eos_vm_runtime
std::unique_ptr< wasm_instantiated_module_interface > instantiate_module(const char *code_bytes, size_t code_size, std::vector< uint8_t >, const digest_type &code_hash, const uint8_t &vm_type, const uint8_t &vm_version) override
std::unique_ptr< wasm_instantiated_module_interface > instantiate_module(const char *code_bytes, size_t code_size, std::vector< uint8_t >, const digest_type &code_hash, const uint8_t &vm_type, const uint8_t &vm_version) override
Definition sys-vm.cpp:242
namespace sysio::chain
Definition authority.cpp:3
void validate(const bytes &code, const whitelisted_intrinsics_type &intrinsics)
Definition sys-vm.cpp:64
shared_flat_multimap< uint64_t, shared_string > whitelisted_intrinsics_type
unsigned char uint8_t
Definition stdint.h:124
boost::container::flat_set< name > accounts_to_profile
Definition sys-vm.hpp:39