Skip to content

Commit bdace59

Browse files
authored
Merge pull request #485 from Shopify/cache-compiled-module
Add module caching
2 parents bdf00d8 + d47a88d commit bdace59

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/engine.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -238,13 +238,14 @@ pub fn run(params: FunctionRunParams) -> Result<FunctionRunResult> {
238238
/// 2. It keeps the door open for different configurations in the future without breaking changes
239239
/// 3. It makes it easier to find all places where we create an Engine
240240
pub fn new_engine() -> Result<Engine> {
241-
Engine::new(
242-
Config::new()
243-
.wasm_multi_memory(true)
244-
.wasm_threads(false)
245-
.consume_fuel(true)
246-
.epoch_interruption(true),
247-
)
241+
let mut config = Config::new();
242+
config
243+
.wasm_multi_memory(true)
244+
.wasm_threads(false)
245+
.consume_fuel(true)
246+
.epoch_interruption(true);
247+
config.cache_config_load_default()?;
248+
Engine::new(&config)
248249
}
249250

250251
#[cfg(test)]

0 commit comments

Comments
 (0)