6 #ifndef KAGOME_CORE_RUNTIME_BINARYEN_WASM_MODULE_IMPL 7 #define KAGOME_CORE_RUNTIME_BINARYEN_WASM_MODULE_IMPL 16 using namespace ::
wasm;
21 class EphemeralTrieBatch;
26 class InstanceEnvironmentFactory;
33 public std::enable_shared_from_this<ModuleImpl> {
35 static constexpr
auto kDefaultHeappages = 1024;
36 enum class Error { EMPTY_STATE_CODE = 1, INVALID_STATE_CODE };
46 static outcome::result<std::unique_ptr<ModuleImpl>> createFromCode(
47 const std::vector<uint8_t> &code,
48 std::shared_ptr<const InstanceEnvironmentFactory> env_factory_,
51 outcome::result<std::shared_ptr<ModuleInstance>> instantiate()
55 ModuleImpl(std::unique_ptr<wasm::Module> &&module,
56 std::shared_ptr<const InstanceEnvironmentFactory> env_factory,
68 #endif // KAGOME_CORE_RUNTIME_BINARYEN_WASM_MODULE_IMPL std::shared_ptr< wasm::Module > module_
std::shared_ptr< const InstanceEnvironmentFactory > env_factory_
OUTCOME_HPP_DECLARE_ERROR(kagome::runtime::binaryen, ModuleImpl::Error)
const common::Hash256 code_hash_