macro_rules! imports { ( $( $ns_name:expr => $ns:tt ),* $(,)? ) => { ... }; }
Generate an Imports easily with the imports! macro.
Imports
imports!
use wasmer::imports; let import_object = imports! { "env" => { "foo" => Function::new_typed(&mut store, foo) }, }; fn foo(n: i32) -> i32 { n }