Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

Update the wasm-tools family of crates to version 249 (#13389)

Nick Fitzgeraldb8e47ab08f1d
diff --git a/Cargo.lock b/Cargo.lock
index a3fe4552a8..da04e90013 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -645,7 +645,7 @@ dependencies = [
"test-programs-artifacts",
"tokio",
"wasm-compose",
- "wasmparser 0.248.0",
+ "wasmparser 0.249.0",
"wasmtime",
"wasmtime-wasi",
]
@@ -2252,14 +2252,14 @@ dependencies = [
[[package]]
name = "json-from-wast"
-version = "0.248.0"
+version = "0.249.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "692e5e6883558fb83746e7ab1da0d94a69b31286f88ecaa9ce6add0f269da0b6"
+checksum = "37f89300ae0e8a5a1d462beb0549078ff0e6a592f26d75350e667c70dccc9cec"
dependencies = [
"anyhow",
"serde",
"serde_derive",
- "wast 248.0.0",
+ "wast 249.0.0",
]
[[package]]
@@ -3820,7 +3820,7 @@ dependencies = [
"wasmtime",
"wasmtime-test-util",
"wat",
- "wit-component 0.248.0",
+ "wit-component 0.249.0",
]
[[package]]
@@ -4290,7 +4290,7 @@ name = "verify-component-adapter"
version = "46.0.0"
dependencies = [
"anyhow",
- "wasmparser 0.248.0",
+ "wasmparser 0.249.0",
"wat",
]
@@ -4398,7 +4398,7 @@ dependencies = [
"byte-array-literals",
"object 0.39.0",
"wasip1",
- "wasm-encoder 0.248.0",
+ "wasm-encoder 0.249.0",
"wit-bindgen-rust-macro 0.57.0",
]
@@ -4483,9 +4483,9 @@ checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49"
[[package]]
name = "wasm-compose"
-version = "0.248.0"
+version = "0.249.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96ba953e2b9b4b4b52a31cf4e3ee1c1374c872b6e012cf2138d1c37cba00bfd6"
+checksum = "210c8e8da7a8d3ef8280c72ffcb32289c8354d905033b3daa6333a57c17b5181"
dependencies = [
"anyhow",
"heck 0.5.0",
@@ -4493,8 +4493,8 @@ dependencies = [
"log",
"petgraph",
"smallvec 1.15.1",
- "wasm-encoder 0.248.0",
- "wasmparser 0.248.0",
+ "wasm-encoder 0.249.0",
+ "wasmparser 0.249.0",
"wat",
]
@@ -4520,12 +4520,12 @@ dependencies = [
[[package]]
name = "wasm-encoder"
-version = "0.248.0"
+version = "0.249.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ac92cf547bc18d27ecc521015c08c353b4f18b84ab388bb6d1b6b682c620d9b6"
+checksum = "69830ccbbf41c55eb585991659fb70867ef628193af3a495f09a6956f7615e59"
dependencies = [
"leb128fmt",
- "wasmparser 0.248.0",
+ "wasmparser 0.249.0",
]
[[package]]
@@ -4554,42 +4554,42 @@ dependencies = [
[[package]]
name = "wasm-metadata"
-version = "0.248.0"
+version = "0.249.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ee4f85f11dcdabc91e805c03eb84ccc7b7ef2282c6610bb83c7a7c853425850c"
+checksum = "bf6f124f965aeeec4ed97f7176a7bb2c862f550d098d488ff258db2867893894"
dependencies = [
"anyhow",
"indexmap 2.14.0",
- "wasm-encoder 0.248.0",
- "wasmparser 0.248.0",
+ "wasm-encoder 0.249.0",
+ "wasmparser 0.249.0",
]
[[package]]
name = "wasm-mutate"
-version = "0.248.0"
+version = "0.249.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6210f23d92145ecdbc04e27d4b570714148e45c61db913f1f69a38fe80fb61d7"
+checksum = "bf42997760f4823609a837dd3433b3abe174ec265fe7ed4b1a4a704e32c033fb"
dependencies = [
"egg",
"log",
"rand 0.10.1",
"thiserror 2.0.17",
- "wasm-encoder 0.248.0",
- "wasmparser 0.248.0",
+ "wasm-encoder 0.249.0",
+ "wasmparser 0.249.0",
]
[[package]]
name = "wasm-smith"
-version = "0.248.0"
+version = "0.249.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "050b559c1cec6dd6b9a558ae984d91d61e5e7b4c3e47081305a13efe6869eea0"
+checksum = "bbd31d0a3861a8eb5c19024a1ee39a7c805151c44074a19a416599ff25b0540a"
dependencies = [
"anyhow",
"arbitrary",
"flagset",
"serde",
"serde_derive",
- "wasm-encoder 0.248.0",
+ "wasm-encoder 0.249.0",
"wat",
]
@@ -4603,13 +4603,13 @@ dependencies = [
[[package]]
name = "wasm-wave"
-version = "0.248.0"
+version = "0.249.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db8c928a58132ecc6a4daee3795bb3560702436f6516b5f8c5b3086113031e76"
+checksum = "90b6425ded10a93d45df352b941eebf8891ba30ddee9233e21cbe23de4fefbbe"
dependencies = [
"logos",
"thiserror 2.0.17",
- "wit-parser 0.248.0",
+ "wit-parser 0.249.0",
]
[[package]]
@@ -4688,9 +4688,9 @@ dependencies = [
[[package]]
name = "wasmparser"
-version = "0.248.0"
+version = "0.249.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aa4439c5eee9df71ee0c6efb37f63b1fcb1fec38f85f5142c54e7ed05d33091a"
+checksum = "30538cae9a794215f490b532df01c557e2e2bfac92569482554acd0992a102ea"
dependencies = [
"bitflags 2.11.1",
"hashbrown 0.17.0",
@@ -4701,13 +4701,13 @@ dependencies = [
[[package]]
name = "wasmprinter"
-version = "0.248.0"
+version = "0.249.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "30b264a5410b008d4d199a92bf536eae703cbd614482fc1ec53831cf19e1c183"
+checksum = "a4e227e800fc74c0d60117391f71d60e4c956333cfc3be796ae72d269002aa52"
dependencies = [
"anyhow",
"termcolor",
- "wasmparser 0.248.0",
+ "wasmparser 0.249.0",
]
[[package]]
@@ -4750,9 +4750,9 @@ dependencies = [
"tempfile",
"tokio",
"wasm-compose",
- "wasm-encoder 0.248.0",
+ "wasm-encoder 0.249.0",
"wasm-wave",
- "wasmparser 0.248.0",
+ "wasmparser 0.249.0",
"wasmtime-environ",
"wasmtime-internal-cache",
"wasmtime-internal-component-macro",
@@ -4863,8 +4863,8 @@ dependencies = [
"tracing",
"walkdir",
"wasi-common",
- "wasm-encoder 0.248.0",
- "wasmparser 0.248.0",
+ "wasm-encoder 0.249.0",
+ "wasmparser 0.249.0",
"wasmprinter",
"wasmtime",
"wasmtime-cli-flags",
@@ -4887,10 +4887,10 @@ dependencies = [
"wasmtime-wasi-tls",
"wasmtime-wast",
"wasmtime-wizer",
- "wast 248.0.0",
+ "wast 249.0.0",
"wat",
"windows-sys 0.61.2",
- "wit-component 0.248.0",
+ "wit-component 0.249.0",
]
[[package]]
@@ -4933,8 +4933,8 @@ dependencies = [
"sha2",
"smallvec 1.15.1",
"target-lexicon",
- "wasm-encoder 0.248.0",
- "wasmparser 0.248.0",
+ "wasm-encoder 0.249.0",
+ "wasmparser 0.249.0",
"wasmprinter",
"wasmtime-internal-component-util",
"wasmtime-internal-core",
@@ -4948,7 +4948,7 @@ dependencies = [
"arbitrary",
"env_logger 0.11.5",
"libfuzzer-sys",
- "wasmparser 0.248.0",
+ "wasmparser 0.249.0",
"wasmprinter",
"wasmtime-environ",
"wasmtime-test-util",
@@ -4980,7 +4980,7 @@ dependencies = [
"rand 0.10.1",
"smallvec 1.15.1",
"target-lexicon",
- "wasmparser 0.248.0",
+ "wasmparser 0.249.0",
"wasmtime",
"wasmtime-fuzzing",
"wasmtime-test-util",
@@ -5007,12 +5007,12 @@ dependencies = [
"tempfile",
"tokio",
"v8",
- "wasm-encoder 0.248.0",
+ "wasm-encoder 0.249.0",
"wasm-mutate",
"wasm-smith",
"wasm-spec-interpreter",
"wasmi",
- "wasmparser 0.248.0",
+ "wasmparser 0.249.0",
"wasmprinter",
"wasmtime",
"wasmtime-cli-flags",
@@ -5069,7 +5069,7 @@ dependencies = [
"wasmtime",
"wasmtime-internal-component-util",
"wasmtime-internal-wit-bindgen",
- "wit-parser 0.248.0",
+ "wit-parser 0.249.0",
]
[[package]]
@@ -5104,7 +5104,7 @@ dependencies = [
"smallvec 1.15.1",
"target-lexicon",
"thiserror 2.0.17",
- "wasmparser 0.248.0",
+ "wasmparser 0.249.0",
"wasmtime-environ",
"wasmtime-internal-core",
"wasmtime-internal-unwinder",
@@ -5221,7 +5221,7 @@ dependencies = [
"log",
"object 0.39.0",
"target-lexicon",
- "wasmparser 0.248.0",
+ "wasmparser 0.249.0",
"wasmtime-environ",
"wasmtime-internal-cranelift",
"winch-codegen",
@@ -5235,7 +5235,7 @@ dependencies = [
"bitflags 2.11.1",
"heck 0.5.0",
"indexmap 2.14.0",
- "wit-parser 0.248.0",
+ "wit-parser 0.249.0",
]
[[package]]
@@ -5268,7 +5268,7 @@ dependencies = [
"serde_derive",
"target-lexicon",
"toml",
- "wasmparser 0.248.0",
+ "wasmparser 0.249.0",
"wasmprinter",
"wasmtime",
"wasmtime-environ",
@@ -5434,9 +5434,9 @@ dependencies = [
"object 0.39.0",
"serde_json",
"tokio",
- "wasmparser 0.248.0",
+ "wasmparser 0.249.0",
"wasmtime",
- "wast 248.0.0",
+ "wast 249.0.0",
]
[[package]]
@@ -5450,8 +5450,8 @@ dependencies = [
"rayon",
"test-programs-artifacts",
"tokio",
- "wasm-encoder 0.248.0",
- "wasmparser 0.248.0",
+ "wasm-encoder 0.249.0",
+ "wasmparser 0.249.0",
"wasmprinter",
"wasmtime",
"wasmtime-wasi",
@@ -5469,25 +5469,25 @@ dependencies = [
[[package]]
name = "wast"
-version = "248.0.0"
+version = "249.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "acc54622ed5a5cddafcdf152043f9d4aed54d4a653d686b7dfe874809fca99d7"
+checksum = "2474a321bf9ae2808e9fa23ac4ec2b27300e70985e30bcb5a38d43b76bfc901a"
dependencies = [
"bumpalo",
"gimli 0.32.3",
"leb128fmt",
"memchr",
"unicode-width 0.2.0",
- "wasm-encoder 0.248.0",
+ "wasm-encoder 0.249.0",
]
[[package]]
name = "wat"
-version = "1.248.0"
+version = "1.249.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d75cd9e510603909748e6ebab89f27cd04472c1d9d85a3c88a7a6fc51a1a7934"
+checksum = "28af699d0a9c7e4e250b7b8e36167ae5215fbb4b7ae526bb4ce7b234ba0afc90"
dependencies = [
- "wast 248.0.0",
+ "wast 249.0.0",
]
[[package]]
@@ -5614,7 +5614,7 @@ dependencies = [
"smallvec 1.15.1",
"target-lexicon",
"thiserror 2.0.17",
- "wasmparser 0.248.0",
+ "wasmparser 0.249.0",
"wasmtime-environ",
"wasmtime-internal-core",
"wasmtime-internal-cranelift",
@@ -6010,9 +6010,9 @@ dependencies = [
[[package]]
name = "wit-component"
-version = "0.248.0"
+version = "0.249.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0012379f0ff47e1d44dd312e76cfa42de2589251f093fb105e9de9db90c89221"
+checksum = "d66a8d940b203e145ddd71f7790118f4ae17f240c670a3b80fe3c2373d7c0e57"
dependencies = [
"anyhow",
"bitflags 2.11.1",
@@ -6021,10 +6021,10 @@ dependencies = [
"serde",
"serde_derive",
"serde_json",
- "wasm-encoder 0.248.0",
- "wasm-metadata 0.248.0",
- "wasmparser 0.248.0",
- "wit-parser 0.248.0",
+ "wasm-encoder 0.249.0",
+ "wasm-metadata 0.249.0",
+ "wasmparser 0.249.0",
+ "wit-parser 0.249.0",
]
[[package]]
@@ -6066,9 +6066,9 @@ dependencies = [
[[package]]
name = "wit-parser"
-version = "0.248.0"
+version = "0.249.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "247ad505da2915a082fe13204c5ba8788425aea1de54f43b284818cf82637856"
+checksum = "50840f2e2cf170d910858089d7dfb3e97c6f9a0d6ec7bff7f7cc28f5aeacc15f"
dependencies = [
"anyhow",
"hashbrown 0.17.0",
@@ -6080,7 +6080,7 @@ dependencies = [
"serde_derive",
"serde_json",
"unicode-xid",
- "wasmparser 0.248.0",
+ "wasmparser 0.249.0",
]
[[package]]
diff --git a/Cargo.toml b/Cargo.toml
index 8ce8ea18b5..ec7b5f7a22 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -351,18 +351,18 @@ wit-bindgen = { version = "0.57.0", default-features = false }
wit-bindgen-rust-macro = { version = "0.57.0", default-features = false }
# wasm-tools family:
-wasmparser = { version = "0.248.0", default-features = false, features = ['simd'] }
-wat = "1.248.0"
-wast = "248.0.0"
-wasmprinter = "0.248.0"
-wasm-encoder = "0.248.0"
-wasm-smith = "0.248.0"
-wasm-mutate = "0.248.0"
-wit-parser = "0.248.0"
-wit-component = "0.248.0"
-wasm-wave = "0.248.0"
-wasm-compose = { version = "0.248.0", default-features = false }
-json-from-wast = "0.248.0"
+wasmparser = { version = "0.249.0", default-features = false, features = ['simd'] }
+wat = "1.249.0"
+wast = "249.0.0"
+wasmprinter = "0.249.0"
+wasm-encoder = "0.249.0"
+wasm-smith = "0.249.0"
+wasm-mutate = "0.249.0"
+wit-parser = "0.249.0"
+wit-component = "0.249.0"
+wasm-wave = "0.249.0"
+wasm-compose = { version = "0.249.0", default-features = false }
+json-from-wast = "0.249.0"
wstd = "0.6.5"
wasip2 = "1.0"
diff --git a/crates/environ/src/component/translate.rs b/crates/environ/src/component/translate.rs
index c3772dd0b2..0bf7dd5d0b 100644
--- a/crates/environ/src/component/translate.rs
+++ b/crates/environ/src/component/translate.rs
@@ -18,7 +18,7 @@ use wasmparser::component_types::{
ComponentFuncTypeId, ComponentInstanceTypeId, ComponentValType,
};
use wasmparser::types::Types;
-use wasmparser::{Chunk, ComponentImportName, Encoding, Parser, Payload, Validator};
+use wasmparser::{Chunk, ComponentExternName, Encoding, Parser, Payload, Validator};
mod adapt;
pub use self::adapt::*;
@@ -176,7 +176,7 @@ struct Translation<'data> {
// is straight from `wasmparser`'s passes.
enum LocalInitializer<'data> {
// imports
- Import(ComponentImportName<'data>, ComponentEntityType),
+ Import(ComponentExternName<'data>, ComponentEntityType),
// An import of an intrinsic for compile-time builtins.
IntrinsicsImport,
@@ -768,11 +768,12 @@ impl<'a, 'data> Translator<'a, 'data> {
let import = import?;
let types = self.validator.types(0).unwrap();
let ty = types
- .component_entity_type_of_import(import.name.0)
- .unwrap();
+ .component_item_for_import(import.name.name)
+ .unwrap()
+ .ty;
- if self.is_unsafe_intrinsics_import(import.name.0) {
- self.check_unsafe_intrinsics_import(import.name.0, ty)?;
+ if self.is_unsafe_intrinsics_import(import.name.name) {
+ self.check_unsafe_intrinsics_import(import.name.name, ty)?;
self.result
.initializers
.push(LocalInitializer::IntrinsicsImport);
@@ -1309,7 +1310,7 @@ impl<'a, 'data> Translator<'a, 'data> {
for export in s {
let export = export?;
let item = self.kind_to_item(export.kind, export.index)?;
- let prev = self.result.exports.insert(export.name.0, item);
+ let prev = self.result.exports.insert(export.name.name, item);
assert!(prev.is_none());
self.result
.initializers
@@ -1451,7 +1452,7 @@ impl<'a, 'data> Translator<'a, 'data> {
let mut map = HashMap::with_capacity(exports.len());
for export in exports {
let idx = self.kind_to_item(export.kind, export.index)?;
- map.insert(export.name.0, idx);
+ map.insert(export.name.name, idx);
}
Ok(LocalInitializer::ComponentSynthetic(map, ty))
@@ -1662,13 +1663,13 @@ impl<'a, 'data> Translator<'a, 'data> {
);
for (name, ty) in &instance_ty.exports {
- let ComponentEntityType::Func(func_ty) = ty else {
+ let ComponentEntityType::Func(func_ty) = ty.ty else {
bail!(
"bad unsafe intrinsics import: imported instance `{import}` must \
only export functions"
)
};
- let func_ty = &types[*func_ty];
+ let func_ty = &types[func_ty];
fn ty_eq(a: &InterfaceType, b: &wasmparser::component_types::ComponentValType) -> bool {
use wasmparser::{PrimitiveValType as P, component_types::ComponentValType as C};
diff --git a/crates/environ/src/component/translate/inline.rs b/crates/environ/src/component/translate/inline.rs
index 8d01cc5503..ca174a6ee0 100644
--- a/crates/environ/src/component/translate/inline.rs
+++ b/crates/environ/src/component/translate/inline.rs
@@ -114,9 +114,12 @@ pub(super) fn run(
if let TypeDef::Interface(_) = ty {
continue;
}
- let index = inliner.result.import_types.push((name.0.to_string(), ty));
+ let index = inliner
+ .result
+ .import_types
+ .push((name.name.to_string(), ty));
let path = ImportPath::root(index);
- args.insert(name.0, ComponentItemDef::from_import(path, ty)?);
+ args.insert(name.name, ComponentItemDef::from_import(path, ty)?);
}
// This will run the inliner to completion after being seeded with the
@@ -441,7 +444,7 @@ impl<'a> Inliner<'a> {
// was provided as an import at the instantiation-site to what was
// needed during the component's instantiation.
Import(name, ty) => {
- let arg = match frame.args.get(name.0) {
+ let arg = match frame.args.get(name.name) {
Some(arg) => arg,
// Not all arguments need to be provided for instantiation,
diff --git a/crates/environ/src/component/types_builder.rs b/crates/environ/src/component/types_builder.rs
index 94ad80c324..a91c73e240 100644
--- a/crates/environ/src/component/types_builder.rs
+++ b/crates/environ/src/component/types_builder.rs
@@ -325,17 +325,17 @@ impl ComponentTypesBuilder {
let ty = &types[id];
let mut result = TypeComponent::default();
for (name, ty) in ty.imports.iter() {
- self.register_abstract_component_entity_type(types, *ty);
+ self.register_abstract_component_entity_type(types, ty.ty);
result.imports.insert(
name.clone(),
- self.convert_component_entity_type(types, *ty)?,
+ self.convert_component_entity_type(types, ty.ty)?,
);
}
for (name, ty) in ty.exports.iter() {
- self.register_abstract_component_entity_type(types, *ty);
+ self.register_abstract_component_entity_type(types, ty.ty);
result.exports.insert(
name.clone(),
- self.convert_component_entity_type(types, *ty)?,
+ self.convert_component_entity_type(types, ty.ty)?,
);
}
Ok(self.component_types.components.push(result))
@@ -350,10 +350,10 @@ impl ComponentTypesBuilder {
let ty = &types[id];
let mut result = TypeComponentInstance::default();
for (name, ty) in ty.exports.iter() {
- self.register_abstract_component_entity_type(types, *ty);
+ self.register_abstract_component_entity_type(types, ty.ty);
result.exports.insert(
name.clone(),
- self.convert_component_entity_type(types, *ty)?,
+ self.convert_component_entity_type(types, ty.ty)?,
);
}
Ok(self.component_types.component_instances.push(result))
diff --git a/crates/environ/src/component/types_builder/resources.rs b/crates/environ/src/component/types_builder/resources.rs
index c423104bf4..7cec292d9c 100644
--- a/crates/environ/src/component/types_builder/resources.rs
+++ b/crates/environ/src/component/types_builder/resources.rs
@@ -247,7 +247,7 @@ impl ResourcesBuilder {
let ty = &types[id];
for (name, ty) in ty.exports.iter() {
path.push(name);
- self.register_component_entity_type_(types, *ty, path, register);
+ self.register_component_entity_type_(types, ty.ty, path, register);
path.pop();
}
}
diff --git a/crates/test-util/src/component_fuzz.rs b/crates/test-util/src/component_fuzz.rs
index 98f625670e..9daf8d6b48 100644
--- a/crates/test-util/src/component_fuzz.rs
+++ b/crates/test-util/src/component_fuzz.rs
@@ -1708,6 +1708,28 @@ pub enum LowerAbi {
Async,
}
+impl LiftAbi {
+ fn is_async(self) -> bool {
+ !matches!(self, Self::Sync)
+ }
+
+ fn ensure_async(&mut self) {
+ if !self.is_async() {
+ *self = Self::AsyncStackful;
+ }
+ }
+}
+
+impl LowerAbi {
+ fn is_async(self) -> bool {
+ matches!(self, Self::Async)
+ }
+
+ fn ensure_async(&mut self) {
+ *self = Self::Async;
+ }
+}
+
impl<'a> TestCase<'a> {
pub fn generate(types: &'a [Type], u: &mut Unstructured<'_>) -> arbitrary::Result<Self> {
let max_params = if types.len() > 0 { 5 } else { 0 };
@@ -1722,15 +1744,25 @@ impl<'a> TestCase<'a> {
let mut options = u.arbitrary::<TestCaseOptions>()?;
- // Sync tasks cannot call async functions via a sync lower, nor can they
- // block in other ways (e.g. by calling `waitable-set.wait`, returning
- // `CALLBACK_CODE_WAIT`, etc.) prior to returning. Therefore,
- // async-ness cascades to the callers:
- if options.host_async {
+ // Keep each boundary self-consistent: async function types require async
+ // lowering/lifting, and async callees force their callers async too.
+ if options.host_async || options.callee_lower_abi.is_async() {
+ options.host_async = true;
+ options.callee_lower_abi.ensure_async();
options.guest_callee_async = true;
}
- if options.guest_callee_async {
+ if options.guest_callee_async
+ || options.callee_lift_abi.is_async()
+ || options.caller_lower_abi.is_async()
+ {
+ options.guest_callee_async = true;
+ options.callee_lift_abi.ensure_async();
+ options.caller_lower_abi.ensure_async();
+ options.guest_caller_async = true;
+ }
+ if options.guest_caller_async || options.caller_lift_abi.is_async() {
options.guest_caller_async = true;
+ options.caller_lift_abi.ensure_async();
}
Ok(Self {
diff --git a/crates/test-util/src/wast.rs b/crates/test-util/src/wast.rs
index 72c35e4648..be8a7ce244 100644
--- a/crates/test-util/src/wast.rs
+++ b/crates/test-util/src/wast.rs
@@ -469,9 +469,14 @@ impl WastTest {
let unsupported = [
// These tests in the `component-model` submodule have not yet been
// updated to account for the recent threading-related intrinsic
- // changes
- "test/async/same-component-stream-future.wast",
+ // changes.
"test/async/trap-if-block-and-sync.wast",
+ // Wasmtime doesn't expose the component-model `cm64` feature toggle
+ // yet, so this parser-only test can't be enabled here.
+ "test/wasm-tools/memory64.wast",
+ // Cancellable `thread.yield` semantics still diverge from the
+ // latest submodule expectation.
+ "test/async/cancellable.wast",
];
if unsupported.iter().any(|part| self.path.ends_with(part)) {
return true;
diff --git a/crates/wasmtime/src/compile/code_builder/compile_time_builtins.rs b/crates/wasmtime/src/compile/code_builder/compile_time_builtins.rs
index dd572d8932..aaf111ccb1 100644
--- a/crates/wasmtime/src/compile/code_builder/compile_time_builtins.rs
+++ b/crates/wasmtime/src/compile/code_builder/compile_time_builtins.rs
@@ -89,13 +89,13 @@ impl<'a> CodeBuilder<'a> {
// unfortunately the `wasm-compose` API is not powerful
// enough for us to do all that.
ensure!(
- imp.name.0 != intrinsics_import,
+ imp.name.name != intrinsics_import,
"main Wasm cannot import the unsafe intrinsics (`{intrinsics_import}`) \
when using compile-time builtins"
);
if let wasmparser::ComponentTypeRef::Instance(_) = imp.ty {
- instance_imports.insert(imp.name.0);
+ instance_imports.insert(imp.name.name);
}
}
}
diff --git a/crates/wast/src/spectest.rs b/crates/wast/src/spectest.rs
index f535723951..b99421d7e0 100644
--- a/crates/wast/src/spectest.rs
+++ b/crates/wast/src/spectest.rs
@@ -96,7 +96,9 @@ pub fn link_component_spectest<T>(linker: &mut component::Linker<T>) -> Result<(
let engine = linker.engine().clone();
linker
.root()
- .func_wrap("host-echo-u32", |_, v: (u32,)| Ok(v))?;
+ .func_wrap_concurrent("host-echo-u32", |_, (v,): (u32,)| {
+ Box::pin(async move { Ok((v,)) })
+ })?;
linker
.root()
.func_wrap("host-return-two", |_, _: ()| Ok((2u32,)))?;
diff --git a/crates/wizer/src/component/rewrite.rs b/crates/wizer/src/component/rewrite.rs
index 4f7c5fc631..7a2de6658f 100644
--- a/crates/wizer/src/component/rewrite.rs
+++ b/crates/wizer/src/component/rewrite.rs
@@ -236,7 +236,7 @@ impl ReencodeComponent for Reencoder<'_> {
) -> Result<(), Error> {
for export in section {
let export = export?;
- if !self.wizer.get_keep_init_func() && export.name.0 == self.wizer.get_init_func() {
+ if !self.wizer.get_keep_init_func() && export.name.name == self.wizer.get_init_func() {
self.removed_func = Some(self.funcs);
} else {
if export.kind == wasmparser::ComponentExternalKind::Func {
diff --git a/crates/wizer/tests/all/component.rs b/crates/wizer/tests/all/component.rs
index 98df09db4b..6b204d8d45 100644
--- a/crates/wizer/tests/all/component.rs
+++ b/crates/wizer/tests/all/component.rs
@@ -637,7 +637,7 @@ async fn export_is_removed() -> Result<()> {
wasmparser::Payload::ComponentExportSection(s) => Some(s),
_ => None,
})
- .flat_map(|section| section.into_iter().map(|e| e.unwrap().name.0))
+ .flat_map(|section| section.into_iter().map(|e| e.unwrap().name.name))
.collect()
}
}
diff --git a/supply-chain/imports.lock b/supply-chain/imports.lock
index d01726ff91..188835397f 100644
--- a/supply-chain/imports.lock
+++ b/supply-chain/imports.lock
@@ -1001,8 +1001,8 @@ user-login = "alexcrichton"
user-name = "Alex Crichton"
[[publisher.json-from-wast]]
-version = "0.248.0"
-when = "2026-04-28"
+version = "0.249.0"
+when = "2026-05-15"
trusted-publisher = "github:bytecodealliance/wasm-tools"
[[publisher.libc]]
@@ -1500,8 +1500,8 @@ user-login = "alexcrichton"
user-name = "Alex Crichton"
[[publisher.wasm-compose]]
-version = "0.248.0"
-when = "2026-04-28"
+version = "0.249.0"
+when = "2026-05-15"
trusted-publisher = "github:bytecodealliance/wasm-tools"
[[publisher.wasm-encoder]]
@@ -1515,8 +1515,8 @@ when = "2026-04-17"
trusted-publisher = "github:bytecodealliance/wasm-tools"
[[publisher.wasm-encoder]]
-version = "0.248.0"
-when = "2026-04-28"
+version = "0.249.0"
+when = "2026-05-15"
trusted-publisher = "github:bytecodealliance/wasm-tools"
[[publisher.wasm-metadata]]
@@ -1531,13 +1531,13 @@ when = "2026-04-17"
trusted-publisher = "github:bytecodealliance/wasm-tools"
[[publisher.wasm-metadata]]
-version = "0.248.0"
-when = "2026-04-28"
+version = "0.249.0"
+when = "2026-05-15"
trusted-publisher = "github:bytecodealliance/wasm-tools"
[[publisher.wasm-wave]]
-version = "0.248.0"
-when = "2026-04-28"
+version = "0.249.0"
+when = "2026-05-15"
trusted-publisher = "github:bytecodealliance/wasm-tools"
[[publisher.wasmparser]]
@@ -1551,13 +1551,13 @@ when = "2026-04-17"
trusted-publisher = "github:bytecodealliance/wasm-tools"
[[publisher.wasmparser]]
-version = "0.248.0"
-when = "2026-04-28"
+version = "0.249.0"
+when = "2026-05-15"
trusted-publisher = "github:bytecodealliance/wasm-tools"
[[publisher.wasmprinter]]
-version = "0.248.0"
-when = "2026-04-28"
+version = "0.249.0"
+when = "2026-05-15"
trusted-publisher = "github:bytecodealliance/wasm-tools"
[[publisher.wasmtime]]
@@ -1716,13 +1716,13 @@ when = "2026-04-30"
trusted-publisher = "github:bytecodealliance/wasmtime"
[[publisher.wast]]
-version = "248.0.0"
-when = "2026-04-28"
+version = "249.0.0"
+when = "2026-05-15"
trusted-publisher = "github:bytecodealliance/wasm-tools"
[[publisher.wat]]
-version = "1.248.0"
-when = "2026-04-28"
+version = "1.249.0"
+when = "2026-05-15"
trusted-publisher = "github:bytecodealliance/wasm-tools"
[[publisher.wiggle]]
@@ -2011,8 +2011,8 @@ when = "2026-04-17"
trusted-publisher = "github:bytecodealliance/wasm-tools"
[[publisher.wit-component]]
-version = "0.248.0"
-when = "2026-04-28"
+version = "0.249.0"
+when = "2026-05-15"
trusted-publisher = "github:bytecodealliance/wasm-tools"
[[publisher.wit-parser]]
@@ -2026,8 +2026,8 @@ when = "2026-04-17"
trusted-publisher = "github:bytecodealliance/wasm-tools"
[[publisher.wit-parser]]
-version = "0.248.0"
-when = "2026-04-28"
+version = "0.249.0"
+when = "2026-05-15"
trusted-publisher = "github:bytecodealliance/wasm-tools"
[[publisher.witx]]
diff --git a/tests/all/component_model/bindgen.rs b/tests/all/component_model/bindgen.rs
index 22adebfb79..5df31dc32d 100644
--- a/tests/all/component_model/bindgen.rs
+++ b/tests/all/component_model/bindgen.rs
@@ -108,7 +108,7 @@ mod no_imports_concurrent {
(with "" (instance (export "task.return" (func $task-return))))
))
- (func $f (export "bar")
+ (func $f (export "bar") async
(canon lift (core func $i "bar") async (callback (func $i "callback")))
)
diff --git a/tests/all/component_model/func.rs b/tests/all/component_model/func.rs
index 59c6c11195..819aa99f6f 100644
--- a/tests/all/component_model/func.rs
+++ b/tests/all/component_model/func.rs
@@ -908,7 +908,7 @@ async fn test_many_parameters(dynamic: bool, concurrent: bool) -> Result<()> {
(with "libc" (instance $libc))
))
- (type $t (func
+ (type $t (func async
(param "p1" s8) ;; offset 0, size 1
(param "p2" u64) ;; offset 8, size 8
(param "p3" float32) ;; offset 16, size 4
@@ -1379,7 +1379,7 @@ async fn test_many_results(dynamic: bool, concurrent: bool) -> Result<()> {
(with "libc" (instance $libc))
))
- (type $t (func (result $tuple)))
+ (type $t (func async (result $tuple)))
(func (export "many-results") (type $t)
(canon lift
(core func $i "foo")
diff --git a/tests/component-model b/tests/component-model
index dac78059d4..dd1f6fa66e 160000
--- a/tests/component-model
+++ b/tests/component-model
@@ -1 +1 @@
-Subproject commit dac78059d47dadf3221a71548463fadb294412e3
+Subproject commit dd1f6fa66e5e26dd7a1f6449133f825edbd8f614
diff --git a/tests/misc_testsuite/component-model/async/backpressure-deadlock.wast b/tests/misc_testsuite/component-model/async/backpressure-deadlock.wast
index 06e6df3df4..8277b40024 100644
--- a/tests/misc_testsuite/component-model/async/backpressure-deadlock.wast
+++ b/tests/misc_testsuite/component-model/async/backpressure-deadlock.wast
@@ -33,14 +33,14 @@
))
(func (export "turn-on-backpressure") (canon lift (core func $i "turn-on-backpressure")))
- (func (export "f")
+ (func (export "f") async
(canon lift (core func $i "f") async (callback (func $i "callback"))))
)
(instance $A (instantiate $A))
(component $B
(import "A" (instance $A
- (export "f" (func))
+ (export "f" (func async))
(export "turn-on-backpressure" (func))
))
diff --git a/tests/misc_testsuite/component-model/async/callback-yield-then-exit.wast b/tests/misc_testsuite/component-model/async/callback-yield-then-exit.wast
index 6e83efd251..8d2df57239 100644
--- a/tests/misc_testsuite/component-model/async/callback-yield-then-exit.wast
+++ b/tests/misc_testsuite/component-model/async/callback-yield-then-exit.wast
@@ -21,13 +21,13 @@
(with "" (instance (export "task.return" (func $task.return))))
))
- (func (export "foo") (param "p1" u32) (result u32)
+ (func (export "foo") async (param "p1" u32) (result u32)
(canon lift (core func $i "foo") async (callback (func $i "callback")))
)
)
(component $B
- (import "a" (func $foo (param "p1" u32) (result u32)))
+ (import "a" (func $foo async (param "p1" u32) (result u32)))
(core func $foo (canon lower (func $foo)))
(core module $m
(import "" "foo" (func $foo (param i32) (result i32)))
@@ -47,5 +47,5 @@
(func (export "run") (alias export $B "run"))
)
-(assert_return (invoke "run"))
-(assert_return (invoke "run"))
+(assert_trap (invoke "run") "wasm trap: cannot block a synchronous task before returning")
+(assert_trap (invoke "run") "wasm trap: cannot enter component instance")
diff --git a/tests/misc_testsuite/component-model/async/drop-deadlock.wast b/tests/misc_testsuite/component-model/async/drop-deadlock.wast
index 2d7b77dde6..98ad9eef3b 100644
--- a/tests/misc_testsuite/component-model/async/drop-deadlock.wast
+++ b/tests/misc_testsuite/component-model/async/drop-deadlock.wast
@@ -17,7 +17,7 @@
(func (export "set-backpressure")
(canon lift (core func $i "set-backpressure")))
- (func (export "target")
+ (func (export "target") async
(canon lift (core func $i "target") async (callback (func $i "callback"))))
)
diff --git a/tests/misc_testsuite/component-model/async/fused.wast b/tests/misc_testsuite/component-model/async/fused.wast
index c0a3f3ff86..ecc488cdc2 100644
--- a/tests/misc_testsuite/component-model/async/fused.wast
+++ b/tests/misc_testsuite/component-model/async/fused.wast
@@ -20,13 +20,13 @@
(with "" (instance (export "task.return" (func $task-return))))
))
- (func (export "foo") (param "p1" u32) (result u32)
+ (func (export "foo") async (param "p1" u32) (result u32)
(canon lift (core func $i "foo") async (callback (func $i "callback")))
)
)
(component $lowerer
- (import "a" (func $foo (param "p1" u32) (result u32)))
+ (import "a" (func $foo async (param "p1" u32) (result u32)))
(core module $libc (memory (export "memory") 1))
(core instance $libc (instantiate $libc))
(core func $foo (canon lower (func $foo) async (memory $libc "memory")))
@@ -65,13 +65,13 @@
)
)
(core instance $i (instantiate $m))
- (func (export "foo") (param "p1" u32) (result u32)
+ (func (export "foo") async (param "p1" u32) (result u32)
(canon lift (core func $i "foo"))
)
)
(component $lowerer
- (import "a" (func $foo (param "p1" u32) (result u32)))
+ (import "a" (func $foo async (param "p1" u32) (result u32)))
(core module $libc (memory (export "memory") 1))
(core instance $libc (instantiate $libc))
(core func $foo (canon lower (func $foo) async (memory $libc "memory")))
@@ -117,13 +117,13 @@
(with "" (instance (export "task.return" (func $task-return))))
))
- (func (export "foo") (param "p1" u32) (result u32)
+ (func (export "foo") async (param "p1" u32) (result u32)
(canon lift (core func $i "foo") async (callback (func $i "callback")))
)
)
(component $lowerer
- (import "a" (func $foo (param "p1" u32) (result u32)))
+ (import "a" (func $foo async (param "p1" u32) (result u32)))
(core func $foo (canon lower (func $foo)))
(core module $m
(import "" "foo" (func $foo (param i32) (result i32)))
@@ -146,4 +146,4 @@
(func (export "run") (alias export $lowerer "run"))
)
-(assert_return (invoke "run"))
+(assert_trap (invoke "run") "wasm trap: cannot block a synchronous task before returning")
diff --git a/tests/misc_testsuite/component-model/async/future-read.wast b/tests/misc_testsuite/component-model/async/future-read.wast
index d936369185..1bcdfffd45 100644
--- a/tests/misc_testsuite/component-model/async/future-read.wast
+++ b/tests/misc_testsuite/component-model/async/future-read.wast
@@ -26,7 +26,7 @@
(export "read" (func $read))
))
))
- (func (export "run") async (param "x" $future)
+ (func (export "run") (param "x" $future)
(canon lift (core func $i "run")))
)
(instance $child (instantiate $child))
@@ -34,7 +34,7 @@
(component $other-child
(type $future (future))
(import "child" (instance $child
- (export "run" (func async (param "x" $future)))
+ (export "run" (func (param "x" $future)))
))
(core func $new (canon future.new $future))
@@ -62,8 +62,8 @@
(func (export "run") (alias export $other-child "run"))
)
-;; We expect deadlock since the write end is leaked:
-(assert_trap (invoke "run") "deadlock detected: event loop cannot make further progress")
+;; Sync lower of this async path now traps before the leaked write end can deadlock.
+(assert_trap (invoke "run") "wasm trap: cannot block a synchronous task before returning")
;; asynchronous future.read; sync lift
(component
@@ -87,7 +87,7 @@
(export "read" (func $read))
))
))
- (func (export "run") (param "x" $future)
+ (func (export "run") async (param "x" $future)
(canon lift (core func $i "run")))
)
(instance $child (instantiate $child))
@@ -95,7 +95,7 @@
(component $other-child
(type $future (future))
(import "child" (instance $child
- (export "run" (func (param "x" $future)))
+ (export "run" (func async (param "x" $future)))
))
(core func $new (canon future.new $future))
(core func $child-run (canon lower (func $child "run")))
@@ -123,7 +123,7 @@
(func (export "run") (alias export $other-child "run"))
)
-(assert_return (invoke "run"))
+(assert_trap (invoke "run") "wasm trap: cannot block a synchronous task before returning")
;; synchronous future.read; async lift
(component
@@ -220,7 +220,7 @@
(export "return" (func $return))
))
))
- (func (export "run") (param "x" $future)
+ (func (export "run") async (param "x" $future)
(canon lift (core func $i "run") async (callback (func $i "cb"))))
)
(instance $child (instantiate $child))
@@ -228,7 +228,7 @@
(component $other-child
(type $future (future))
(import "child" (instance $child
- (export "run" (func (param "x" $future)))
+ (export "run" (func async (param "x" $future)))
))
(core func $new (canon future.new $future))
(core func $child-run (canon lower (func $child "run")))
@@ -257,4 +257,3 @@
)
(assert_return (invoke "run"))
-
diff --git a/tests/misc_testsuite/component-model/async/lift.wast b/tests/misc_testsuite/component-model/async/lift.wast
index b91ab0d279..1ee381e243 100644
--- a/tests/misc_testsuite/component-model/async/lift.wast
+++ b/tests/misc_testsuite/component-model/async/lift.wast
@@ -9,7 +9,7 @@
)
(core instance $i (instantiate $m))
- (func (export "foo") (param "p1" u32) (result u32)
+ (func (export "foo") async (param "p1" u32) (result u32)
(canon lift (core func $i "foo") async (callback (func $i "callback")))
)
)
diff --git a/tests/misc_testsuite/component-model/async/lower.wast b/tests/misc_testsuite/component-model/async/lower.wast
index bcb4862fc8..a58509b044 100644
--- a/tests/misc_testsuite/component-model/async/lower.wast
+++ b/tests/misc_testsuite/component-model/async/lower.wast
@@ -2,7 +2,7 @@
;; async lower
(component
- (import "host-echo-u32" (func $foo (param "p1" u32) (result u32)))
+ (import "host-echo-u32" (func $foo async (param "p1" u32) (result u32)))
(core module $libc (memory (export "memory") 1))
(core instance $libc (instantiate $libc))
(core func $foo (canon lower (func $foo) async (memory $libc "memory")))
diff --git a/tests/misc_testsuite/component-model/async/partial-stream-copies.wast b/tests/misc_testsuite/component-model/async/partial-stream-copies.wast
index 8632a8ea92..6172cc7bd0 100644
--- a/tests/misc_testsuite/component-model/async/partial-stream-copies.wast
+++ b/tests/misc_testsuite/component-model/async/partial-stream-copies.wast
@@ -129,14 +129,14 @@
(export "stream.drop-readable" (func $stream.drop-readable))
(export "stream.drop-writable" (func $stream.drop-writable))
))))
- (func (export "transform") (param "in" (stream u8)) (result (stream u8)) (canon lift
+ (func (export "transform") async (param "in" (stream u8)) (result (stream u8)) (canon lift
(core func $cm "transform")
async (memory $memory "mem") (callback (func $cm "transform_cb"))
))
)
(component $D
- (import "transform" (func $transform (param "in" (stream u8)) (result (stream u8))))
+ (import "transform" (func $transform async (param "in" (stream u8)) (result (stream u8))))
(core module $Memory (memory (export "mem") 1))
(core instance $memory (instantiate $Memory))
diff --git a/tests/misc_testsuite/component-model/async/reentrance.wast b/tests/misc_testsuite/component-model/async/reentrance.wast
index 65707f1329..197798e7cc 100644
--- a/tests/misc_testsuite/component-model/async/reentrance.wast
+++ b/tests/misc_testsuite/component-model/async/reentrance.wast
@@ -14,12 +14,12 @@
(core instance $shim (instantiate $shim
(with "" (instance (export "task.return" (func $task-return))))
))
- (func $shim-export (param "p1" u32) (result u32)
+ (func $shim-export async (param "p1" u32) (result u32)
(canon lift (core func $shim "export") async (callback (func $shim "callback")))
)
(component $inner
- (import "import" (func $import (param "p1" u32) (result u32)))
+ (import "import" (func $import async (param "p1" u32) (result u32)))
(core module $libc (memory (export "memory") 1))
(core instance $libc (instantiate $libc))
(core func $import (canon lower (func $import) async (memory $libc "memory")))
@@ -46,7 +46,7 @@
))
(with "libc" (instance $libc))
))
- (func (export "export") (param "p1" u32) (result u32)
+ (func (export "export") async (param "p1" u32) (result u32)
(canon lift (core func $i "export") async (callback (func $i "callback")))
)
)
@@ -84,7 +84,7 @@
))
(with "libc" (instance $libc))
))
- (func (export "export") (param "p1" u32) (result u32)
+ (func (export "export") async (param "p1" u32) (result u32)
(canon lift (core func $donut "export") async (callback (func $donut "callback")))
)
)
diff --git a/tests/misc_testsuite/component-model/async/stackful.wast b/tests/misc_testsuite/component-model/async/stackful.wast
index c1e9250cfa..63bebe2193 100644
--- a/tests/misc_testsuite/component-model/async/stackful.wast
+++ b/tests/misc_testsuite/component-model/async/stackful.wast
@@ -11,7 +11,7 @@
)
(core instance $i (instantiate $m))
- (func (export "foo") (param "p1" u32) (result u32)
+ (func (export "foo") async (param "p1" u32) (result u32)
(canon lift (core func $i "foo") async)
)
)
@@ -28,13 +28,13 @@
(with "" (instance (export "task.return" (func $task-return))))
))
- (func (export "foo") (param "p1" u32) (result u32)
+ (func (export "foo") async (param "p1" u32) (result u32)
(canon lift (core func $i "foo") async)
)
)
(component $lowerer
- (import "a" (func $foo (param "p1" u32) (result u32)))
+ (import "a" (func $foo async (param "p1" u32) (result u32)))
(core module $libc (memory (export "memory") 1))
(core instance $libc (instantiate $libc))
(core func $foo (canon lower (func $foo) async (memory $libc "memory")))
@@ -76,13 +76,13 @@
(with "" (instance (export "task.return" (func $task-return))))
))
- (func (export "foo") (param "p1" u32) (result u32)
+ (func (export "foo") async (param "p1" u32) (result u32)
(canon lift (core func $i "foo") async)
)
)
(component $lowerer
- (import "a" (func $foo (param "p1" u32) (result u32)))
+ (import "a" (func $foo async (param "p1" u32) (result u32)))
(core func $foo (canon lower (func $foo)))
(core module $m
(import "" "foo" (func $foo (param i32) (result i32)))
@@ -105,7 +105,7 @@
(func (export "run") (alias export $lowerer "run"))
)
-(assert_return (invoke "run"))
+(assert_trap (invoke "run") "wasm trap: cannot block a synchronous task before returning")
;; waitable-set.wait
(component
diff --git a/tests/misc_testsuite/component-model/async/streams-massive-send.wast b/tests/misc_testsuite/component-model/async/streams-massive-send.wast
index 9b6b603331..cef67174de 100644
--- a/tests/misc_testsuite/component-model/async/streams-massive-send.wast
+++ b/tests/misc_testsuite/component-model/async/streams-massive-send.wast
@@ -156,18 +156,18 @@
))
))
- (func (export "big-stream") (result $s)
+ (func (export "big-stream") async (result $s)
(canon lift (core func $m "big-stream") async
(callback (func $m "cb"))))
- (func (export "big-future") (result $f)
+ (func (export "big-future") async (result $f)
(canon lift (core func $m "big-future") async
(callback (func $m "cb"))))
)
(component $B
(import "a" (instance $a
- (export "big-future" (func (result $f)))
- (export "big-stream" (func (result $s)))
+ (export "big-future" (func async (result $f)))
+ (export "big-stream" (func async (result $s)))
))
(core module $libc
diff --git a/tests/misc_testsuite/component-model/async/task-builtins.wast b/tests/misc_testsuite/component-model/async/task-builtins.wast
index c4cf350fce..966ece64ba 100644
--- a/tests/misc_testsuite/component-model/async/task-builtins.wast
+++ b/tests/misc_testsuite/component-model/async/task-builtins.wast
@@ -296,14 +296,14 @@
)
)
(core func $async-to-sync
- (canon lower (func $a "run-sync")
+ (canon lower (func $a "run-async")
async
(memory $libc "memory")
(realloc (func $libc "realloc"))
)
)
(core func $sync-to-async
- (canon lower (func $a "run-async")
+ (canon lower (func $a "run-sync")
(memory $libc "memory")
(realloc (func $libc "realloc"))
)
diff --git a/tests/misc_testsuite/component-model/async/task-return-traps.wast b/tests/misc_testsuite/component-model/async/task-return-traps.wast
index 9d483b0558..1f8c5df9fd 100644
--- a/tests/misc_testsuite/component-model/async/task-return-traps.wast
+++ b/tests/misc_testsuite/component-model/async/task-return-traps.wast
@@ -14,7 +14,7 @@
(core instance $i (instantiate $m
(with "" (instance (export "task.return" (func $task-return))))
))
- (func (export "foo") (canon lift (core func $i "foo") async (callback (func $i "callback"))))
+ (func (export "foo") async (canon lift (core func $i "foo") async (callback (func $i "callback"))))
)
(assert_trap (invoke "foo") "async-lifted export failed to produce a result")
@@ -50,7 +50,7 @@
))
(with "libc" (instance $libc))
))
- (func (export "foo") (canon lift (core func $i "foo") async (callback (func $i "callback"))))
+ (func (export "foo") async (canon lift (core func $i "foo") async (callback (func $i "callback"))))
)
(assert_trap (invoke "foo") "async-lifted export failed to produce a result")
@@ -85,7 +85,7 @@
))
(with "libc" (instance $libc))
))
- (func (export "foo") (canon lift (core func $i "foo") async))
+ (func (export "foo") async (canon lift (core func $i "foo") async))
)
(assert_trap (invoke "foo") "async-lifted export failed to produce a result")
@@ -99,7 +99,7 @@
(core instance $i (instantiate $m
(with "" (instance (export "task.return" (func $task-return))))
))
- (func (export "foo") (canon lift (core func $i "foo") async))
+ (func (export "foo") async (canon lift (core func $i "foo") async))
)
(assert_trap (invoke "foo") "async-lifted export failed to produce a result")
@@ -112,7 +112,7 @@
(core instance $i (instantiate $m
(with "" (instance (export "task.return" (func $task-return))))
))
- (func (export "foo") (canon lift (core func $i "foo") async))
+ (func (export "foo") async (canon lift (core func $i "foo") async))
)
(assert_trap (invoke "foo")
@@ -129,7 +129,7 @@
(core instance $i (instantiate $m
(with "" (instance (export "task.return" (func $task-return))))
))
- (func (export "foo") (canon lift (core func $i "foo") async))
+ (func (export "foo") async (canon lift (core func $i "foo") async))
)
(assert_trap (invoke "foo")
@@ -144,7 +144,7 @@
(core instance $i (instantiate $m
(with "" (instance (export "task.return" (func $task-return))))
))
- (func (export "foo") (canon lift (core func $i "foo") async))
+ (func (export "foo") async (canon lift (core func $i "foo") async))
)
(assert_trap (invoke "foo")