Propagate module-linking types to wasmtime (#2115)
This commit adds lots of plumbing to get the type section from the module linking proposal plumbed all the way through to the `wasmtime` crate and the `wasmtime-c-api` crate. This isn't all that useful right now because Wasmtime doesn't support imported/exported modules/instances, but this is all necessary groundwork to getting that exported at some point. I've added some light tests but I suspect the bulk of the testing will come in a future commit. One major change in this commit is that `SignatureIndex` no longer follows type type index space in a wasm module. Instead a new `TypeIndex` type is used to track that. Function signatures, still indexed by `SignatureIndex`, are then packed together tightly.
This commit is contained in:
@@ -17,6 +17,10 @@ pub fn dummy_imports<'module>(
|
||||
ExternType::Global(global_ty) => Extern::Global(dummy_global(&store, global_ty)?),
|
||||
ExternType::Table(table_ty) => Extern::Table(dummy_table(&store, table_ty)?),
|
||||
ExternType::Memory(mem_ty) => Extern::Memory(dummy_memory(&store, mem_ty)),
|
||||
|
||||
// FIXME(#2094)
|
||||
ExternType::Instance(_) => unimplemented!(),
|
||||
ExternType::Module(_) => unimplemented!(),
|
||||
})
|
||||
})
|
||||
.collect()
|
||||
|
||||
Reference in New Issue
Block a user