fn wasmtime_config(&self) -> anyhow::Result<wasmtime::Config> {
        let mut config = wasmtime::Config::new();

        // Enable Wasmtime's code cache. This makes it so that repeated
        // wizenings of the same Wasm module (e.g. with different WASI inputs)
        // doesn't require re-compiling the Wasm to native code every time.
        config.cache_config_load_default()?;

        // Proposals we support.
        config.wasm_multi_memory(self.wasm_multi_memory.unwrap_or(DEFAULT_WASM_MULTI_MEMORY));
        config.wasm_multi_value(self.wasm_multi_value.unwrap_or(DEFAULT_WASM_MULTI_VALUE));
        config.wasm_module_linking(
            self.wasm_module_linking
                .unwrap_or(DEFAULT_WASM_MODULE_LINKING),
        );

        // Proposoals that we should add support for.
        config.wasm_reference_types(false);
        config.wasm_simd(false);
        config.wasm_threads(false);
        config.wasm_bulk_memory(false);

        Ok(config)
    }
// NB: keep this in sync with the wasmparser features.
keep this in sync with the wasmparser features.
keep this in sync with the wasmparser features .
fn wasmtime_config(&self) -> anyhow::Result<wasmtime::Config> {
        let mut config = wasmtime::Config::new();
        // Enable Wasmtime's code cache. This makes it so that repeated
        // wizenings of the same Wasm module (e.g. with different WASI inputs)
        // doesn't require re-compiling the Wasm to native code every time.
        config.cache_config_load_default()?;
        // Proposals we support.
        config.wasm_multi_memory(self.wasm_multi_memory.unwrap_or(DEFAULT_WASM_MULTI_MEMORY));
        config.wasm_multi_value(self.wasm_multi_value.unwrap_or(DEFAULT_WASM_MULTI_VALUE));
        config.wasm_module_linking(
            self.wasm_module_linking
                .unwrap_or(DEFAULT_WASM_MODULE_LINKING),
        );
        // Proposoals that we should add support for.
        config.wasm_reference_types(false);
        config.wasm_simd(false);
        config.wasm_threads(false);
        config.wasm_bulk_memory(false);
        Ok(config)
    }
fn wasmtime_config ( & self ) -> anyhow :: Result < wasmtime :: Config > { let mut config = wasmtime :: Config :: new ( ) ; // Enable Wasmtime's code cache. This makes it so that repeated // wizenings of the same Wasm module (e.g. with different WASI inputs) // doesn't require re-compiling the Wasm to native code every time. config . cache_config_load_default ( ) ? ; // Proposals we support. config . wasm_multi_memory ( self . wasm_multi_memory . unwrap_or ( DEFAULT_WASM_MULTI_MEMORY ) ) ; config . wasm_multi_value ( self . wasm_multi_value . unwrap_or ( DEFAULT_WASM_MULTI_VALUE ) ) ; config . wasm_module_linking ( self . wasm_module_linking . unwrap_or ( DEFAULT_WASM_MODULE_LINKING ) , ) ; // Proposoals that we should add support for. config . wasm_reference_types ( false ) ; config . wasm_simd ( false ) ; config . wasm_threads ( false ) ; config . wasm_bulk_memory ( false ) ; Ok ( config ) }
NB: keep this in sync with the wasmparser features.
NB : keep this in sync with the wasmparser features .
&self
&self