Update the wasm-tools family of crates (#5310)

Most of the changes here are the updates to the component model which
includes optional URL fields in imports/exports.
This commit is contained in:
Alex Crichton
2022-11-21 15:37:16 -06:00
committed by GitHub
parent c74706aa59
commit b305f251fb
21 changed files with 331 additions and 127 deletions

View File

@@ -840,14 +840,16 @@ impl<'a, 'data> Translator<'a, 'data> {
// An imported component instance is being aliased, so the type of
// the aliased item is directly available from the instance type.
ComponentInstanceType::Index(ty) => {
self.result.push_typedef(self.types[ty].exports[name])
let (_url, ty) = &self.types[ty].exports[name];
self.result.push_typedef(*ty);
}
// An imported component was instantiated so the type of the aliased
// export is available through the type of the export on the
// original component.
ComponentInstanceType::InstantiatedIndex(ty) => {
self.result.push_typedef(self.types[ty].exports[name])
let (_, ty) = self.types[ty].exports[name];
self.result.push_typedef(ty);
}
// A static nested component was instantiated which means that the