From d47a88d2e2ee9055ae0d437c85036eabd257d59e Mon Sep 17 00:00:00 2001 From: David Cameron Date: Tue, 10 Jun 2025 08:37:04 -0400 Subject: [PATCH] Add module caching --- src/engine.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/engine.rs b/src/engine.rs index 3d9bd709..dcba08bc 100644 --- a/src/engine.rs +++ b/src/engine.rs @@ -238,13 +238,14 @@ pub fn run(params: FunctionRunParams) -> Result { /// 2. It keeps the door open for different configurations in the future without breaking changes /// 3. It makes it easier to find all places where we create an Engine pub fn new_engine() -> Result { - Engine::new( - Config::new() - .wasm_multi_memory(true) - .wasm_threads(false) - .consume_fuel(true) - .epoch_interruption(true), - ) + let mut config = Config::new(); + config + .wasm_multi_memory(true) + .wasm_threads(false) + .consume_fuel(true) + .epoch_interruption(true); + config.cache_config_load_default()?; + Engine::new(&config) } #[cfg(test)]