16 std::shared_ptr<storage::trie::TrieStorage> storage,
17 std::shared_ptr<storage::trie::TrieSerializer> serializer,
18 std::shared_ptr<host_api::HostApiFactory> host_api_factory,
19 std::shared_ptr<blockchain::BlockHeaderRepository> block_header_repo,
20 std::shared_ptr<storage::changes_trie::ChangesTracker> changes_tracker,
21 std::shared_ptr<runtime::RuntimePropertiesCache> cache)
22 : storage_{std::move(storage)},
23 serializer_{std::move(serializer)},
24 host_api_factory_{std::move(host_api_factory)},
29 BOOST_ASSERT(serializer_);
30 BOOST_ASSERT(host_api_factory_);
37 auto memory_factory = std::make_shared<BinaryenMemoryFactory>();
38 auto new_memory_provider =
39 std::make_shared<BinaryenMemoryProvider>(memory_factory);
40 auto new_storage_provider =
41 std::make_shared<TrieStorageProviderImpl>(
storage_, serializer_);
42 auto core_factory = std::make_shared<CoreApiFactoryImpl>(
44 auto host_api = std::shared_ptr<host_api::HostApi>(host_api_factory_->make(
45 core_factory, new_memory_provider, new_storage_provider));
46 auto rei = std::make_shared<RuntimeExternalInterface>(host_api);
47 new_memory_provider->setExternalInterface(rei);
50 std::move(new_storage_provider),
std::shared_ptr< storage::changes_trie::ChangesTracker > changes_tracker_
std::shared_ptr< runtime::RuntimePropertiesCache > cache_
InstanceEnvironment make(MemoryOrigin memory_origin, WAVM::Runtime::Instance *runtime_instance, std::shared_ptr< IntrinsicModuleInstance > intrinsic_instance) const
std::shared_ptr< storage::trie::TrieStorage > storage_
InstanceEnvironmentFactory(std::shared_ptr< storage::trie::TrieStorage > storage, std::shared_ptr< storage::trie::TrieSerializer > serializer, std::shared_ptr< host_api::HostApiFactory > host_api_factory, std::shared_ptr< blockchain::BlockHeaderRepository > block_header_repo, std::shared_ptr< storage::changes_trie::ChangesTracker > changes_tracker, std::shared_ptr< RuntimePropertiesCache > cache)
std::shared_ptr< blockchain::BlockHeaderRepository > block_header_repo_