Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions wasmtime-runtime/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,16 @@ impl InstanceHandle {
self.instance().vmctx_ptr()
}

/// Return a reference-counting pointer to a module.
pub fn module(&self) -> Rc<Module> {
self.instance().module.clone()
}

/// Return a reference to a module.
pub fn module_ref(&self) -> &Module {
&self.instance().module
}

/// Return a mutable reference to the vmctx used by compiled wasm code.
pub fn vmctx_mut(&mut self) -> &mut VMContext {
self.instance_mut().vmctx_mut()
Expand Down