A lightweight WebAssembly runtime that is fast, secure, and standards-compliant
Update wasm-tools dependencies (#12031)
Alex Crichton020727d0f522
diff --git a/Cargo.lock b/Cargo.lockindex 705e6b1c17..eb6847d8dd 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -640,7 +640,7 @@ dependencies = ["test-programs-artifacts","tokio","wasm-compose",- "wasmparser 0.240.0",+ "wasmparser 0.241.2","wasmtime","wasmtime-wasi",]@@ -1326,7 +1326,7 @@ dependencies = [name = "example-component-wasm"version = "0.0.0"dependencies = [- "wit-bindgen 0.46.0",+ "wit-bindgen 0.48.0",][[package]]@@ -1337,7 +1337,7 @@ version = "0.0.0"name = "example-resource-component-wasm"version = "0.1.0"dependencies = [- "wit-bindgen 0.46.0",+ "wit-bindgen 0.48.0",][[package]]@@ -2194,14 +2194,14 @@ dependencies = [[[package]]name = "json-from-wast"-version = "0.240.0"+version = "0.241.2"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "ef6dcc7760296afbd208c99719349a60b0a2c9eb6b13d6124eda0bdf698e111f"+checksum = "3b24b1c06b0a7939bd1f7f4628bc6025e4b92a73293fce85bafb96c6289b267b"dependencies = ["anyhow","serde","serde_derive",- "wast 240.0.0",+ "wast 241.0.2",][[package]]@@ -3698,7 +3698,7 @@ dependencies = ["wasi-nn","wasip1","wasip2",- "wit-bindgen 0.46.0",+ "wit-bindgen 0.48.0",][[package]]@@ -3712,7 +3712,7 @@ dependencies = ["wasmtime","wasmtime-test-util","wat",- "wit-component 0.240.0",+ "wit-component",][[package]]@@ -4148,7 +4148,7 @@ name = "verify-component-adapter"version = "40.0.0"dependencies = ["anyhow",- "wasmparser 0.240.0",+ "wasmparser 0.241.2","wat",]@@ -4250,7 +4250,7 @@ dependencies = ["byte-array-literals","object 0.37.3","wasi 0.11.0+wasi-snapshot-preview1",- "wasm-encoder 0.240.0",+ "wasm-encoder","wit-bindgen-rust-macro",]@@ -4326,12 +4326,12 @@ checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49"[[package]]name = "wasm-compose"-version = "0.240.0"+version = "0.241.2"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "feeb9a231e63bd5d5dfe07e9f8daa53d5c85e4f7de5ef756d3b4e6a5f501c578"+checksum = "c055b2e55b0de39b5d7a3fc8c0cb3e2062218070667e3b65b7b819b5690f3978"dependencies = ["anyhow",- "heck 0.4.1",+ "heck 0.5.0","im-rc","indexmap 2.11.4","log",@@ -4340,81 +4340,59 @@ dependencies = ["serde_derive","serde_yaml","smallvec",- "wasm-encoder 0.240.0",- "wasmparser 0.240.0",+ "wasm-encoder",+ "wasmparser 0.241.2","wat",][[package]]name = "wasm-encoder"-version = "0.239.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "5be00faa2b4950c76fe618c409d2c3ea5a3c9422013e079482d78544bb2d184c"-dependencies = [- "leb128fmt",- "wasmparser 0.239.0",-]--[[package]]-name = "wasm-encoder"-version = "0.240.0"+version = "0.241.2"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "06d642d8c5ecc083aafe9ceb32809276a304547a3a6eeecceb5d8152598bc71f"+checksum = "e01164c9dda68301e34fdae536c23ed6fe90ce6d97213ccc171eebbd3d02d6b8"dependencies = ["leb128fmt",- "wasmparser 0.240.0",-]--[[package]]-name = "wasm-metadata"-version = "0.239.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "20b3ec880a9ac69ccd92fbdbcf46ee833071cf09f82bb005b2327c7ae6025ae2"-dependencies = [- "anyhow",- "indexmap 2.11.4",- "wasm-encoder 0.239.0",- "wasmparser 0.239.0",+ "wasmparser 0.241.2",][[package]]name = "wasm-metadata"-version = "0.240.0"+version = "0.241.2"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "ee093e1e1ccffa005b9b778f7a10ccfd58e25a20eccad294a1a93168d076befb"+checksum = "876fe286f2fa416386deedebe8407e6f19e0b5aeaef3d03161e77a15fa80f167"dependencies = ["anyhow","indexmap 2.11.4",- "wasm-encoder 0.240.0",- "wasmparser 0.240.0",+ "wasm-encoder",+ "wasmparser 0.241.2",][[package]]name = "wasm-mutate"-version = "0.240.0"+version = "0.241.2"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "1c3920237c62205fa324bb95adfea1bcd82eb69c502aed592137e068e46369ff"+checksum = "55039a20626e1391f2dd69e5af5481664efbb3321324c8f2f1fcc1d186fe3366"dependencies = ["egg","log","rand 0.9.2","thiserror 2.0.17",- "wasm-encoder 0.240.0",- "wasmparser 0.240.0",+ "wasm-encoder",+ "wasmparser 0.241.2",][[package]]name = "wasm-smith"-version = "0.240.0"+version = "0.241.2"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "b26182fa45cae2b8dfe17c65fdcd58fa780b47ea4ec5fb5f546aa67359ff6270"+checksum = "abc9739705303f00806012b0efd117c19f4db10715a422597ac127fb956b8c69"dependencies = ["anyhow","arbitrary","flagset","serde","serde_derive",- "wasm-encoder 0.240.0",+ "wasm-encoder","wat",]@@ -4428,14 +4406,14 @@ dependencies = [[[package]]name = "wasm-wave"-version = "0.240.0"+version = "0.241.2"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "d7a5973f54d40fe11b346f0f4995f7468d61d46c270d1dfe4f40a13b9d0d6723"+checksum = "7d5fdb7c75ee3647fca435cce89b51c52dfb921c5f1d4c3281fed5bbd174abeb"dependencies = ["indexmap 2.11.4","logos","thiserror 2.0.17",- "wit-parser 0.240.0",+ "wit-parser",][[package]]@@ -4490,21 +4468,9 @@ dependencies = [[[package]]name = "wasmparser"-version = "0.239.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "8c9d90bb93e764f6beabf1d02028c70a2156a6583e63ac4218dd07ef733368b0"-dependencies = [- "bitflags 2.9.4",- "hashbrown 0.15.2",- "indexmap 2.11.4",- "semver",-]--[[package]]-name = "wasmparser"-version = "0.240.0"+version = "0.241.2"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "b722dcf61e0ea47440b53ff83ccb5df8efec57a69d150e4f24882e4eba7e24a4"+checksum = "46d90019b1afd4b808c263e428de644f3003691f243387d30d673211ee0cb8e8"dependencies = ["bitflags 2.9.4","hashbrown 0.15.2",@@ -4515,13 +4481,13 @@ dependencies = [[[package]]name = "wasmprinter"-version = "0.240.0"+version = "0.241.2"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "a84d6e25c198da67d0150ee7c2c62d33d784f0a565d1e670bdf1eeccca8158bc"+checksum = "68832d23d180e4b8774103c2992b48a1b4d1b62474fd5807efa2e38c7914c4e2"dependencies = ["anyhow","termcolor",- "wasmparser 0.240.0",+ "wasmparser 0.241.2",][[package]]@@ -4567,9 +4533,9 @@ dependencies = ["tempfile","tokio","wasm-compose",- "wasm-encoder 0.240.0",+ "wasm-encoder","wasm-wave",- "wasmparser 0.240.0",+ "wasmparser 0.241.2","wasmtime-environ","wasmtime-internal-cache","wasmtime-internal-component-macro",@@ -4680,8 +4646,8 @@ dependencies = ["tracing","walkdir","wasi-common",- "wasm-encoder 0.240.0",- "wasmparser 0.240.0",+ "wasm-encoder",+ "wasmparser 0.241.2","wasmtime","wasmtime-cli-flags","wasmtime-environ",@@ -4701,10 +4667,10 @@ dependencies = ["wasmtime-wasi-tls","wasmtime-wast","wasmtime-wizer",- "wast 240.0.0",+ "wast 241.0.2","wat","windows-sys 0.60.2",- "wit-component 0.240.0",+ "wit-component",][[package]]@@ -4745,8 +4711,8 @@ dependencies = ["serde_derive","smallvec","target-lexicon",- "wasm-encoder 0.240.0",- "wasmparser 0.240.0",+ "wasm-encoder",+ "wasmparser 0.241.2","wasmprinter","wasmtime-internal-component-util","wat",@@ -4759,7 +4725,7 @@ dependencies = ["arbitrary","env_logger 0.11.5","libfuzzer-sys",- "wasmparser 0.240.0",+ "wasmparser 0.241.2","wasmprinter","wasmtime-environ","wasmtime-test-util",@@ -4792,7 +4758,7 @@ dependencies = ["rand 0.9.2","smallvec","target-lexicon",- "wasmparser 0.240.0",+ "wasmparser 0.241.2","wasmtime","wasmtime-fuzzing","wasmtime-test-util",@@ -4816,12 +4782,12 @@ dependencies = ["target-lexicon","tempfile","v8",- "wasm-encoder 0.240.0",+ "wasm-encoder","wasm-mutate","wasm-smith","wasm-spec-interpreter","wasmi",- "wasmparser 0.240.0",+ "wasmparser 0.241.2","wasmprinter","wasmtime","wasmtime-cli-flags",@@ -4876,7 +4842,7 @@ dependencies = ["wasmtime","wasmtime-internal-component-util","wasmtime-internal-wit-bindgen",- "wit-parser 0.240.0",+ "wit-parser",][[package]]@@ -4902,7 +4868,7 @@ dependencies = ["smallvec","target-lexicon","thiserror 2.0.17",- "wasmparser 0.240.0",+ "wasmparser 0.241.2","wasmtime-environ","wasmtime-internal-math","wasmtime-internal-unwinder",@@ -4999,7 +4965,7 @@ dependencies = ["log","object 0.37.3","target-lexicon",- "wasmparser 0.240.0",+ "wasmparser 0.241.2","wasmtime-environ","wasmtime-internal-cranelift","winch-codegen",@@ -5013,7 +4979,7 @@ dependencies = ["bitflags 2.9.4","heck 0.5.0","indexmap 2.11.4",- "wit-parser 0.240.0",+ "wit-parser",][[package]]@@ -5223,9 +5189,9 @@ dependencies = ["object 0.37.3","serde_json","tokio",- "wasmparser 0.240.0",+ "wasmparser 0.241.2","wasmtime",- "wast 240.0.0",+ "wast 241.0.2",][[package]]@@ -5239,8 +5205,8 @@ dependencies = ["log","rayon","tokio",- "wasm-encoder 0.240.0",- "wasmparser 0.240.0",+ "wasm-encoder",+ "wasmparser 0.241.2","wasmprinter","wasmtime","wasmtime-wasi",@@ -5258,25 +5224,25 @@ dependencies = [[[package]]name = "wast"-version = "240.0.0"+version = "241.0.2"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "b0efe1c93db4ac562b9733e3dca19ed7fc878dba29aef22245acf84f13da4a19"+checksum = "63f66e07e2ddf531fef6344dbf94d112df7c2f23ed6ffb10962e711500b8d816"dependencies = ["bumpalo","gimli 0.31.1","leb128fmt","memchr","unicode-width 0.2.0",- "wasm-encoder 0.240.0",+ "wasm-encoder",][[package]]name = "wat"-version = "1.240.0"+version = "1.241.2"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "4ec9b6eab7ecd4d639d78515e9ea491c9bacf494aa5eda10823bd35992cf8c1e"+checksum = "45f923705c40830af909c5dec2352ec2821202e4a66008194585e1917458a26d"dependencies = [- "wast 240.0.0",+ "wast 241.0.2",][[package]]@@ -5405,7 +5371,7 @@ dependencies = ["smallvec","target-lexicon","thiserror 2.0.17",- "wasmparser 0.240.0",+ "wasmparser 0.241.2","wasmtime-environ","wasmtime-internal-cranelift","wasmtime-internal-math",@@ -5649,25 +5615,24 @@ dependencies = [[[package]]name = "wit-bindgen"-version = "0.46.0"+version = "0.48.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59"+checksum = "c558f2d2929c6367736762d5593bd3276c88efa34945ed642e7bf512712bf163"dependencies = ["bitflags 2.9.4","futures",- "once_cell","wit-bindgen-rust-macro",][[package]]name = "wit-bindgen-core"-version = "0.46.0"+version = "0.48.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "cabd629f94da277abc739c71353397046401518efb2c707669f805205f0b9890"+checksum = "a64f7435c8448e456bc6e8f14e27ee4f65926cbdfe72b7bf95badeae2501bacf"dependencies = ["anyhow","heck 0.5.0",- "wit-parser 0.239.0",+ "wit-parser",][[package]]@@ -5681,25 +5646,25 @@ dependencies = [[[package]]name = "wit-bindgen-rust"-version = "0.46.0"+version = "0.48.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "9a4232e841089fa5f3c4fc732a92e1c74e1a3958db3b12f1de5934da2027f1f4"+checksum = "612651c001e0de8bfb7138af5551f80461f25caa627b64d7014a80914cf4f407"dependencies = ["anyhow","heck 0.5.0","indexmap 2.11.4","prettyplease","syn 2.0.106",- "wasm-metadata 0.239.0",+ "wasm-metadata","wit-bindgen-core",- "wit-component 0.239.0",+ "wit-component",][[package]]name = "wit-bindgen-rust-macro"-version = "0.46.0"+version = "0.48.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "1e0d4698c2913d8d9c2b220d116409c3f51a7aa8d7765151b886918367179ee9"+checksum = "16c64812d84284d45ce7d7371dc9eb0bcda2f0f747128bd1b4dae1e08217bad3"dependencies = ["anyhow","prettyplease",@@ -5712,9 +5677,9 @@ dependencies = [[[package]]name = "wit-component"-version = "0.239.0"+version = "0.241.2"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "88a866b19dba2c94d706ec58c92a4c62ab63e482b4c935d2a085ac94caecb136"+checksum = "1fd0c57df25e7ee612d946d3b7646c1ddb2310f8280aa2c17e543b66e0812241"dependencies = ["anyhow","bitflags 2.9.4",@@ -5723,54 +5688,17 @@ dependencies = ["serde","serde_derive","serde_json",- "wasm-encoder 0.239.0",- "wasm-metadata 0.239.0",- "wasmparser 0.239.0",- "wit-parser 0.239.0",-]--[[package]]-name = "wit-component"-version = "0.240.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "7dc5474b078addc5fe8a72736de8da3acfb3ff324c2491133f8b59594afa1a20"-dependencies = [- "anyhow",- "bitflags 2.9.4",- "indexmap 2.11.4",- "log",- "serde",- "serde_derive",- "serde_json",- "wasm-encoder 0.240.0",- "wasm-metadata 0.240.0",- "wasmparser 0.240.0",- "wit-parser 0.240.0",-]--[[package]]-name = "wit-parser"-version = "0.239.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "55c92c939d667b7bf0c6bf2d1f67196529758f99a2a45a3355cc56964fd5315d"-dependencies = [- "anyhow",- "id-arena",- "indexmap 2.11.4",- "log",- "semver",- "serde",- "serde_derive",- "serde_json",- "unicode-xid",- "wasmparser 0.239.0",+ "wasm-encoder",+ "wasm-metadata",+ "wasmparser 0.241.2",+ "wit-parser",][[package]]name = "wit-parser"-version = "0.240.0"+version = "0.241.2"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "9875ea3fa272f57cc1fc50f225a7b94021a7878c484b33792bccad0d93223439"+checksum = "09ef1c6ad67f35c831abd4039c02894de97034100899614d1c44e2268ad01c91"dependencies = ["anyhow","id-arena",@@ -5781,7 +5709,7 @@ dependencies = ["serde_derive","serde_json","unicode-xid",- "wasmparser 0.240.0",+ "wasmparser 0.241.2",][[package]]diff --git a/Cargo.toml b/Cargo.tomlindex 159ce5d7c8..679850ab17 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -333,22 +333,22 @@ io-lifetimes = { version = "2.0.3", default-features = false }io-extras = "0.18.1"rustix = "1.0.8"# wit-bindgen:-wit-bindgen = { version = "0.46.0", default-features = false }-wit-bindgen-rust-macro = { version = "0.46.0", default-features = false }+wit-bindgen = { version = "0.48.0", default-features = false }+wit-bindgen-rust-macro = { version = "0.48.0", default-features = false }# wasm-tools family:-wasmparser = { version = "0.240.0", default-features = false, features = ['simd'] }-wat = "1.240.0"-wast = "240.0.0"-wasmprinter = "0.240.0"-wasm-encoder = "0.240.0"-wasm-smith = "0.240.0"-wasm-mutate = "0.240.0"-wit-parser = "0.240.0"-wit-component = "0.240.0"-wasm-wave = "0.240.0"-wasm-compose = "0.240.0"-json-from-wast = "0.240.0"+wasmparser = { version = "0.241.0", default-features = false, features = ['simd'] }+wat = "1.241.0"+wast = "241.0.0"+wasmprinter = "0.241.0"+wasm-encoder = "0.241.0"+wasm-smith = "0.241.0"+wasm-mutate = "0.241.0"+wit-parser = "0.241.0"+wit-component = "0.241.0"+wasm-wave = "0.241.0"+wasm-compose = "0.241.0"+json-from-wast = "0.241.0"# Non-Bytecode Alliance maintained dependencies:# --------------------------diff --git a/crates/c-api/include/wasmtime/component/types/func.h b/crates/c-api/include/wasmtime/component/types/func.hindex 7fcc03706b..db49f0af80 100644--- a/crates/c-api/include/wasmtime/component/types/func.h+++ b/crates/c-api/include/wasmtime/component/types/func.h@@ -29,6 +29,11 @@ wasmtime_component_func_type_clone(const wasmtime_component_func_type_t *ty);WASM_API_EXTERNvoid wasmtime_component_func_type_delete(wasmtime_component_func_type_t *ty);+/// \brief Returns whether this is an async function.+WASM_API_EXTERN+bool wasmtime_component_func_type_async(+ const wasmtime_component_func_type_t *ty);+/// \brief Returns the number of parameters of a component function type.WASM_API_EXTERNsize_t wasmtime_component_func_type_param_count(diff --git a/crates/c-api/include/wasmtime/component/types/func.hh b/crates/c-api/include/wasmtime/component/types/func.hhindex 0b8ff5690e..25261e38be 100644--- a/crates/c-api/include/wasmtime/component/types/func.hh+++ b/crates/c-api/include/wasmtime/component/types/func.hh@@ -26,6 +26,9 @@ class FuncType {return wasmtime_component_func_type_param_count(ptr.get());}+ /// Returns whether this is an async function.+ bool async() const { return wasmtime_component_func_type_async(ptr.get()); }+/// Retrieves the nth parameter.std::optional<std::pair<std::string_view, ValType>>param_nth(size_t nth) const {diff --git a/crates/c-api/src/component/types/func.rs b/crates/c-api/src/component/types/func.rsindex 6103a9e25b..d17c38b1b4 100644--- a/crates/c-api/src/component/types/func.rs+++ b/crates/c-api/src/component/types/func.rs@@ -11,6 +11,11 @@ type_wrapper! {delete: wasmtime_component_func_type_delete,}+#[unsafe(no_mangle)]+pub extern "C" fn wasmtime_component_func_type_async(ty: &wasmtime_component_func_type_t) -> bool {+ ty.ty.async_()+}+#[unsafe(no_mangle)]pub extern "C" fn wasmtime_component_func_type_param_count(ty: &wasmtime_component_func_type_t,diff --git a/crates/c-api/tests/component/types.cc b/crates/c-api/tests/component/types.ccindex 181f6131be..dcef68dfd8 100644--- a/crates/c-api/tests/component/types.cc+++ b/crates/c-api/tests/component/types.cc@@ -316,6 +316,7 @@ TEST(types, func_result) {auto f1 = *instance.get_func(store, f1_index);auto f2 = *instance.get_func(store, f2_index);+ EXPECT_FALSE(f1.type(store).async());EXPECT_EQ(f1.type(store).param_count(), 0);EXPECT_FALSE(f1.type(store).result().has_value());diff --git a/crates/environ/src/component/info.rs b/crates/environ/src/component/info.rsindex 51d14f1e63..efbacb648a 100644--- a/crates/environ/src/component/info.rs+++ b/crates/environ/src/component/info.rs@@ -291,7 +291,7 @@ pub enum GlobalInitializer {/// from its `export` and stored into the `VMComponentContext` at the/// `index` specified. During this extraction, we will also capture the/// table's containing instance pointer to access the table at runtime. This- /// extraction is useful for `thread.spawn_indirect`.+ /// extraction is useful for `thread.spawn-indirect`.ExtractTable(ExtractTable),/// Declares a new defined resource within this component.@@ -1137,7 +1137,7 @@ pub enum Trampoline {/// Intrinsic used to implement the `thread.index` component model builtin.ThreadIndex,- /// Intrinsic used to implement the `thread.new_indirect` component model builtin.+ /// Intrinsic used to implement the `thread.new-indirect` component model builtin.ThreadNewIndirect {/// The specific component instance which is calling the intrinsic.instance: RuntimeComponentInstanceIndex,diff --git a/crates/environ/src/component/types.rs b/crates/environ/src/component/types.rsindex 2b1081269d..8db6b800c4 100644--- a/crates/environ/src/component/types.rs+++ b/crates/environ/src/component/types.rs@@ -550,6 +550,8 @@ pub struct TypeComponentInstance {/// A component function type in the component model.#[derive(Serialize, Deserialize, Clone, Hash, Eq, PartialEq, Debug)]pub struct TypeFunc {+ /// Whether or not this is an async function.+ pub async_: bool,/// Names of parameters.pub param_names: Vec<String>,/// Parameters to the function represented as a tuple.diff --git a/crates/environ/src/component/types_builder.rs b/crates/environ/src/component/types_builder.rsindex 87b6094453..22f6a9fb7b 100644--- a/crates/environ/src/component/types_builder.rs+++ b/crates/environ/src/component/types_builder.rs@@ -254,6 +254,7 @@ impl ComponentTypesBuilder {let params = self.new_tuple_type(params);let results = self.new_tuple_type(results);let ty = TypeFunc {+ async_: ty.async_,param_names,params,results,diff --git a/crates/misc/component-async-tests/tests/scenario/round_trip.rs b/crates/misc/component-async-tests/tests/scenario/round_trip.rsindex b6684ca639..e524583b90 100644--- a/crates/misc/component-async-tests/tests/scenario/round_trip.rs+++ b/crates/misc/component-async-tests/tests/scenario/round_trip.rs@@ -362,7 +362,7 @@ pub async fn test_round_trip(linker.root().instance("local:local/baz")?- .func_new_concurrent("[async]foo", |_, _, params, results| {+ .func_new_concurrent("foo", |_, _, params, results| {Box::pin(async move {sleep(Duration::from_millis(10)).await;let Some(Val::String(s)) = params.into_iter().next() else {@@ -380,11 +380,11 @@ pub async fn test_round_trip(.get_export_index(&mut store, None, "local:local/baz").ok_or_else(|| anyhow!("can't find `local:local/baz` in instance"))?;let foo_function = instance- .get_export_index(&mut store, Some(&baz_instance), "[async]foo")- .ok_or_else(|| anyhow!("can't find `[async]foo` in instance"))?;+ .get_export_index(&mut store, Some(&baz_instance), "foo")+ .ok_or_else(|| anyhow!("can't find `foo` in instance"))?;let foo_function = instance.get_func(&mut store, foo_function)- .ok_or_else(|| anyhow!("can't find `[async]foo` in instance"))?;+ .ok_or_else(|| anyhow!("can't find `foo` in instance"))?;if call_style == 3 || !cfg!(miri) {storediff --git a/crates/misc/component-async-tests/tests/scenario/round_trip_direct.rs b/crates/misc/component-async-tests/tests/scenario/round_trip_direct.rsindex 408a4b79b1..e8eda15e68 100644--- a/crates/misc/component-async-tests/tests/scenario/round_trip_direct.rs+++ b/crates/misc/component-async-tests/tests/scenario/round_trip_direct.rs@@ -94,7 +94,7 @@ async fn test_round_trip_direct(wasmtime_wasi::p2::add_to_linker_async(&mut linker)?;linker.root()- .func_new_concurrent("[async]foo", |_, _, params, results| {+ .func_new_concurrent("foo", |_, _, params, results| {Box::pin(async move {sleep(Duration::from_millis(10)).await;let Some(Val::String(s)) = params.into_iter().next() else {@@ -109,7 +109,7 @@ async fn test_round_trip_direct(let instance = linker.instantiate_async(&mut store, &component).await?;let foo_function = instance- .get_export_index(&mut store, None, "[async]foo")+ .get_export_index(&mut store, None, "foo").ok_or_else(|| anyhow!("can't find `foo` in instance"))?;let foo_function = instance.get_func(&mut store, foo_function)diff --git a/crates/misc/component-async-tests/tests/scenario/round_trip_many.rs b/crates/misc/component-async-tests/tests/scenario/round_trip_many.rsindex 29bdc4022b..3c1543026f 100644--- a/crates/misc/component-async-tests/tests/scenario/round_trip_many.rs+++ b/crates/misc/component-async-tests/tests/scenario/round_trip_many.rs@@ -341,7 +341,7 @@ async fn test_round_trip_many(linker.root().instance("local:local/many")?- .func_new_concurrent("[async]foo", |_, _, params, results| {+ .func_new_concurrent("foo", |_, _, params, results| {Box::pin(async move {sleep(Duration::from_millis(10)).await;let mut params = params.into_iter();@@ -364,7 +364,7 @@ async fn test_round_trip_many(.get_export_index(&mut store, None, "local:local/many").ok_or_else(|| anyhow!("can't find `local:local/many` in instance"))?;let foo_function = instance- .get_export_index(&mut store, Some(&baz_instance), "[async]foo")+ .get_export_index(&mut store, Some(&baz_instance), "foo").ok_or_else(|| anyhow!("can't find `foo` in instance"))?;let foo_function = instance.get_func(&mut store, foo_function)diff --git a/crates/misc/component-async-tests/tests/scenario/transmit.rs b/crates/misc/component-async-tests/tests/scenario/transmit.rsindex d31ef9960c..f4f5b109b2 100644--- a/crates/misc/component-async-tests/tests/scenario/transmit.rs+++ b/crates/misc/component-async-tests/tests/scenario/transmit.rs@@ -648,11 +648,7 @@ impl TransmitTest for DynamicTransmitTest {.get_export_index(store.as_context_mut(), None, "local:local/transmit").ok_or_else(|| anyhow!("can't find `local:local/transmit` in instance"))?;let exchange_function = instance- .get_export_index(- store.as_context_mut(),- Some(&transmit_instance),- "[async]exchange",- )+ .get_export_index(store.as_context_mut(), Some(&transmit_instance), "exchange").ok_or_else(|| anyhow!("can't find `exchange` in instance"))?;instance.get_func(store.as_context_mut(), exchange_function)diff --git a/crates/test-programs/Cargo.toml b/crates/test-programs/Cargo.tomlindex 26ad3b0b6a..566022de5b 100644--- a/crates/test-programs/Cargo.toml+++ b/crates/test-programs/Cargo.toml@@ -13,9 +13,9 @@ workspace = true[dependencies]anyhow = { workspace = true, features = ['std'] }wasi-nn = "0.6.0"-wit-bindgen = { workspace = true, features = ['default'] }+wit-bindgen = { workspace = true, features = ['default', 'async-spawn'] }libc = { workspace = true }-futures = { workspace = true, default-features = false, features = ['alloc'] }+futures = { workspace = true, default-features = false, features = ['alloc', 'async-await'] }url = { workspace = true }sha2 = "0.10.2"base64 = { workspace = true }diff --git a/crates/test-programs/src/bin/async_cancel_callee.rs b/crates/test-programs/src/bin/async_cancel_callee.rsindex 0e2c1431ed..419124d927 100644--- a/crates/test-programs/src/bin/async_cancel_callee.rs+++ b/crates/test-programs/src/bin/async_cancel_callee.rs@@ -14,7 +14,7 @@ use test_programs::async_::{#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/sleep-with-options")]unsafe extern "C" {- #[link_name = "[task-return][async]sleep-millis"]+ #[link_name = "[task-return]sleep-millis"]fn task_return_sleep_millis();}#[cfg(not(target_arch = "wasm32"))]@@ -25,7 +25,7 @@ unsafe extern "C" fn task_return_sleep_millis() {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "local:local/sleep")]unsafe extern "C" {- #[link_name = "[async]sleep-millis"]+ #[link_name = "sleep-millis"]fn sleep_millis(_: u64);}#[cfg(not(target_arch = "wasm32"))]@@ -36,7 +36,7 @@ unsafe fn sleep_millis(_: u64) {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "local:local/sleep")]unsafe extern "C" {- #[link_name = "[async-lower][async]sleep-millis"]+ #[link_name = "[async-lower]sleep-millis"]fn sleep_millis_async(ms: u64) -> u32;}#[cfg(not(target_arch = "wasm32"))]@@ -94,14 +94,14 @@ unsafe extern "C" fn export_dec_backpressure() {wit_bindgen::backpressure_dec();}-#[unsafe(export_name = "local:local/sleep#[async]sleep-millis")]+#[unsafe(export_name = "local:local/sleep#sleep-millis")]unsafe extern "C" fn export_sleep_sleep_millis(time_in_millis: u64) {unsafe {sleep_millis(time_in_millis);}}-#[unsafe(export_name = "[async-lift]local:local/sleep-with-options#[async]sleep-millis")]+#[unsafe(export_name = "[async-lift]local:local/sleep-with-options#sleep-millis")]unsafe extern "C" fn export_sleep_with_options_sleep_millis(time_in_millis: u64,on_cancel: u8,@@ -124,7 +124,7 @@ unsafe extern "C" fn export_sleep_with_options_sleep_millis(}}-#[unsafe(export_name = "[callback][async-lift]local:local/sleep-with-options#[async]sleep-millis")]+#[unsafe(export_name = "[callback][async-lift]local:local/sleep-with-options#sleep-millis")]unsafe extern "C" fn callback_sleep_with_options_sleep_millis(event0: u32,event1: u32,diff --git a/crates/test-programs/src/bin/async_cancel_caller.rs b/crates/test-programs/src/bin/async_cancel_caller.rsindex c6eae11c03..cfaec732fc 100644--- a/crates/test-programs/src/bin/async_cancel_caller.rs+++ b/crates/test-programs/src/bin/async_cancel_caller.rs@@ -44,7 +44,7 @@ mod sleep {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "local:local/sleep")]unsafe extern "C" {- #[link_name = "[async-lower][async]sleep-millis"]+ #[link_name = "[async-lower]sleep-millis"]pub fn sleep_millis(_: u64) -> u32;}#[cfg(not(target_arch = "wasm32"))]@@ -57,7 +57,7 @@ mod sleep_with_options {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "local:local/sleep-with-options")]unsafe extern "C" {- #[link_name = "[async-lower][async]sleep-millis"]+ #[link_name = "[async-lower]sleep-millis"]pub fn sleep_millis(_: *mut u8) -> u32;}#[cfg(not(target_arch = "wasm32"))]diff --git a/crates/test-programs/src/bin/async_cancel_transmit.rs b/crates/test-programs/src/bin/async_cancel_transmit.rsindex e96b212c2d..7d0f05ba68 100644--- a/crates/test-programs/src/bin/async_cancel_transmit.rs+++ b/crates/test-programs/src/bin/async_cancel_transmit.rs@@ -19,7 +19,7 @@ use {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[task-return][async]start"]+ #[link_name = "[task-return]start"]fn task_return_start(_: u32, _: *const u8, _: usize, _: u32, _: u8);}#[cfg(not(target_arch = "wasm32"))]@@ -30,7 +30,7 @@ unsafe extern "C" fn task_return_start(_: u32, _: *const u8, _: usize, _: u32, _#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[stream-new-0][async]start"]+ #[link_name = "[stream-new-0]start"]fn stream_new() -> u64;}#[cfg(not(target_arch = "wasm32"))]@@ -41,7 +41,7 @@ unsafe extern "C" fn stream_new() -> u64 {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[async-lower][stream-write-0][async]start"]+ #[link_name = "[async-lower][stream-write-0]start"]fn stream_write(_: u32, _: *const u8, _: usize) -> u32;}#[cfg(not(target_arch = "wasm32"))]@@ -52,7 +52,7 @@ unsafe extern "C" fn stream_write(_: u32, _: *const u8, _: usize) -> u32 {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[async-lower][stream-read-0][async]start"]+ #[link_name = "[async-lower][stream-read-0]start"]fn stream_read(_: u32, _: *mut u8, _: usize) -> u32;}#[cfg(not(target_arch = "wasm32"))]@@ -63,7 +63,7 @@ unsafe extern "C" fn stream_read(_: u32, _: *mut u8, _: usize) -> u32 {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[stream-cancel-write-0][async]start"]+ #[link_name = "[stream-cancel-write-0]start"]fn stream_cancel_write(_: u32) -> u32;}#[cfg(not(target_arch = "wasm32"))]@@ -74,7 +74,7 @@ unsafe extern "C" fn stream_cancel_write(_: u32) -> u32 {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[stream-cancel-read-0][async]start"]+ #[link_name = "[stream-cancel-read-0]start"]fn stream_cancel_read(_: u32) -> u32;}#[cfg(not(target_arch = "wasm32"))]@@ -85,7 +85,7 @@ unsafe extern "C" fn stream_cancel_read(_: u32) -> u32 {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[stream-drop-readable-0][async]start"]+ #[link_name = "[stream-drop-readable-0]start"]fn stream_drop_readable(_: u32);}#[cfg(not(target_arch = "wasm32"))]@@ -96,7 +96,7 @@ unsafe extern "C" fn stream_drop_readable(_: u32) {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[stream-drop-writable-0][async]start"]+ #[link_name = "[stream-drop-writable-0]start"]fn stream_drop_writable(_: u32);}#[cfg(not(target_arch = "wasm32"))]@@ -107,7 +107,7 @@ unsafe extern "C" fn stream_drop_writable(_: u32) {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[future-new-1][async]start"]+ #[link_name = "[future-new-1]start"]fn future_new() -> u64;}#[cfg(not(target_arch = "wasm32"))]@@ -118,7 +118,7 @@ unsafe extern "C" fn future_new() -> u64 {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[async-lower][future-write-1][async]start"]+ #[link_name = "[async-lower][future-write-1]start"]fn future_write(_: u32, _: *const u8) -> u32;}#[cfg(not(target_arch = "wasm32"))]@@ -129,7 +129,7 @@ unsafe extern "C" fn future_write(_: u32, _: *const u8) -> u32 {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[async-lower][future-read-1][async]start"]+ #[link_name = "[async-lower][future-read-1]start"]fn future_read(_: u32, _: *mut u8) -> u32;}#[cfg(not(target_arch = "wasm32"))]@@ -140,7 +140,7 @@ unsafe extern "C" fn future_read(_: u32, _: *mut u8) -> u32 {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[future-cancel-write-1][async]start"]+ #[link_name = "[future-cancel-write-1]start"]fn future_cancel_write(_: u32) -> u32;}#[cfg(not(target_arch = "wasm32"))]@@ -151,7 +151,7 @@ unsafe extern "C" fn future_cancel_write(_: u32) -> u32 {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[future-cancel-read-1][async]start"]+ #[link_name = "[future-cancel-read-1]start"]fn future_cancel_read(_: u32) -> u32;}#[cfg(not(target_arch = "wasm32"))]@@ -162,7 +162,7 @@ unsafe extern "C" fn future_cancel_read(_: u32) -> u32 {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[future-drop-readable-1][async]start"]+ #[link_name = "[future-drop-readable-1]start"]fn future_drop_readable(_: u32);}#[cfg(not(target_arch = "wasm32"))]@@ -173,7 +173,7 @@ unsafe extern "C" fn future_drop_readable(_: u32) {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[future-drop-writable-1][async]start"]+ #[link_name = "[future-drop-writable-1]start"]fn future_drop_writable(_: u32);}#[cfg(not(target_arch = "wasm32"))]@@ -203,7 +203,7 @@ enum State {},}-#[unsafe(export_name = "[async-lift]local:local/synchronous-transmit#[async]start")]+#[unsafe(export_name = "[async-lift]local:local/synchronous-transmit#start")]unsafe extern "C" fn export_start(stream: u32,stream_expected: u32,@@ -232,7 +232,7 @@ unsafe extern "C" fn export_start(}}-#[unsafe(export_name = "[callback][async-lift]local:local/synchronous-transmit#[async]start")]+#[unsafe(export_name = "[callback][async-lift]local:local/synchronous-transmit#start")]unsafe extern "C" fn callback_start(event0: u32, _event1: u32, _event2: u32) -> u32 {unsafe {let state = &mut *(usize::try_from(context_get()).unwrap() as *mut State);diff --git a/crates/test-programs/src/bin/async_intertask_communication.rs b/crates/test-programs/src/bin/async_intertask_communication.rsindex 49523b3f71..7e985f79f5 100644--- a/crates/test-programs/src/bin/async_intertask_communication.rs+++ b/crates/test-programs/src/bin/async_intertask_communication.rs@@ -16,7 +16,7 @@ use {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/run")]unsafe extern "C" {- #[link_name = "[task-return][async]run"]+ #[link_name = "[task-return]run"]fn task_return_run();}#[cfg(not(target_arch = "wasm32"))]@@ -111,7 +111,7 @@ enum State {S1 { set: u32 },}-#[unsafe(export_name = "[async-lift]local:local/run#[async]run")]+#[unsafe(export_name = "[async-lift]local:local/run#run")]unsafe extern "C" fn export_run() -> u32 {unsafe {context_set(@@ -124,7 +124,7 @@ unsafe extern "C" fn export_run() -> u32 {}}-#[unsafe(export_name = "[callback][async-lift]local:local/run#[async]run")]+#[unsafe(export_name = "[callback][async-lift]local:local/run#run")]unsafe extern "C" fn callback_run(event0: u32, event1: u32, event2: u32) -> u32 {unsafe {let state = &mut *(usize::try_from(context_get()).unwrap() as *mut State);diff --git a/crates/test-programs/src/bin/async_poll_stackless.rs b/crates/test-programs/src/bin/async_poll_stackless.rsindex 43a860772e..52c413f21b 100644--- a/crates/test-programs/src/bin/async_poll_stackless.rs+++ b/crates/test-programs/src/bin/async_poll_stackless.rs@@ -18,7 +18,7 @@ use {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/run")]unsafe extern "C" {- #[link_name = "[task-return][async]run"]+ #[link_name = "[task-return]run"]fn task_return_run();}#[cfg(not(target_arch = "wasm32"))]@@ -36,7 +36,7 @@ fn async_when_ready() -> u32 {{#[link(wasm_import_module = "local:local/ready")]unsafe extern "C" {- #[link_name = "[async-lower][async]when-ready"]+ #[link_name = "[async-lower]when-ready"]fn call_when_ready() -> u32;}unsafe { call_when_ready() }@@ -52,13 +52,13 @@ enum State {S5 { set: u32 },}-#[unsafe(export_name = "[async-lift]local:local/run#[async]run")]+#[unsafe(export_name = "[async-lift]local:local/run#run")]unsafe extern "C" fn export_run() -> u32 {context_set(u32::try_from(Box::into_raw(Box::new(State::S0)) as usize).unwrap());callback_run(EVENT_NONE, 0, 0)}-#[unsafe(export_name = "[callback][async-lift]local:local/run#[async]run")]+#[unsafe(export_name = "[callback][async-lift]local:local/run#run")]unsafe extern "C" fn callback_run(event0: u32, event1: u32, event2: u32) -> u32 {let state = &mut *(usize::try_from(context_get()).unwrap() as *mut State);match state {diff --git a/crates/test-programs/src/bin/async_poll_synchronous.rs b/crates/test-programs/src/bin/async_poll_synchronous.rsindex f5450ae2a6..3a042028b5 100644--- a/crates/test-programs/src/bin/async_poll_synchronous.rs+++ b/crates/test-programs/src/bin/async_poll_synchronous.rs@@ -27,7 +27,7 @@ fn async_when_ready() -> u32 {{#[link(wasm_import_module = "local:local/ready")]unsafe extern "C" {- #[link_name = "[async-lower][async]when-ready"]+ #[link_name = "[async-lower]when-ready"]fn call_when_ready() -> u32;}unsafe { call_when_ready() }diff --git a/crates/test-programs/src/bin/async_post_return_callee.rs b/crates/test-programs/src/bin/async_post_return_callee.rsindex deb803cf24..6a36d6e635 100644--- a/crates/test-programs/src/bin/async_post_return_callee.rs+++ b/crates/test-programs/src/bin/async_post_return_callee.rs@@ -13,7 +13,7 @@ mod bindings {world: "post-return-callee",// Here we avoid using wit-bindgen so that we can export our own// post-return function and keep track of whether it was called.- skip: ["[async]foo"],+ skip: ["foo"],});use super::Component;@@ -22,7 +22,7 @@ mod bindings {struct Component;-#[unsafe(export_name = "local:local/post-return#[async]foo")]+#[unsafe(export_name = "local:local/post-return#foo")]unsafe extern "C" fn export_foo(ptr: *mut u8, len: usize) -> *mut u8 {let result = alloc::alloc(Layout::from_size_align(8, 4).unwrap());*result.cast::<*mut u8>() = ptr;@@ -30,7 +30,7 @@ unsafe extern "C" fn export_foo(ptr: *mut u8, len: usize) -> *mut u8 {result}-#[unsafe(export_name = "cabi_post_local:local/post-return#[async]foo")]+#[unsafe(export_name = "cabi_post_local:local/post-return#foo")]unsafe extern "C" fn export_post_return_foo(ptr: *mut u8) {let s_ptr = *ptr.cast::<*mut u8>();let s_len = *ptr.add(4).cast::<usize>();diff --git a/crates/test-programs/src/bin/async_readiness.rs b/crates/test-programs/src/bin/async_readiness.rsindex 498e0b14be..5c4881e2af 100644--- a/crates/test-programs/src/bin/async_readiness.rs+++ b/crates/test-programs/src/bin/async_readiness.rs@@ -17,7 +17,7 @@ use {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/readiness")]unsafe extern "C" {- #[link_name = "[task-return][async]start"]+ #[link_name = "[task-return]start"]fn task_return_start(_: u32, _: *const u8, _: usize);}#[cfg(not(target_arch = "wasm32"))]@@ -28,7 +28,7 @@ unsafe extern "C" fn task_return_start(_: u32, _: *const u8, _: usize) {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/readiness")]unsafe extern "C" {- #[link_name = "[stream-new-0][async]start"]+ #[link_name = "[stream-new-0]start"]fn stream_new() -> u64;}#[cfg(not(target_arch = "wasm32"))]@@ -39,7 +39,7 @@ unsafe extern "C" fn stream_new() -> u64 {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/readiness")]unsafe extern "C" {- #[link_name = "[async-lower][stream-write-0][async]start"]+ #[link_name = "[async-lower][stream-write-0]start"]fn stream_write(_: u32, _: *const u8, _: usize) -> u32;}#[cfg(not(target_arch = "wasm32"))]@@ -50,7 +50,7 @@ unsafe extern "C" fn stream_write(_: u32, _: *const u8, _: usize) -> u32 {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/readiness")]unsafe extern "C" {- #[link_name = "[async-lower][stream-read-0][async]start"]+ #[link_name = "[async-lower][stream-read-0]start"]fn stream_read(_: u32, _: *mut u8, _: usize) -> u32;}#[cfg(not(target_arch = "wasm32"))]@@ -61,7 +61,7 @@ unsafe extern "C" fn stream_read(_: u32, _: *mut u8, _: usize) -> u32 {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/readiness")]unsafe extern "C" {- #[link_name = "[stream-drop-readable-0][async]start"]+ #[link_name = "[stream-drop-readable-0]start"]fn stream_drop_readable(_: u32);}#[cfg(not(target_arch = "wasm32"))]@@ -72,7 +72,7 @@ unsafe extern "C" fn stream_drop_readable(_: u32) {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/readiness")]unsafe extern "C" {- #[link_name = "[stream-drop-writable-0][async]start"]+ #[link_name = "[stream-drop-writable-0]start"]fn stream_drop_writable(_: u32);}#[cfg(not(target_arch = "wasm32"))]@@ -95,7 +95,7 @@ enum State {},}-#[unsafe(export_name = "[async-lift]local:local/readiness#[async]start")]+#[unsafe(export_name = "[async-lift]local:local/readiness#start")]unsafe extern "C" fn export_start(rx: u32, expected: u32, expected_len: u32) -> u32 {let expected_len = usize::try_from(expected_len).unwrap();@@ -116,7 +116,7 @@ unsafe extern "C" fn export_start(rx: u32, expected: u32, expected_len: u32) ->}}-#[unsafe(export_name = "[callback][async-lift]local:local/readiness#[async]start")]+#[unsafe(export_name = "[callback][async-lift]local:local/readiness#start")]unsafe extern "C" fn callback_start(event0: u32, event1: u32, event2: u32) -> u32 {unsafe {let state = &mut *(usize::try_from(context_get()).unwrap() as *mut State);diff --git a/crates/test-programs/src/bin/async_round_trip_many_stackful.rs b/crates/test-programs/src/bin/async_round_trip_many_stackful.rsindex 7a1aad886f..6500f0a5a0 100644--- a/crates/test-programs/src/bin/async_round_trip_many_stackful.rs+++ b/crates/test-programs/src/bin/async_round_trip_many_stackful.rs@@ -31,7 +31,7 @@ use {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/many")]unsafe extern "C" {- #[link_name = "[task-return][async]foo"]+ #[link_name = "[task-return]foo"]fn task_return_foo(ptr: *mut u8);}#[cfg(not(target_arch = "wasm32"))]@@ -42,7 +42,7 @@ unsafe extern "C" fn task_return_foo(_ptr: *mut u8) {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "local:local/many")]unsafe extern "C" {- #[link_name = "[async-lower][async]foo"]+ #[link_name = "[async-lower]foo"]fn import_foo(params: *mut u8, results: *mut u8) -> u32;}#[cfg(not(target_arch = "wasm32"))]@@ -50,7 +50,7 @@ unsafe extern "C" fn import_foo(_params: *mut u8, _results: *mut u8) -> u32 {unreachable!()}-#[unsafe(export_name = "[async-lift-stackful]local:local/many#[async]foo")]+#[unsafe(export_name = "[async-lift-stackful]local:local/many#foo")]unsafe extern "C" fn export_foo(args: *mut u8) {// Note that we're careful not to take the address of any stack-allocated// value here. We need to avoid relying on the LLVM-generated shadow stackdiff --git a/crates/test-programs/src/bin/async_round_trip_many_wait.rs b/crates/test-programs/src/bin/async_round_trip_many_wait.rsindex ea6ce1f454..6e8277ca51 100644--- a/crates/test-programs/src/bin/async_round_trip_many_wait.rs+++ b/crates/test-programs/src/bin/async_round_trip_many_wait.rs@@ -2,7 +2,7 @@ mod bindings {wit_bindgen::generate!({path: "../misc/component-async-tests/wit",world: "round-trip-many",- async: ["-export:local:local/many#[async]foo"],+ async: ["-export:local:local/many#foo"],});use super::Component;diff --git a/crates/test-programs/src/bin/async_round_trip_stackful.rs b/crates/test-programs/src/bin/async_round_trip_stackful.rsindex 381ef68142..7fab1a96cc 100644--- a/crates/test-programs/src/bin/async_round_trip_stackful.rs+++ b/crates/test-programs/src/bin/async_round_trip_stackful.rs@@ -31,7 +31,7 @@ use {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/baz")]unsafe extern "C" {- #[link_name = "[task-return][async]foo"]+ #[link_name = "[task-return]foo"]fn task_return_foo(ptr: *mut u8, len: usize);}#[cfg(not(target_arch = "wasm32"))]@@ -42,7 +42,7 @@ unsafe extern "C" fn task_return_foo(_ptr: *mut u8, _len: usize) {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "local:local/baz")]unsafe extern "C" {- #[link_name = "[async-lower][async]foo"]+ #[link_name = "[async-lower]foo"]fn import_foo(ptr: *mut u8, len: usize, results: *mut u8) -> u32;}#[cfg(not(target_arch = "wasm32"))]@@ -50,7 +50,7 @@ unsafe extern "C" fn import_foo(_ptr: *mut u8, _len: usize, _results: *mut u8) -unreachable!()}-#[unsafe(export_name = "[async-lift-stackful]local:local/baz#[async]foo")]+#[unsafe(export_name = "[async-lift-stackful]local:local/baz#foo")]unsafe extern "C" fn export_foo(ptr: *mut u8, len: usize) {// Note that we're careful not to take the address of any stack-allocated// value here. We need to avoid relying on the LLVM-generated shadow stackdiff --git a/crates/test-programs/src/bin/async_round_trip_stackless_sync_import.rs b/crates/test-programs/src/bin/async_round_trip_stackless_sync_import.rsindex b62853406e..0555ea3497 100644--- a/crates/test-programs/src/bin/async_round_trip_stackless_sync_import.rs+++ b/crates/test-programs/src/bin/async_round_trip_stackless_sync_import.rs@@ -2,7 +2,7 @@ mod bindings {wit_bindgen::generate!({path: "../misc/component-async-tests/wit",world: "round-trip",- async: ["-import:local:local/baz#[async]foo"],+ async: ["-import:local:local/baz#foo"],});use super::Component;diff --git a/crates/test-programs/src/bin/async_round_trip_wait.rs b/crates/test-programs/src/bin/async_round_trip_wait.rsindex 906ede42da..cb1d24534c 100644--- a/crates/test-programs/src/bin/async_round_trip_wait.rs+++ b/crates/test-programs/src/bin/async_round_trip_wait.rs@@ -2,7 +2,7 @@ mod bindings {wit_bindgen::generate!({path: "../misc/component-async-tests/wit",world: "round-trip",- async: ["-export:local:local/baz#[async]foo"],+ async: ["-export:local:local/baz#foo"],});use super::Component;diff --git a/crates/test-programs/src/bin/async_synchronous_transmit.rs b/crates/test-programs/src/bin/async_synchronous_transmit.rsindex 89eda8c657..f12f91844c 100644--- a/crates/test-programs/src/bin/async_synchronous_transmit.rs+++ b/crates/test-programs/src/bin/async_synchronous_transmit.rs@@ -16,7 +16,7 @@ use {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[task-return][async]start"]+ #[link_name = "[task-return]start"]fn task_return_start(_: u32, _: *const u8, _: usize, _: u32, _: u8);}#[cfg(not(target_arch = "wasm32"))]@@ -27,7 +27,7 @@ unsafe extern "C" fn task_return_start(_: u32, _: *const u8, _: usize, _: u32, _#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[stream-new-0][async]start"]+ #[link_name = "[stream-new-0]start"]fn stream_new() -> u64;}#[cfg(not(target_arch = "wasm32"))]@@ -38,7 +38,7 @@ unsafe extern "C" fn stream_new() -> u64 {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[stream-write-0][async]start"]+ #[link_name = "[stream-write-0]start"]fn stream_write(_: u32, _: *const u8, _: usize) -> u32;}#[cfg(not(target_arch = "wasm32"))]@@ -49,7 +49,7 @@ unsafe extern "C" fn stream_write(_: u32, _: *const u8, _: usize) -> u32 {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[stream-read-0][async]start"]+ #[link_name = "[stream-read-0]start"]fn stream_read(_: u32, _: *mut u8, _: usize) -> u32;}#[cfg(not(target_arch = "wasm32"))]@@ -60,7 +60,7 @@ unsafe extern "C" fn stream_read(_: u32, _: *mut u8, _: usize) -> u32 {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[stream-drop-readable-0][async]start"]+ #[link_name = "[stream-drop-readable-0]start"]fn stream_drop_readable(_: u32);}#[cfg(not(target_arch = "wasm32"))]@@ -71,7 +71,7 @@ unsafe extern "C" fn stream_drop_readable(_: u32) {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[stream-drop-writable-0][async]start"]+ #[link_name = "[stream-drop-writable-0]start"]fn stream_drop_writable(_: u32);}#[cfg(not(target_arch = "wasm32"))]@@ -82,7 +82,7 @@ unsafe extern "C" fn stream_drop_writable(_: u32) {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[future-new-1][async]start"]+ #[link_name = "[future-new-1]start"]fn future_new() -> u64;}#[cfg(not(target_arch = "wasm32"))]@@ -93,7 +93,7 @@ unsafe extern "C" fn future_new() -> u64 {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[future-write-1][async]start"]+ #[link_name = "[future-write-1]start"]fn future_write(_: u32, _: *const u8) -> u32;}#[cfg(not(target_arch = "wasm32"))]@@ -104,7 +104,7 @@ unsafe extern "C" fn future_write(_: u32, _: *const u8) -> u32 {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[future-read-1][async]start"]+ #[link_name = "[future-read-1]start"]fn future_read(_: u32, _: *mut u8) -> u32;}#[cfg(not(target_arch = "wasm32"))]@@ -115,7 +115,7 @@ unsafe extern "C" fn future_read(_: u32, _: *mut u8) -> u32 {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[future-drop-readable-1][async]start"]+ #[link_name = "[future-drop-readable-1]start"]fn future_drop_readable(_: u32);}#[cfg(not(target_arch = "wasm32"))]@@ -126,7 +126,7 @@ unsafe extern "C" fn future_drop_readable(_: u32) {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/synchronous-transmit")]unsafe extern "C" {- #[link_name = "[future-drop-writable-1][async]start"]+ #[link_name = "[future-drop-writable-1]start"]fn future_drop_writable(_: u32);}#[cfg(not(target_arch = "wasm32"))]@@ -154,7 +154,7 @@ enum State {},}-#[unsafe(export_name = "[async-lift]local:local/synchronous-transmit#[async]start")]+#[unsafe(export_name = "[async-lift]local:local/synchronous-transmit#start")]unsafe extern "C" fn export_start(stream: u32,stream_expected: u32,@@ -183,7 +183,7 @@ unsafe extern "C" fn export_start(}}-#[unsafe(export_name = "[callback][async-lift]local:local/synchronous-transmit#[async]start")]+#[unsafe(export_name = "[callback][async-lift]local:local/synchronous-transmit#start")]unsafe extern "C" fn callback_start(event0: u32, _event1: u32, _event2: u32) -> u32 {unsafe {let state = &mut *(usize::try_from(context_get()).unwrap() as *mut State);diff --git a/crates/test-programs/src/bin/async_yield_callee_stackless.rs b/crates/test-programs/src/bin/async_yield_callee_stackless.rsindex dd7f6d367c..6fd2346071 100644--- a/crates/test-programs/src/bin/async_yield_callee_stackless.rs+++ b/crates/test-programs/src/bin/async_yield_callee_stackless.rs@@ -15,7 +15,7 @@ use {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "[export]local:local/run")]unsafe extern "C" {- #[link_name = "[task-return][async]run"]+ #[link_name = "[task-return]run"]fn task_return_run();}#[cfg(not(target_arch = "wasm32"))]@@ -23,12 +23,12 @@ unsafe extern "C" fn task_return_run() {unreachable!()}-#[unsafe(export_name = "[async-lift]local:local/run#[async]run")]+#[unsafe(export_name = "[async-lift]local:local/run#run")]unsafe extern "C" fn export_run() -> u32 {callback_run(EVENT_NONE, 0, 0)}-#[unsafe(export_name = "[callback][async-lift]local:local/run#[async]run")]+#[unsafe(export_name = "[callback][async-lift]local:local/run#run")]unsafe extern "C" fn callback_run(event0: u32, _event1: u32, _event2: u32) -> u32 {assert!(event0 == EVENT_NONE || event0 == EVENT_CANCELLED);diff --git a/crates/test-programs/src/bin/async_yield_callee_synchronous.rs b/crates/test-programs/src/bin/async_yield_callee_synchronous.rsindex ffa69a66f4..5a13243e8c 100644--- a/crates/test-programs/src/bin/async_yield_callee_synchronous.rs+++ b/crates/test-programs/src/bin/async_yield_callee_synchronous.rs@@ -2,7 +2,7 @@ mod bindings {wit_bindgen::generate!({path: "../misc/component-async-tests/wit",world: "yield-callee",- async: ["-local:local/run#[async]run"],+ async: ["-local:local/run#run"],});use super::Component;diff --git a/crates/test-programs/src/bin/async_yield_caller_cancel.rs b/crates/test-programs/src/bin/async_yield_caller_cancel.rsindex a172c16acb..cc766adbb7 100644--- a/crates/test-programs/src/bin/async_yield_caller_cancel.rs+++ b/crates/test-programs/src/bin/async_yield_caller_cancel.rs@@ -19,7 +19,7 @@ use {#[cfg(target_arch = "wasm32")]#[link(wasm_import_module = "local:local/run")]unsafe extern "C" {- #[link_name = "[async-lower][async]run"]+ #[link_name = "[async-lower]run"]fn run() -> u32;}#[cfg(not(target_arch = "wasm32"))]diff --git a/crates/test-util/src/wast.rs b/crates/test-util/src/wast.rsindex 5df2496a2f..ff86676442 100644--- a/crates/test-util/src/wast.rs+++ b/crates/test-util/src/wast.rs@@ -168,6 +168,16 @@ fn component_test_config(test: &Path) -> TestConfig {ret.component_model_async = Some(true);ret.component_model_async_builtins = Some(true);}+ if parent.ends_with("wasm-tools") {+ ret.memory64 = Some(true);+ ret.threads = Some(true);+ ret.exceptions = Some(true);+ ret.gc = Some(true);+ }+ if parent.ends_with("wasmtime") {+ ret.exceptions = Some(true);+ ret.gc = Some(true);+ }}ret@@ -667,16 +677,8 @@ impl WastTest {let failing_component_model_tests = [// FIXME(#11683)"component-model/test/values/trap-in-post-return.wast",- // Awaiting https://github.com/WebAssembly/component-model/pull/570- "component-model/test/resources/multiple-resources.wast",- "component-model/test/async/empty-wait.wast",- "component-model/test/async/drop-stream.wast",- "component-model/test/async/passing-resources.wast",- "component-model/test/async/async-calls-sync.wast",- "component-model/test/async/partial-stream-copies.wast",- "component-model/test/async/futures-must-write.wast",- "component-model/test/async/cancel-stream.wast",- "component-model/test/async/drop-waitable-set.wast",+ "component-model/test/wasmtime/resources.wast",+ "component-model/test/wasm-tools/naming.wast",];if failing_component_model_tests.iter()diff --git a/crates/wasi-http/src/p3/bindings.rs b/crates/wasi-http/src/p3/bindings.rsindex 4ac74d9402..b3a2280df5 100644--- a/crates/wasi-http/src/p3/bindings.rs+++ b/crates/wasi-http/src/p3/bindings.rs@@ -6,7 +6,7 @@ mod generated {path: "src/p3/wit",world: "wasi:http/proxy",imports: {- "wasi:http/handler.[async]handle": async | store | trappable | tracing,+ "wasi:http/handler.handle": async | store | trappable | tracing,"wasi:http/types.[drop]request": store | trappable | tracing,"wasi:http/types.[drop]response": store | trappable | tracing,"wasi:http/types.[static]request.consume-body": async | store | trappable | tracing,diff --git a/crates/wasmtime/src/runtime/component/concurrent.rs b/crates/wasmtime/src/runtime/component/concurrent.rsindex e19258f1de..f1420c24e3 100644--- a/crates/wasmtime/src/runtime/component/concurrent.rs+++ b/crates/wasmtime/src/runtime/component/concurrent.rs@@ -2906,7 +2906,7 @@ impl Instance {.unwrap())}- /// Implements the `thread.new_indirect` intrinsic.+ /// Implements the `thread.new-indirect` intrinsic.pub(crate) fn thread_new_indirect<T: 'static>(self,mut store: StoreContextMut<T>,@@ -3475,7 +3475,7 @@ pub trait VMComponentAsyncStore {debug_msg_address: u32,) -> Result<()>;- /// The `thread.new_indirect` intrinsic+ /// The `thread.new-indirect` intrinsicfn thread_new_indirect(&mut self,instance: Instance,diff --git a/crates/wasmtime/src/runtime/component/mod.rs b/crates/wasmtime/src/runtime/component/mod.rsindex f826468bfc..2d28f9596b 100644--- a/crates/wasmtime/src/runtime/component/mod.rs+++ b/crates/wasmtime/src/runtime/component/mod.rs@@ -316,7 +316,7 @@ pub(crate) use self::store::ComponentStoreData;/// // means that this is the default already applied meaning that/// // specifying it here would be redundant./// //-/// // "wasi:clocks/monotonic-clock.[async]wait-until": async | store,+/// // "wasi:clocks/monotonic-clock.wait-until": async | store,////// // The `tracing` flag indicates that `tracing!` will be used to log/// // entries and exits into this host API. This can assist with@@ -350,7 +350,7 @@ pub(crate) use self::store::ComponentStoreData;/// // The `ignore_wit` flag discards the WIT-level defaults of a/// // function. For example this `async` WIT function will be ignored/// // and a synchronous function will be generated on the host.-/// "my:local/api.[async]wait": ignore_wit,+/// "my:local/api.wait": ignore_wit,////// // The `exact` flag ensures that the filter, here "f", only matches/// // functions exactly. For example "f" here would only refer to@@ -378,7 +378,7 @@ pub(crate) use self::store::ComponentStoreData;/// // this function should return a tuple of the result produced by the/// // callee and a `TaskExit` future which will resolve when the task/// // (and any transitively created subtasks) have exited.-/// "my:local/api.[async]does-stuff-after-returning": task_exit,+/// "my:local/api.does-stuff-after-returning": task_exit,/// },////// // This can be used to translate WIT return values of the formdiff --git a/crates/wasmtime/src/runtime/component/types.rs b/crates/wasmtime/src/runtime/component/types.rsindex 3d13b0b757..e1badf710a 100644--- a/crates/wasmtime/src/runtime/component/types.rs+++ b/crates/wasmtime/src/runtime/component/types.rs@@ -815,6 +815,11 @@ impl ComponentFunc {Self(Handle::new(index, ty))}+ /// Returns whether this is an async function+ pub fn async_(&self) -> bool {+ self.0.types[self.0.index].async_+ }+/// Iterates over types of function parameters and names.pub fn params(&self) -> impl ExactSizeIterator<Item = (&str, Type)> + '_ {let ty = &self.0.types[self.0.index];diff --git a/src/commands/run.rs b/src/commands/run.rsindex e4c7e46eb4..bfe2fb99f4 100644--- a/src/commands/run.rs+++ b/src/commands/run.rs@@ -710,8 +710,7 @@ impl RunCommand {return None;};let func_name = names.last().expect("at least one name");- let base_func_name = func_name.strip_prefix("[async]").unwrap_or(func_name);- (base_func_name == name).then_some((names, func))+ (func_name == name).then_some((names, func))}).collect()}diff --git a/supply-chain/audits.toml b/supply-chain/audits.tomlindex 892d16ecfb..04815f2bf2 100644--- a/supply-chain/audits.toml+++ b/supply-chain/audits.toml@@ -2863,6 +2863,12 @@ criteria = "safe-to-deploy"delta = "0.239.0 -> 0.240.0"notes = "The Bytecode Alliance is the author of this crate"+[[audits.json-from-wast]]+who = "Alex Crichton <[email protected]>"+criteria = "safe-to-deploy"+delta = "0.240.0 -> 0.241.2"+notes = "The Bytecode Alliance is the author of this crate"+[[audits.leb128]]who = "Nick Fitzgerald <[email protected]>"criteria = "safe-to-deploy"@@ -4215,6 +4221,12 @@ criteria = "safe-to-deploy"delta = "0.239.0 -> 0.240.0"notes = "The Bytecode Alliance is the author of this crate"+[[audits.wasm-compose]]+who = "Alex Crichton <[email protected]>"+criteria = "safe-to-deploy"+delta = "0.240.0 -> 0.241.2"+notes = "The Bytecode Alliance is the author of this crate"+[[audits.wasm-coredump-builder]]who = "Alex Crichton <[email protected]>"criteria = "safe-to-deploy"@@ -4365,6 +4377,12 @@ criteria = "safe-to-deploy"delta = "0.239.0 -> 0.240.0"notes = "The Bytecode Alliance is the author of this crate"+[[audits.wasm-encoder]]+who = "Alex Crichton <[email protected]>"+criteria = "safe-to-deploy"+delta = "0.240.0 -> 0.241.2"+notes = "The Bytecode Alliance is the author of this crate"+[[audits.wasm-metadata]]who = "Alex Crichton <[email protected]>"criteria = "safe-to-deploy"@@ -4395,6 +4413,12 @@ criteria = "safe-to-deploy"delta = "0.239.0 -> 0.240.0"notes = "The Bytecode Alliance is the author of this crate"+[[audits.wasm-metadata]]+who = "Alex Crichton <[email protected]>"+criteria = "safe-to-deploy"+delta = "0.240.0 -> 0.241.2"+notes = "The Bytecode Alliance is the author of this crate"+[[audits.wasm-mutate]]who = "Alex Crichton <[email protected]>"criteria = "safe-to-deploy"@@ -4581,6 +4605,12 @@ criteria = "safe-to-deploy"delta = "0.239.0 -> 0.240.0"notes = "The Bytecode Alliance is the author of this crate"+[[audits.wasm-wave]]+who = "Alex Crichton <[email protected]>"+criteria = "safe-to-deploy"+delta = "0.240.0 -> 0.241.2"+notes = "The Bytecode Alliance is the author of this crate"+[[audits.wasmi]]who = "Robin Freyler <[email protected]>"criteria = "safe-to-run"@@ -4737,6 +4767,12 @@ criteria = "safe-to-deploy"delta = "0.239.0 -> 0.240.0"notes = "The Bytecode Alliance is the author of this crate"+[[audits.wasmparser]]+who = "Alex Crichton <[email protected]>"+criteria = "safe-to-deploy"+delta = "0.240.0 -> 0.241.2"+notes = "The Bytecode Alliance is the author of this crate"+[[audits.wasmparser-nostd]]who = "Alex Crichton <[email protected]>"criteria = "safe-to-run"@@ -4862,6 +4898,12 @@ criteria = "safe-to-deploy"delta = "0.239.0 -> 0.240.0"notes = "The Bytecode Alliance is the author of this crate"+[[audits.wasmprinter]]+who = "Alex Crichton <[email protected]>"+criteria = "safe-to-deploy"+delta = "0.240.0 -> 0.241.2"+notes = "The Bytecode Alliance is the author of this crate"+[[audits.wast]]who = "Alex Crichton <[email protected]>"criteria = "safe-to-deploy"@@ -4970,6 +5012,12 @@ criteria = "safe-to-deploy"delta = "239.0.0 -> 240.0.0"notes = "The Bytecode Alliance is the author of this crate"+[[audits.wast]]+who = "Alex Crichton <[email protected]>"+criteria = "safe-to-deploy"+delta = "240.0.0 -> 241.0.2"+notes = "The Bytecode Alliance is the author of this crate"+[[audits.wat]]who = "Alex Crichton <[email protected]>"criteria = "safe-to-deploy"@@ -5066,6 +5114,12 @@ criteria = "safe-to-deploy"delta = "1.239.0 -> 1.240.0"notes = "The Bytecode Alliance is the author of this crate"+[[audits.wat]]+who = "Alex Crichton <[email protected]>"+criteria = "safe-to-deploy"+delta = "1.240.0 -> 1.241.2"+notes = "The Bytecode Alliance is the author of this crate"+[[audits.webpki-roots]]who = "Pat Hickey <[email protected]>"criteria = "safe-to-deploy"@@ -5129,6 +5183,12 @@ criteria = "safe-to-deploy"delta = "0.45.1 -> 0.46.0"notes = "The Bytecode Alliance is the author of this crate"+[[audits.wit-bindgen]]+who = "Alex Crichton <[email protected]>"+criteria = "safe-to-deploy"+delta = "0.46.0 -> 0.48.0"+notes = "The Bytecode Alliance is the author of this crate"+[[audits.wit-bindgen-core]]who = "Joel Dice <[email protected]>"criteria = "safe-to-run"@@ -5152,6 +5212,12 @@ criteria = "safe-to-deploy"delta = "0.45.1 -> 0.46.0"notes = "The Bytecode Alliance is the author of this crate"+[[audits.wit-bindgen-core]]+who = "Alex Crichton <[email protected]>"+criteria = "safe-to-deploy"+delta = "0.46.0 -> 0.48.0"+notes = "The Bytecode Alliance is the author of this crate"+[[audits.wit-bindgen-rt]]who = "Joel Dice <[email protected]>"criteria = "safe-to-run"@@ -5180,6 +5246,12 @@ criteria = "safe-to-deploy"delta = "0.45.1 -> 0.46.0"notes = "The Bytecode Alliance is the author of this crate"+[[audits.wit-bindgen-rust]]+who = "Alex Crichton <[email protected]>"+criteria = "safe-to-deploy"+delta = "0.46.0 -> 0.48.0"+notes = "The Bytecode Alliance is the author of this crate"+[[audits.wit-bindgen-rust-macro]]who = "Joel Dice <[email protected]>"criteria = "safe-to-run"@@ -5203,6 +5275,12 @@ criteria = "safe-to-deploy"delta = "0.45.1 -> 0.46.0"notes = "The Bytecode Alliance is the author of this crate"+[[audits.wit-bindgen-rust-macro]]+who = "Alex Crichton <[email protected]>"+criteria = "safe-to-deploy"+delta = "0.46.0 -> 0.48.0"+notes = "The Bytecode Alliance is the author of this crate"+[[audits.wit-component]]who = "Alex Crichton <[email protected]>"criteria = "safe-to-deploy"@@ -5233,6 +5311,12 @@ criteria = "safe-to-deploy"delta = "0.239.0 -> 0.240.0"notes = "The Bytecode Alliance is the author of this crate"+[[audits.wit-component]]+who = "Alex Crichton <[email protected]>"+criteria = "safe-to-deploy"+delta = "0.240.0 -> 0.241.2"+notes = "The Bytecode Alliance is the author of this crate"+[[audits.wit-parser]]who = "Alex Crichton <[email protected]>"criteria = "safe-to-deploy"@@ -5311,6 +5395,12 @@ criteria = "safe-to-deploy"delta = "0.239.0 -> 0.240.0"notes = "The Bytecode Alliance is the author of this crate"+[[audits.wit-parser]]+who = "Alex Crichton <[email protected]>"+criteria = "safe-to-deploy"+delta = "0.240.0 -> 0.241.2"+notes = "The Bytecode Alliance is the author of this crate"+[[audits.xattr]]who = "Andrew Brown <[email protected]>"criteria = "safe-to-deploy"diff --git a/tests/all/component_model/async.rs b/tests/all/component_model/async.rsindex ec7e6b6067..b3e816c758 100644--- a/tests/all/component_model/async.rs+++ b/tests/all/component_model/async.rs@@ -342,7 +342,7 @@ async fn task_deletion() -> Result<()> {(import "" "mem" (memory 1))(import "" "task.return" (func $task-return (param i32)))(import "" "task.cancel" (func $task-cancel))- (import "" "thread.new_indirect" (func $thread-new-indirect (param i32 i32) (result i32)))+ (import "" "thread.new-indirect" (func $thread-new-indirect (param i32 i32) (result i32)))(import "" "thread.suspend" (func $thread-suspend (result i32)))(import "" "thread.suspend-cancellable" (func $thread-suspend-cancellable (result i32)))(import "" "thread.yield-to" (func $thread-yield-to (param i32) (result i32)))@@ -370,8 +370,8 @@ async fn task_deletion() -> Result<()> {(drop (call $thread-suspend)))(func $yield-loop (param i32)- (loop $top- (drop (call $thread-yield))+ (loop $top+ (drop (call $thread-yield))(br $top)))(func (export "explicit-thread-calls-return-stackful")@@ -385,7 +385,7 @@ async fn task_deletion() -> Result<()> {(func (export "cb") (param i32 i32 i32) (result i32)(unreachable))-+(func (export "explicit-thread-suspends-sync") (result i32)(call $thread-resume-later(call $thread-new-indirect (global.get $suspend-ftbl-idx) (i32.const 42)))@@ -417,24 +417,23 @@ async fn task_deletion() -> Result<()> {(call $thread-new-indirect (global.get $suspend-ftbl-idx) (i32.const 42)))(call $task-return (i32.const 42))(i32.const 0 (; EXIT ;)))-- ;; Initialize the function table that will be used by thread.new_indirect+ ;; Initialize the function table that will be used by thread.new-indirect(elem (table $indirect-function-table) (i32.const 0 (; call-return-ftbl-idx ;)) func $call-return)(elem (table $indirect-function-table) (i32.const 1 (; suspend-ftbl-idx ;)) func $suspend)(elem (table $indirect-function-table) (i32.const 2 (; yield-loop-ftbl-idx ;)) func $yield-loop)- )+ );; Instantiate the libc module to get the table(core instance $libc (instantiate $libc))- ;; Get access to `thread.new_indirect` that uses the table from libc+ ;; Get access to `thread.new-indirect` that uses the table from libc(core type $start-func-ty (func (param i32)))(alias core export $libc "__indirect_function_table" (core table $indirect-function-table))(core func $task-return (canon task.return (result u32)))(core func $task-cancel (canon task.cancel))- (core func $thread-new-indirect- (canon thread.new_indirect $start-func-ty (table $indirect-function-table)))+ (core func $thread-new-indirect+ (canon thread.new-indirect $start-func-ty (table $indirect-function-table)))(core func $thread-yield (canon thread.yield))(core func $thread-yield-cancellable (canon thread.yield cancellable))(core func $thread-index (canon thread.index))@@ -456,7 +455,7 @@ async fn task_deletion() -> Result<()> {(export "mem" (memory $memory "mem"))(export "task.return" (func $task-return))(export "task.cancel" (func $task-cancel))- (export "thread.new_indirect" (func $thread-new-indirect))+ (export "thread.new-indirect" (func $thread-new-indirect))(export "thread.index" (func $thread-index))(export "thread.yield-to" (func $thread-yield-to))(export "thread.yield-to-cancellable" (func $thread-yield-to-cancellable))@@ -472,25 +471,25 @@ async fn task_deletion() -> Result<()> {(export "waitable-set.new" (func $waitable-set.new))))(with "libc" (instance $libc))))- (func (export "explicit-thread-calls-return-stackful") (result u32)+ (func (export "explicit-thread-calls-return-stackful") (result u32)(canon lift (core func $cm "explicit-thread-calls-return-stackful") async))- (func (export "explicit-thread-calls-return-stackless") (result u32)+ (func (export "explicit-thread-calls-return-stackless") (result u32)(canon lift (core func $cm "explicit-thread-calls-return-stackless") async (callback (func $cm "cb"))))- (func (export "explicit-thread-suspends-sync") (result u32)+ (func (export "explicit-thread-suspends-sync") (result u32)(canon lift (core func $cm "explicit-thread-suspends-sync")))- (func (export "explicit-thread-suspends-stackful") (result u32)+ (func (export "explicit-thread-suspends-stackful") (result u32)(canon lift (core func $cm "explicit-thread-suspends-stackful") async))- (func (export "explicit-thread-suspends-stackless") (result u32)+ (func (export "explicit-thread-suspends-stackless") (result u32)(canon lift (core func $cm "explicit-thread-suspends-stackless") async (callback (func $cm "cb"))))- (func (export "explicit-thread-yield-loops-sync") (result u32)+ (func (export "explicit-thread-yield-loops-sync") (result u32)(canon lift (core func $cm "explicit-thread-yield-loops-sync")))- (func (export "explicit-thread-yield-loops-stackful") (result u32)+ (func (export "explicit-thread-yield-loops-stackful") (result u32)(canon lift (core func $cm "explicit-thread-yield-loops-stackful") async))- (func (export "explicit-thread-yield-loops-stackless") (result u32)+ (func (export "explicit-thread-yield-loops-stackless") (result u32)(canon lift (core func $cm "explicit-thread-yield-loops-stackless") async (callback (func $cm "cb")))))- (component $D+ (component $D(import "explicit-thread-calls-return-stackful" (func $explicit-thread-calls-return-stackful (result u32)))(import "explicit-thread-calls-return-stackless" (func $explicit-thread-calls-return-stackless (result u32)))(import "explicit-thread-suspends-sync" (func $explicit-thread-suspends-sync (result u32)))@@ -541,7 +540,7 @@ async fn task_deletion() -> Result<()> {(if (i32.eq (i32.and (local.get 0) (i32.const 0xF)) (i32.const 2 (; RETURNED ;)))(then (call $check (i32.load (local.get $retp))))- (else+ (else(call $waitable.join (i32.shr_u (local.get 0) (i32.const 4)) (local.get $ws))(drop (call $waitable-set.wait (local.get $ws) (local.get $ws-retp)))(call $check (i32.load (local.get $retp)))))@@ -558,7 +557,7 @@ async fn task_deletion() -> Result<()> {(call $check (call $explicit-thread-yield-loops-sync))(call $check (call $explicit-thread-yield-loops-stackful))(call $check (call $explicit-thread-yield-loops-stackless))-+(call $check-async (call $explicit-thread-calls-return-stackless-async (local.get $retp)))(call $check-async (call $explicit-thread-calls-return-stackful-async (local.get $retp)))(call $check-async (call $explicit-thread-suspends-sync-async (local.get $retp)))diff --git a/tests/all/component_model/bindgen.rs b/tests/all/component_model/bindgen.rsindex 387f1c2f94..3e8975f7cc 100644--- a/tests/all/component_model/bindgen.rs+++ b/tests/all/component_model/bindgen.rs@@ -109,11 +109,11 @@ mod no_imports_concurrent {(with "" (instance (export "task.return" (func $task-return))))))- (func $f (export "[async]bar")+ (func $f (export "bar")(canon lift (core func $i "bar") async (callback (func $i "callback"))))- (instance $i (export "[async]foo" (func $f)))+ (instance $i (export "foo" (func $f)))(export "foo" (instance $i)))"#,@@ -229,7 +229,7 @@ mod one_import_concurrent {r#"(component(import "foo" (instance $foo-instance- (export "[async]foo" (func))+ (export "foo" (func))))(core module $libc(memory (export "memory") 1)@@ -246,7 +246,7 @@ mod one_import_concurrent {)(func (export "callback") (param i32 i32 i32) (result i32) unreachable))- (core func $foo (canon lower (func $foo-instance "[async]foo") async (memory $libc-instance "memory")))+ (core func $foo (canon lower (func $foo-instance "foo") async (memory $libc-instance "memory")))(core func $task-return (canon task.return))(core instance $i (instantiate $m(with "" (instance@@ -255,11 +255,11 @@ mod one_import_concurrent {))))- (func $f (export "[async]bar")+ (func $f (export "bar")(canon lift (core func $i "bar") async (callback (func $i "callback"))))- (instance $i (export "[async]foo" (func $f)))+ (instance $i (export "foo" (func $f)))(export "foo" (instance $i)))"#,diff --git a/tests/all/component_model/func.rs b/tests/all/component_model/func.rsindex 08194b9c46..3e3d6f964e 100644--- a/tests/all/component_model/func.rs+++ b/tests/all/component_model/func.rs@@ -968,11 +968,11 @@ async fn missing_task_return_call_stackless_explicit_thread() -> Result<()> {(table (export "__indirect_function_table") 1 funcref))(core module $m(import "" "task.return" (func $task-return))- (import "" "thread.new_indirect" (func $thread-new-indirect (param i32 i32) (result i32)))+ (import "" "thread.new-indirect" (func $thread-new-indirect (param i32 i32) (result i32)))(import "" "thread.resume-later" (func $thread-resume-later (param i32)))(import "libc" "__indirect_function_table" (table $indirect-function-table 1 funcref))(func $thread-start (param i32) (; empty ;))- (elem (table $indirect-function-table) (i32.const 0) func $thread-start)+ (elem (table $indirect-function-table) (i32.const 0) func $thread-start)(func (export "foo") (result i32)(call $thread-resume-later(call $thread-new-indirect (i32.const 0) (i32.const 0)))@@ -983,13 +983,13 @@ async fn missing_task_return_call_stackless_explicit_thread() -> Result<()> {(core instance $libc (instantiate $libc))(core type $start-func-ty (func (param i32)))(alias core export $libc "__indirect_function_table" (core table $indirect-function-table))- (core func $thread-new-indirect- (canon thread.new_indirect $start-func-ty (table $indirect-function-table)))+ (core func $thread-new-indirect+ (canon thread.new-indirect $start-func-ty (table $indirect-function-table)))(core func $thread-resume-later (canon thread.resume-later))(core func $task-return (canon task.return))(core instance $i (instantiate $m- (with "" (instance- (export "thread.new_indirect" (func $thread-new-indirect))+ (with "" (instance+ (export "thread.new-indirect" (func $thread-new-indirect))(export "thread.resume-later" (func $thread-resume-later))(export "task.return" (func $task-return))))@@ -1010,11 +1010,11 @@ async fn missing_task_return_call_stackful_explicit_thread() -> Result<()> {(table (export "__indirect_function_table") 1 funcref))(core module $m(import "" "task.return" (func $task-return))- (import "" "thread.new_indirect" (func $thread-new-indirect (param i32 i32) (result i32)))+ (import "" "thread.new-indirect" (func $thread-new-indirect (param i32 i32) (result i32)))(import "" "thread.resume-later" (func $thread-resume-later (param i32)))(import "libc" "__indirect_function_table" (table $indirect-function-table 1 funcref))(func $thread-start (param i32) (; empty ;))- (elem (table $indirect-function-table) (i32.const 0) func $thread-start)+ (elem (table $indirect-function-table) (i32.const 0) func $thread-start)(func (export "foo")(call $thread-resume-later(call $thread-new-indirect (i32.const 0) (i32.const 0)))@@ -1023,13 +1023,13 @@ async fn missing_task_return_call_stackful_explicit_thread() -> Result<()> {(core instance $libc (instantiate $libc))(core type $start-func-ty (func (param i32)))(alias core export $libc "__indirect_function_table" (core table $indirect-function-table))- (core func $thread-new-indirect- (canon thread.new_indirect $start-func-ty (table $indirect-function-table)))+ (core func $thread-new-indirect+ (canon thread.new-indirect $start-func-ty (table $indirect-function-table)))(core func $thread-resume-later (canon thread.resume-later))(core func $task-return (canon task.return))(core instance $i (instantiate $m- (with "" (instance- (export "thread.new_indirect" (func $thread-new-indirect))+ (with "" (instance+ (export "thread.new-indirect" (func $thread-new-indirect))(export "thread.resume-later" (func $thread-resume-later))(export "task.return" (func $task-return))))diff --git a/tests/component-model b/tests/component-modelindex 8021b5101b..1ba749ebb9 160000--- a/tests/component-model+++ b/tests/component-model@@ -1 +1 @@-Subproject commit 8021b5101bfefd00048230f92a206486341e8b0d+Subproject commit 1ba749ebb91c52ceb9040bac4dec0705cb034a96diff --git a/tests/misc_testsuite/component-model-threading/many-threads-indexed.wast b/tests/misc_testsuite/component-model-threading/many-threads-indexed.wastindex 852b7f00c9..be37c06e4b 100644--- a/tests/misc_testsuite/component-model-threading/many-threads-indexed.wast+++ b/tests/misc_testsuite/component-model-threading/many-threads-indexed.wast@@ -12,12 +12,12 @@;; 4 | 00;; 5 | 08-;; After all threads have spawned and written their indices to the byte position given by their assigned number,+;; After all threads have spawned and written their indices to the byte position given by their assigned number,;; the buffer state will be:;; 4 3 5 2 1;; The main thread will then yield to these threads in the order that they are stored in the buffer,-;; and they will write their assigned number into the buffer, after the indices.+;; and they will write their assigned number into the buffer, after the indices.;; After all threads have been yielded to, the buffer contents will be:;; 4 3 5 2 1 0 4 8 12 16@@ -27,10 +27,10 @@;; Defines the table for the thread start function(core module $libc(table (export "__indirect_function_table") 1 funcref))- ;; Defines the thread start function and a function that calls thread.new_indirect+ ;; Defines the thread start function and a function that calls thread.new-indirect(core module $m;; Import the threading builtins and the table from libc- (import "" "thread.new_indirect" (func $thread-new-indirect (param i32 i32) (result i32)))+ (import "" "thread.new-indirect" (func $thread-new-indirect (param i32 i32) (result i32)))(import "" "thread.suspend" (func $thread-suspend (result i32)))(import "" "thread.yield-to" (func $thread-yield-to (param i32) (result i32)))(import "" "thread.switch-to" (func $thread-switch-to (param i32) (result i32)))@@ -53,17 +53,17 @@(i32.store (local.get 0) (call $thread-index))(drop (call $thread-suspend))(i32.store (global.get $g) (local.get 0))- (global.set $g+ (global.set $g(i32.add (global.get $g) (i32.const 4))))(export "thread-start" (func $thread-start));; Initialize the function table with our thread-start function; this will be- ;; used by thread.new_indirect+ ;; used by thread.new-indirect(elem (table $indirect-function-table) (i32.const 0) func $thread-start)(func $new-thread (param i32)- (drop- (call $thread-yield-to+ (drop+ (call $thread-yield-to(call $thread-new-indirect (i32.const 0) (local.get 0)))));; The main entry point@@ -88,18 +88,18 @@(if (i32.ne (i32.load (i32.const 28)) (i32.const 8)) (then unreachable))(if (i32.ne (i32.load (i32.const 32)) (i32.const 12)) (then unreachable))(if (i32.ne (i32.load (i32.const 36)) (i32.const 16)) (then unreachable))-+;; Sentinel value- (i32.const 42)))-+ (i32.const 42)))+;; Instantiate the libc module to get the table(core instance $libc (instantiate $libc))- ;; Get access to `thread.new_indirect` that uses the table from libc+ ;; Get access to `thread.new-indirect` that uses the table from libc(core type $start-func-ty (func (param i32)))(alias core export $libc "__indirect_function_table" (core table $indirect-function-table))- (core func $thread-new-indirect- (canon thread.new_indirect $start-func-ty (table $indirect-function-table)))+ (core func $thread-new-indirect+ (canon thread.new-indirect $start-func-ty (table $indirect-function-table)))(core func $thread-yield (canon thread.yield))(core func $thread-index (canon thread.index))(core func $thread-yield-to (canon thread.yield-to))@@ -109,9 +109,9 @@;; Instantiate the main module(core instance $i (- instantiate $m+ instantiate $m(with "" (instance- (export "thread.new_indirect" (func $thread-new-indirect))+ (export "thread.new-indirect" (func $thread-new-indirect))(export "thread.index" (func $thread-index))(export "thread.yield-to" (func $thread-yield-to))(export "thread.yield" (func $thread-yield))@@ -123,4 +123,4 @@;; Export the main entry point(func (export "run") (result u32) (canon lift (core func $i "run"))))-(assert_return (invoke "run") (u32.const 42))\ No newline at end of file+(assert_return (invoke "run") (u32.const 42))diff --git a/tests/misc_testsuite/component-model-threading/stackful-cancellation.wast b/tests/misc_testsuite/component-model-threading/stackful-cancellation.wastindex 4eaa0abad9..e1ca4ab55b 100644--- a/tests/misc_testsuite/component-model-threading/stackful-cancellation.wast+++ b/tests/misc_testsuite/component-model-threading/stackful-cancellation.wast@@ -5,7 +5,7 @@;;! reference_types = true;; Tests that cancellation works with the async threading intrinsics.-;; Consists of two components, C and D. C implements functions that mix cancellable and uncancellable yields and suspensions.+;; Consists of two components, C and D. C implements functions that mix cancellable and uncancellable yields and suspensions.;; D calls these functions and cancels the resulting subtasks, ensuring that cancellation is only seen when expected.;; -- Component C --@@ -46,7 +46,7 @@(core module $CM(import "" "mem" (memory 1))(import "" "task.cancel" (func $task-cancel))- (import "" "thread.new_indirect" (func $thread-new-indirect (param i32 i32) (result i32)))+ (import "" "thread.new-indirect" (func $thread-new-indirect (param i32 i32) (result i32)))(import "" "thread.suspend" (func $thread-suspend (result i32)))(import "" "thread.suspend-cancellable" (func $thread-suspend-cancellable (result i32)))(import "" "thread.yield-to" (func $thread-yield-to (param i32) (result i32)))@@ -102,7 +102,7 @@(if (i32.ne (call $thread-yield) (i32.const 0)) (then unreachable)))- ;; Initialize the function table that will be used by thread.new_indirect+ ;; Initialize the function table that will be used by thread.new-indirect(elem (table $indirect-function-table) (i32.const 0 (; wake-from-suspend-ftbl-idx ;)) func $wake-from-suspend)(elem (table $indirect-function-table) (i32.const 1 (; just-yield-ftbl-idx ;)) func $just-yield)@@ -138,7 +138,7 @@;; Spawn a new thread that will wake us up from our uncancellable suspend and schedule;; it to resume after we suspend.- (call $thread-resume-later+ (call $thread-resume-later(call $thread-new-indirect (global.get $wake-from-suspend-ftbl-idx) (local.get $wake-from-suspend-argp)));; Request suspension. We will not be woken up by cancellation, because this is an uncancellable@@ -164,8 +164,8 @@(local.set $thread-index(call $thread-new-indirect (global.get $wake-from-suspend-ftbl-idx) (local.get $wake-from-suspend-argp)))- ;; Request suspension by switching to the spawned thread.- ;; We will not be woken up by cancellation, because this is an uncancellable suspend.+ ;; Request suspension by switching to the spawned thread.+ ;; We will not be woken up by cancellation, because this is an uncancellable suspend.;; We will be woken up by the other thread we spawned above, which will be resumed after;; the supertask cancels our subtask.(if (i32.ne (call $thread-switch-to (local.get $thread-index)) (i32.const 0)) (then unreachable))@@ -173,17 +173,17 @@(if (i32.ne (call $thread-switch-to-cancellable (local.get $thread-index)) (i32.const 1)) (then unreachable))(call $task-cancel))- )+ );; Instantiate the libc module to get the table(core instance $libc (instantiate $libc))- ;; Get access to `thread.new_indirect` that uses the table from libc+ ;; Get access to `thread.new-indirect` that uses the table from libc(core type $start-func-ty (func (param i32)))(alias core export $libc "__indirect_function_table" (core table $indirect-function-table))(core func $task-cancel (canon task.cancel))- (core func $thread-new-indirect- (canon thread.new_indirect $start-func-ty (table $indirect-function-table)))+ (core func $thread-new-indirect+ (canon thread.new-indirect $start-func-ty (table $indirect-function-table)))(core func $thread-yield (canon thread.yield))(core func $thread-yield-cancellable (canon thread.yield cancellable))(core func $thread-index (canon thread.index))@@ -205,7 +205,7 @@(with "" (instance(export "mem" (memory $memory "mem"))(export "task.cancel" (func $task-cancel))- (export "thread.new_indirect" (func $thread-new-indirect))+ (export "thread.new-indirect" (func $thread-new-indirect))(export "thread.index" (func $thread-index))(export "thread.yield-to" (func $thread-yield-to))(export "thread.yield-to-cancellable" (func $thread-yield-to-cancellable))@@ -228,7 +228,7 @@(func (export "run-switch-to") (param "fut" $FT) (result u32) (canon lift (core func $cm "run-switch-to") async)))- (component $D+ (component $D(type $FT (future))(import "run-yield" (func $run-yield (result u32)))(import "run-yield-to" (func $run-yield-to (param "fut" $FT) (result u32)))@@ -250,7 +250,7 @@(import "" "future.new" (func $future.new (result i64)))(import "" "future.write" (func $future.write (param i32 i32) (result i32)))(import "" "thread.yield" (func $thread-yield (result i32)))-+(func $run-test (param $test-id i32) (result i32)(local $ret i32) (local $subtask i32)(local $ws i32) (local $event_code i32)@@ -297,12 +297,12 @@;; If we're not testing run-yield, the subtask is expecting a write to our future, so write to it(if (i32.ne (local.get $test-id) (i32.const 0))- (then+ (then(local.set $ret (call $future.write (local.get $futw) (i32.const 0xdeadbeef)));; The write should succeed(if (i32.ne (i32.const 0 (; COMPLETED ;)) (local.get $ret))(then unreachable))))-+;; Wait on the subtask, which will eventually progress to a cancellable yield/suspend and acknowledge the cancellation(local.set $ws (call $waitable-set.new))(call $waitable.join (local.get $subtask) (local.get $ws))@@ -314,7 +314,7 @@(if (i32.ne (local.get $subtask) (i32.load (local.get $wait-retp)))(then unreachable));; Ensure the subtask was cancelled before it returned- (if (i32.ne (i32.const 4 (; CANCELLED_BEFORE_RETURNED=4 | (0<<4) ;))+ (if (i32.ne (i32.const 4 (; CANCELLED_BEFORE_RETURNED=4 | (0<<4) ;))(i32.load offset=4 (local.get $wait-retp)))(then unreachable))@@ -382,4 +382,4 @@(func (export "run") (alias export $d "run")))-(assert_return (invoke "run") (u32.const 42))\ No newline at end of file+(assert_return (invoke "run") (u32.const 42))diff --git a/tests/misc_testsuite/component-model-threading/threading-builtins.wast b/tests/misc_testsuite/component-model-threading/threading-builtins.wastindex 2402f4bb50..2ef8104eee 100644--- a/tests/misc_testsuite/component-model-threading/threading-builtins.wast+++ b/tests/misc_testsuite/component-model-threading/threading-builtins.wast@@ -8,10 +8,10 @@;; Defines the table for the thread start function(core module $libc(table (export "__indirect_function_table") 1 funcref))- ;; Defines the thread start function and a function that calls thread.new_indirect+ ;; Defines the thread start function and a function that calls thread.new-indirect(core module $m;; Import the threading builtins and the table from libc- (import "" "thread.new_indirect" (func $thread-new-indirect (param i32 i32) (result i32)))+ (import "" "thread.new-indirect" (func $thread-new-indirect (param i32 i32) (result i32)))(import "" "thread.suspend" (func $thread-suspend (result i32)))(import "" "thread.yield-to" (func $thread-yield-to (param i32) (result i32)))(import "" "thread.switch-to" (func $thread-switch-to (param i32) (result i32)))@@ -43,7 +43,7 @@(export "thread-start" (func $thread-start));; Initialize the function table with our thread-start function; this will be- ;; used by thread.new_indirect+ ;; used by thread.new-indirect(elem (table $indirect-function-table) (i32.const 0) func $thread-start);; The main entry point, which spawns a new thread to run `thread-start`, passing 42@@ -52,8 +52,8 @@;; Store the main thread's index for the spawned thread to yield to(global.set $main-thread-index (call $thread-index));; Create a new thread, which starts suspended, and switch to it- (drop- (call $thread-switch-to+ (drop+ (call $thread-switch-to(call $thread-new-indirect (i32.const 0) (i32.const 42))));; After the thread yields back to us, check that the global was set to 42(if (i32.ne (global.get $g) (i32.const 42)) (then unreachable))@@ -67,15 +67,15 @@(if (i32.ne (global.get $g) (i32.const 44)) (then unreachable));; Return success(i32.const 42)))-+;; Instantiate the libc module to get the table(core instance $libc (instantiate $libc))- ;; Get access to `thread.new_indirect` that uses the table from libc+ ;; Get access to `thread.new-indirect` that uses the table from libc(core type $start-func-ty (func (param i32)))(alias core export $libc "__indirect_function_table" (core table $indirect-function-table))- (core func $thread-new-indirect- (canon thread.new_indirect $start-func-ty (table $indirect-function-table)))+ (core func $thread-new-indirect+ (canon thread.new-indirect $start-func-ty (table $indirect-function-table)))(core func $thread-yield (canon thread.yield))(core func $thread-index (canon thread.index))(core func $thread-yield-to (canon thread.yield-to))@@ -85,9 +85,9 @@;; Instantiate the main module(core instance $i (- instantiate $m- (with "" (instance- (export "thread.new_indirect" (func $thread-new-indirect))+ instantiate $m+ (with "" (instance+ (export "thread.new-indirect" (func $thread-new-indirect))(export "thread.index" (func $thread-index))(export "thread.yield-to" (func $thread-yield-to))(export "thread.yield" (func $thread-yield))@@ -99,4 +99,4 @@;; Export the main entry point(func (export "run") (result u32) (canon lift (core func $i "run"))))-(assert_return (invoke "run") (u32.const 42))\ No newline at end of file+(assert_return (invoke "run") (u32.const 42))diff --git a/tests/wasi.rs b/tests/wasi.rsindex be1d7c18d2..054e9c6749 100644--- a/tests/wasi.rs+++ b/tests/wasi.rs@@ -91,6 +91,11 @@ const KNOWN_FAILURES: &[&str] = &["symlink_loop",#[cfg(windows)]"unlink_file_trailing_slashes",+ // Once cm-async changes have percolated this can be removed.+ "filesystem-flags-and-type",+ "multi-clock-wait",+ "monotonic-clock",+ "filesystem-advise",];fn main() -> Result<()> {