mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-24 14:11:32 +00:00
pass reference to imports object when instantiating
This commit is contained in:
@ -85,7 +85,7 @@ fn execute_wasm(options: &Run) -> Result<(), String> {
|
||||
};
|
||||
|
||||
let mut instance = module
|
||||
.instantiate(import_object)
|
||||
.instantiate(&import_object)
|
||||
.map_err(|e| format!("Can't instantiate module: {:?}", e))?;
|
||||
|
||||
webassembly::run_instance(
|
||||
|
@ -41,7 +41,7 @@ pub fn instantiate(buffer_source: &[u8], import_object: ImportObject) -> Result<
|
||||
let module = compile(&buffer_source[..])?;
|
||||
|
||||
debug!("webassembly - instantiating");
|
||||
let instance = module.instantiate(import_object)?;
|
||||
let instance = module.instantiate(&import_object)?;
|
||||
|
||||
debug!("webassembly - instance created");
|
||||
Ok(ResultObject {
|
||||
|
Reference in New Issue
Block a user