Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

Do not allocate when cloning `ModuleRuntimeInfo` (#12413)

Nick Fitzgeralddd47158c7fcc
diff --git a/crates/wasmtime/src/runtime/vm.rs b/crates/wasmtime/src/runtime/vm.rs
index 37e8fdad05..cef56814f4 100644
--- a/crates/wasmtime/src/runtime/vm.rs
+++ b/crates/wasmtime/src/runtime/vm.rs
@@ -290,7 +290,7 @@ unsafe impl Sync for VMStoreRawPtr {}
#[derive(Clone)]
pub enum ModuleRuntimeInfo {
Module(crate::Module),
- Bare(Box<BareModuleInfo>),
+ Bare(Arc<BareModuleInfo>),
}
/// A barebones implementation of ModuleRuntimeInfo that is useful for