16 std::shared_ptr<CompartmentWrapper> compartment,
17 std::shared_ptr<ModuleParams> module_params,
18 std::shared_ptr<const InstanceEnvironmentFactory> env_factory,
19 std::shared_ptr<IntrinsicModule> intrinsic_module,
20 std::optional<std::shared_ptr<ModuleCache>> module_cache,
21 std::shared_ptr<crypto::Hasher> hasher)
22 : compartment_{std::move(compartment)},
31 BOOST_ASSERT(
hasher_ !=
nullptr);
33 if (module_cache.has_value()) {
34 WAVM::Runtime::setGlobalObjectCache(std::move(module_cache.value()));
39 gsl::span<const uint8_t> code)
const {
outcome::result< std::unique_ptr< Module > > make(gsl::span< const uint8_t > code) const override
std::shared_ptr< ModuleParams > module_params_
std::shared_ptr< CompartmentWrapper > compartment_
ModuleFactoryImpl(std::shared_ptr< CompartmentWrapper > compartment, std::shared_ptr< ModuleParams > module_params, std::shared_ptr< const InstanceEnvironmentFactory > env_factory, std::shared_ptr< IntrinsicModule > intrinsic_module, std::optional< std::shared_ptr< ModuleCache >> module_cache, std::shared_ptr< crypto::Hasher > hasher)
std::shared_ptr< IntrinsicModule > intrinsic_module_
std::shared_ptr< crypto::Hasher > hasher_
static std::unique_ptr< ModuleImpl > compileFrom(std::shared_ptr< CompartmentWrapper > compartment, ModuleParams &module_params, std::shared_ptr< IntrinsicModule > intrinsic_module, std::shared_ptr< const InstanceEnvironmentFactory > env_factory, gsl::span< const uint8_t > code, const common::Hash256 &code_hash)
std::shared_ptr< const InstanceEnvironmentFactory > env_factory_