fn resolve_global(
        &self,
        field_name: &str,
        _descriptor: &GlobalDescriptor,
    ) -> Result<GlobalRef, wasmi::Error> {
        //println!("global {:?}", field_name);

        if field_name.contains("memoryBase") {
            return Ok(GlobalInstance::alloc(RuntimeValue::I32(0), false));
        }

        Err(wasmi::Error::Global("Does not exist".to_string()))
    }
/// Resolve a global variable.
///
/// Returned global should match given `descriptor`, i.e. type and mutability
/// should match. Otherwise, link-time error will occur.
Resolve a global variable.
Returned global should match given `descriptor`, i.e. type and mutability
should match. Otherwise, link-time error will occur.
Resolve a global variable . Returned global should match given ` descriptor ` i . e . type and mutability should match . Otherwise link - time error will occur .
fn resolve_global(
        &self,
        field_name: &str,
        _descriptor: &GlobalDescriptor,
    ) -> Result<GlobalRef, wasmi::Error> {
        //println!("global {:?}", field_name);
        if field_name.contains("memoryBase") {
            return Ok(GlobalInstance::alloc(RuntimeValue::I32(0), false));
        }
        Err(wasmi::Error::Global("Does not exist".to_string()))
    }
fn resolve_global ( & self , field_name : & str , _descriptor : & GlobalDescriptor , ) -> Result < GlobalRef , wasmi :: Error > { //println!("global {:?}", field_name); if field_name . contains ( " " ) { return Ok ( GlobalInstance :: alloc ( RuntimeValue :: I32 ( 0 ) , false ) ) ; } Err ( wasmi :: Error :: Global ( " " . to_string ( ) ) ) }
Resolve a global variable.
Resolve a global variable .
&self
field_name
&str
_descriptor
&GlobalDescriptor
&self
field_name
&str
_descriptor
&GlobalDescriptor