This commit fixes the `wasmtime::Instance` instantiation API when imports have the same name but might be imported under different types. This is handled in the API by listing imports as a list instead of as a name map, but they were interpreted as a name map under the hood causing collisions. This commit now keeps track of the index used to define each import, and the index is passed through in the `Resolver`. Existing implementaitons of `Resolver` all ignore this, but the API now uses it exclusivley to match up `Extern` definitions to imports.
This is the wasmtime-environ crate, which contains the implementations
of the ModuleEnvironment and FuncEnvironment traits from
cranelift-wasm. They effectively
implement an ABI for basic wasm compilation that defines how linear memories
are allocated, how indirect calls work, and other details. They can be used
for JITing, native object files, or other purposes.