Split SandboxInstance::get_global_val implementation per backend (#11234)

This commit is contained in:
Dmitry Kashitsyn
2022-04-21 15:06:04 +06:00
committed by GitHub
parent 51f22041dd
commit a43b7bd3fa
3 changed files with 26 additions and 23 deletions
@@ -321,3 +321,8 @@ pub fn invoke(
})
})
}
/// Get global value by name
pub fn get_global(instance: &wasmi::ModuleRef, name: &str) -> Option<Value> {
Some(instance.export_by_name(name)?.as_global()?.get().into())
}