Update wasm-tools crates (#4246)
This commit updates the wasm-tools family of crates, notably pulling in the refactorings and updates from bytecodealliance/wasm-tools#621 for the latest iteration of the component model. This commit additionally updates all support for the component model for these changes, notably: * Many bits and pieces of type information was refactored. Many `FooTypeIndex` namings are now `TypeFooIndex`. Additionally there is now `TypeIndex` as well as `ComponentTypeIndex` for the two type index spaces in a component. * A number of new sections are now processed to handle the core and component variants. * Internal maps were split such as the `funcs` map into `component_funcs` and `funcs` (same for `instances`). * Canonical options are now processed individually instead of one bulk `into` definition. Overall this was not a major update to the internals of handling the component model in Wasmtime. Instead this was mostly a surface-level refactoring to make sure that everything lines up with the new binary format for components. * All text syntax used in tests was updated to the new syntax.
This commit is contained in:
@@ -25,7 +25,7 @@ use wasmparser::{
|
||||
ElementSectionReader, Export, ExportSectionReader, ExternalKind, FunctionSectionReader,
|
||||
GlobalSectionReader, GlobalType, ImportSectionReader, MemorySectionReader, MemoryType,
|
||||
NameSectionReader, Naming, Operator, TableSectionReader, TableType, TagSectionReader, TagType,
|
||||
TypeDef, TypeRef, TypeSectionReader,
|
||||
Type, TypeRef, TypeSectionReader,
|
||||
};
|
||||
|
||||
fn memory(ty: MemoryType) -> Memory {
|
||||
@@ -73,7 +73,7 @@ pub fn parse_type_section<'a>(
|
||||
|
||||
for entry in types {
|
||||
match entry? {
|
||||
TypeDef::Func(wasm_func_ty) => {
|
||||
Type::Func(wasm_func_ty) => {
|
||||
environ.declare_type_func(wasm_func_ty.clone().try_into()?)?;
|
||||
module_translation_state
|
||||
.wasm_types
|
||||
|
||||
Reference in New Issue
Block a user