Skip to content

Commit e63dd69

Browse files
authored
Update wasm-tools dependencies (#12254)
* Update wasm-tools dependencies Brings in binary-parsing support for the WIT `map` type as well as the wasm compact-imports proposal. Neither of these are enabled by default and will continue to be rejected, but it'll now be possible to support them without needing to update dependencies. * Add vets * Update test expectations, add tests Closes #12166
1 parent 2a454f5 commit e63dd69

13 files changed

Lines changed: 239 additions & 82 deletions

File tree

Cargo.lock

Lines changed: 130 additions & 60 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -343,18 +343,18 @@ wit-bindgen = { version = "0.50.0", default-features = false }
343343
wit-bindgen-rust-macro = { version = "0.50.0", default-features = false }
344344

345345
# wasm-tools family:
346-
wasmparser = { version = "0.243.0", default-features = false, features = ['simd'] }
347-
wat = "1.243.0"
348-
wast = "243.0.0"
349-
wasmprinter = "0.243.0"
350-
wasm-encoder = "0.243.0"
351-
wasm-smith = "0.243.0"
352-
wasm-mutate = "0.243.0"
353-
wit-parser = "0.243.0"
354-
wit-component = "0.243.0"
355-
wasm-wave = "0.243.0"
356-
wasm-compose = "0.243.0"
357-
json-from-wast = "0.243.0"
346+
wasmparser = { version = "0.244.0", default-features = false, features = ['simd'] }
347+
wat = "1.244.0"
348+
wast = "244.0.0"
349+
wasmprinter = "0.244.0"
350+
wasm-encoder = "0.244.0"
351+
wasm-smith = "0.244.0"
352+
wasm-mutate = "0.244.0"
353+
wit-parser = "0.244.0"
354+
wit-component = "0.244.0"
355+
wasm-wave = "0.244.0"
356+
wasm-compose = "0.244.0"
357+
json-from-wast = "0.244.0"
358358

359359
# Non-Bytecode Alliance maintained dependencies:
360360
# --------------------------

crates/environ/src/compile/module_environ.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ impl<'a, 'data> ModuleEnvironment<'a, 'data> {
334334
let cnt = usize::try_from(imports.count()).unwrap();
335335
self.result.module.initializers.reserve(cnt);
336336

337-
for entry in imports {
337+
for entry in imports.into_imports() {
338338
let import = entry?;
339339
let ty = match import.ty {
340340
TypeRef::Func(index) => {

crates/environ/src/component/translate.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -867,9 +867,6 @@ impl<'a, 'data> Translator<'a, 'data> {
867867
| wasmparser::CanonicalFunction::ThreadAvailableParallelism => {
868868
bail!("unsupported intrinsic")
869869
}
870-
wasmparser::CanonicalFunction::BackpressureSet => {
871-
bail!("unsupported intrinsic")
872-
}
873870
wasmparser::CanonicalFunction::BackpressureInc => {
874871
let core_type = self.core_func_signature(core_func_index)?;
875872
core_func_index += 1;

crates/environ/src/component/types_builder.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,9 @@ impl ComponentTypesBuilder {
459459
ComponentDefinedType::FixedSizeList(..) => {
460460
bail!("support not implemented for fixed-size-lists");
461461
}
462+
ComponentDefinedType::Map(..) => {
463+
bail!("support not implemented for map type");
464+
}
462465
};
463466
let info = self.type_information(&ret);
464467
if info.depth > MAX_TYPE_DEPTH {

crates/test-util/src/wast.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -705,10 +705,6 @@ impl WastTest {
705705
// https://github.com/WebAssembly/component-model/issues/345 has
706706
// been addressed and the test updated accordingly:
707707
"component-model/test/wasm-tools/naming.wast",
708-
// TODO: Remove this once
709-
// https://github.com/bytecodealliance/wasm-tools/pull/2406 is
710-
// merged and released, and Wasmtime has been updated to use it:
711-
"component-model/test/async/same-component-stream-future.wast",
712708
];
713709
if failing_component_model_tests
714710
.iter()

crates/wasi-preview1-component-adapter/verify/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fn main() -> Result<()> {
2121
Payload::End(_) => {}
2222
Payload::TypeSection(_) => {}
2323
Payload::ImportSection(s) => {
24-
for i in s {
24+
for i in s.into_imports() {
2525
let i = i?;
2626
match i.ty {
2727
TypeRef::Func(_) => {

crates/wit-bindgen/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1620,6 +1620,7 @@ impl<'a> InterfaceGenerator<'a> {
16201620
TypeDefKind::Resource => self.type_resource(id, name, ty, &ty.docs),
16211621
TypeDefKind::Unknown => unreachable!(),
16221622
TypeDefKind::FixedSizeList(..) => todo!(),
1623+
TypeDefKind::Map(..) => todo!(),
16231624
}
16241625
}
16251626

@@ -3409,6 +3410,7 @@ fn type_contains_lists(ty: Type, resolve: &Resolve) -> bool {
34093410
TypeDefKind::Type(ty) => type_contains_lists(*ty, resolve),
34103411
TypeDefKind::List(_) => true,
34113412
TypeDefKind::FixedSizeList(..) => todo!(),
3413+
TypeDefKind::Map(..) => todo!(),
34123414
},
34133415

34143416
// Technically strings are lists too, but we ignore that here because

crates/wit-bindgen/src/rust.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ pub trait RustGenerator<'a> {
133133
TypeDefKind::Type(_) => false,
134134
TypeDefKind::Unknown => unreachable!(),
135135
TypeDefKind::FixedSizeList(..) => todo!(),
136+
TypeDefKind::Map(..) => todo!(),
136137
}
137138
}
138139
}
@@ -189,6 +190,7 @@ pub trait RustGenerator<'a> {
189190
TypeDefKind::Type(t) => self.ty(t, mode),
190191
TypeDefKind::Unknown => unreachable!(),
191192
TypeDefKind::FixedSizeList(..) => todo!(),
193+
TypeDefKind::Map(..) => todo!(),
192194
}
193195
}
194196

crates/wit-bindgen/src/types.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ impl Types {
158158
TypeDefKind::Resource => {}
159159
TypeDefKind::Unknown => unreachable!(),
160160
TypeDefKind::FixedSizeList(..) => todo!(),
161+
TypeDefKind::Map(..) => todo!(),
161162
}
162163
self.type_info.insert(ty, info);
163164
info

0 commit comments

Comments
 (0)