Kagome
Polkadot Runtime Engine in C++17
intrinsic_resolver_impl.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_CORE_RUNTIME_WAVM_IMPL_INTRINSIC_RESOLVER_IMPL_HPP
7 #define KAGOME_CORE_RUNTIME_WAVM_IMPL_INTRINSIC_RESOLVER_IMPL_HPP
8 
10 
11 #include <unordered_map>
12 
13 #include <WAVM/Runtime/Intrinsics.h>
14 #include <WAVM/Runtime/Linker.h>
15 
16 #include "log/logger.hpp"
17 
18 namespace WAVM::Runtime {
19  struct Compartment;
20  struct ContextRuntimeData;
21 } // namespace WAVM::Runtime
22 
23 namespace WAVM::Intrinsics {
24  struct Function;
25 } // namespace WAVM::Intrinsics
26 
27 namespace kagome::runtime::wavm {
28  class CompartmentWrapper;
29  class MemoryImpl;
30  class IntrinsicModuleInstance;
31 
33  public:
35  std::shared_ptr<IntrinsicModuleInstance> module_instance);
36 
37  bool resolve(const std::string &moduleName,
38  const std::string &exportName,
39  WAVM::IR::ExternType type,
40  WAVM::Runtime::Object *&outObject) override;
41 
42  private:
43  std::shared_ptr<IntrinsicModuleInstance> module_instance_;
45  };
46 
47 } // namespace kagome::runtime::wavm
48 
49 #endif // KAGOME_CORE_RUNTIME_WAVM_IMPL_INTRINSIC_RESOLVER_IMPL_HPP
std::shared_ptr< IntrinsicModuleInstance > module_instance_
std::shared_ptr< soralog::Logger > Logger
Definition: logger.hpp:23