Well it depends. If you are using the browser version you must pass an object containing the functions, memories, or function tables, and the names must match what the binary expects. e.g.
Assemblyscript:
@external("log", "logInt")
declare function logInt(i: u32): void;
You also typically want the imported functions to have access to the memory of the WebAssembly instance as then you can read/write data directly to it. This is done by declaring the memory that is imported in the scope of the imports and then passing the memory as an import.
Well it depends. If you are using the browser version you must pass an object containing the functions, memories, or function tables, and the names must match what the binary expects. e.g. Assemblyscript:
You also typically want the imported functions to have access to the memory of the WebAssembly instance as then you can read/write data directly to it. This is done by declaring the memory that is imported in the scope of the imports and then passing the memory as an import.