[][src]Trait wasmer_engine::Resolver

pub trait Resolver {
    pub fn resolve(
        _index: u32,
        module: &str,
        field: &str
    ) -> Option<Export>; }

Import resolver connects imports with available exported values.

Required methods

pub fn resolve(&self, _index: u32, module: &str, field: &str) -> Option<Export>[src]

Resolves an import a WebAssembly module to an export it's hooked up to.

The index provided is the index of the import in the wasm module that's being resolved. For example 1 means that it's the second import listed in the wasm module.

The module and field arguments provided are the module/field names listed on the import itself.


The index is useful because some WebAssembly modules may rely on that for resolving ambiguity in their imports. Such as:

  (import "" "" (func))
  (import "" "" (func (param i32) (result i32)))
Loading content...


impl Resolver for NullResolver[src]

impl<T: NamedResolver> Resolver for T[src]

pub fn resolve(&self, _index: u32, module: &str, field: &str) -> Option<Export>[src]

By default this method will be calling NamedResolver::resolve_by_name, dismissing the provided index.

Loading content...