wasm-pack
wasm-pack copied to clipboard
How do I import a host function
I am using wasmtime, to run .wasm generated by wasm-pack
In wasmtime,
let import_object = imports! {
"env" => {
"get_counter" => get_counter_func,
"add_to_counter" => add_to_counter_func,
}
};
How do I import these functions in my .wasm file. Sorry for this noob question, I couldn't find any doc in it
What is that imports macro?
You have to use extern blocks.
I don't think this has anything to do with wasm-pack though