Macro wasmer::imports

source ·
macro_rules! imports {
    ( $( $ns_name:expr => $ns:tt ),* $(,)? ) => { ... };
}
Expand description

Generate an Imports easily with the imports! macro.

Usage

use wasmer::imports;

let import_object = imports! {
    "env" => {
        "foo" => Function::new_typed(&mut store, foo)
    },
};

fn foo(n: i32) -> i32 {
    n
}