Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
176 changes: 124 additions & 52 deletions Cargo.lock

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.247.0", default-features = false, features = ['simd'] }
wat = "1.247.0"
wast = "247.0.0"
wasmprinter = "0.247.0"
wasm-encoder = "0.247.0"
wasm-smith = "0.247.0"
wasm-mutate = "0.247.0"
wit-parser = "0.247.0"
wit-component = "0.247.0"
wasm-wave = "0.247.0"
wasm-compose = { version = "0.247.0", default-features = false }
json-from-wast = "0.247.0"
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"

wstd = "0.6.5"
wasip2 = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion ci/miri-provenance-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ compile() {
-O memory-guard-size=0 \
-O signals-based-traps=n \
-D guest-debug=y \
-W function-references,component-model-async,component-model-async-stackful,component-model-async-builtins,component-model-error-context
-W function-references,component-model-async,component-model-async-stackful,component-model-more-async-builtins,component-model-error-context
}

compile ./tests/all/pulley_provenance_test.wat
Expand Down
4 changes: 2 additions & 2 deletions crates/c-api/include/wasmtime/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -917,9 +917,9 @@ WASMTIME_CONFIG_PROP(void, wasm_component_model_async, bool)
* component model.
*
* For more information see the Rust documentation at
* https://docs.wasmtime.dev/api/wasmtime/struct.Config.html#method.wasm_component_model_async_builtins.
* https://docs.wasmtime.dev/api/wasmtime/struct.Config.html#method.wasm_component_model_more_async_builtins.
*/
WASMTIME_CONFIG_PROP(void, wasm_component_model_async_builtins, bool)
WASMTIME_CONFIG_PROP(void, wasm_component_model_more_async_builtins, bool)

/**
* \brief Configures whether stackful coroutine support is enabled for async
Expand Down
7 changes: 4 additions & 3 deletions crates/c-api/include/wasmtime/config.hh
Original file line number Diff line number Diff line change
Expand Up @@ -697,10 +697,11 @@ public:
* \brief Configures whether async built-in intrinsics are enabled for the
* component model.
*
* https://docs.wasmtime.dev/api/wasmtime/struct.Config.html#method.wasm_component_model_async_builtins
* https://docs.wasmtime.dev/api/wasmtime/struct.Config.html#method.wasm_component_model_more_async_builtins
*/
void wasm_component_model_async_builtins(bool enable) {
wasmtime_config_wasm_component_model_async_builtins_set(ptr.get(), enable);
void wasm_component_model_more_async_builtins(bool enable) {
wasmtime_config_wasm_component_model_more_async_builtins_set(ptr.get(),
enable);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions crates/c-api/src/component/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ pub extern "C" fn wasmtime_config_wasm_component_model_async_set(

#[unsafe(no_mangle)]
#[cfg(feature = "component-model-async")]
pub extern "C" fn wasmtime_config_wasm_component_model_async_builtins_set(
pub extern "C" fn wasmtime_config_wasm_component_model_more_async_builtins_set(
c: &mut wasm_config_t,
enable: bool,
) {
c.config.wasm_component_model_async_builtins(enable);
c.config.wasm_component_model_more_async_builtins(enable);
}

#[unsafe(no_mangle)]
Expand Down
6 changes: 3 additions & 3 deletions crates/c-api/tests/component/async.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ using wasmtime::Store;

TEST(component_async, config) {
Config config;
wasmtime_config_wasm_component_model_async_set(config.capi(), true);
wasmtime_config_wasm_component_model_async_builtins_set(config.capi(), true);
wasmtime_config_wasm_component_model_async_stackful_set(config.capi(), true);
config.wasm_component_model_async(true);
config.wasm_component_model_more_async_builtins(true);
config.wasm_component_model_async_stackful(true);
Engine engine(std::move(config));
}

Expand Down
4 changes: 2 additions & 2 deletions crates/cli-flags/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ wasmtime_option_group! {
pub component_model_async: Option<bool>,
/// Component model support for async lifting/lowering: this corresponds
/// to the 🚝 emoji in the component model specification.
pub component_model_async_builtins: Option<bool>,
pub component_model_more_async_builtins: Option<bool>,
/// Component model support for async lifting/lowering: this corresponds
/// to the 🚟 emoji in the component model specification.
pub component_model_async_stackful: Option<bool>,
Expand Down Expand Up @@ -1202,7 +1202,7 @@ impl CommonOptions {
handle_conditionally_compiled! {
("component-model", component_model, wasm_component_model)
("component-model-async", component_model_async, wasm_component_model_async)
("component-model-async", component_model_async_builtins, wasm_component_model_async_builtins)
("component-model-async", component_model_more_async_builtins, wasm_component_model_more_async_builtins)
("component-model-async", component_model_async_stackful, wasm_component_model_async_stackful)
("component-model-async", component_model_threading, wasm_component_model_threading)
("component-model", component_model_error_context, wasm_component_model_error_context)
Expand Down
14 changes: 10 additions & 4 deletions crates/environ/src/component/translate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1127,15 +1127,21 @@ impl<'a, 'data> Translator<'a, 'data> {
core_func_index += 1;
LocalInitializer::ErrorContextDrop { func }
}
wasmparser::CanonicalFunction::ContextGet(i) => {
wasmparser::CanonicalFunction::ContextGet { slot, ty } => {
if ty != wasmparser::ValType::I32 {
bail!("unsupported context.get type: {ty:?}");
}
let func = self.core_func_signature(core_func_index)?;
core_func_index += 1;
LocalInitializer::ContextGet { i, func }
LocalInitializer::ContextGet { i: slot, func }
}
wasmparser::CanonicalFunction::ContextSet(i) => {
wasmparser::CanonicalFunction::ContextSet { slot, ty } => {
if ty != wasmparser::ValType::I32 {
bail!("unsupported context.set type: {ty:?}");
}
let func = self.core_func_signature(core_func_index)?;
core_func_index += 1;
LocalInitializer::ContextSet { i, func }
LocalInitializer::ContextSet { i: slot, func }
}
wasmparser::CanonicalFunction::ThreadIndex => {
let func = self.core_func_signature(core_func_index)?;
Expand Down
10 changes: 5 additions & 5 deletions crates/fuzzing/src/generators/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ impl Config {
extended_const,
wide_arithmetic,
component_model_async,
component_model_async_builtins,
component_model_more_async_builtins,
component_model_async_stackful,
component_model_threading,
component_model_error_context,
Expand All @@ -163,8 +163,8 @@ impl Config {
self.module_config.function_references_enabled =
function_references.or(gc).unwrap_or(false);
self.module_config.component_model_async = component_model_async.unwrap_or(false);
self.module_config.component_model_async_builtins =
component_model_async_builtins.unwrap_or(false);
self.module_config.component_model_more_async_builtins =
component_model_more_async_builtins.unwrap_or(false);
self.module_config.component_model_async_stackful =
component_model_async_stackful.unwrap_or(false);
self.module_config.component_model_threading = component_model_threading.unwrap_or(false);
Expand Down Expand Up @@ -304,8 +304,8 @@ impl Config {
cfg.wasm.async_stack_zeroing = Some(self.wasmtime.async_stack_zeroing);
cfg.wasm.bulk_memory = Some(self.module_config.config.bulk_memory_enabled);
cfg.wasm.component_model_async = Some(self.module_config.component_model_async);
cfg.wasm.component_model_async_builtins =
Some(self.module_config.component_model_async_builtins);
cfg.wasm.component_model_more_async_builtins =
Some(self.module_config.component_model_more_async_builtins);
cfg.wasm.component_model_async_stackful =
Some(self.module_config.component_model_async_stackful);
cfg.wasm.component_model_threading = Some(self.module_config.component_model_threading);
Expand Down
4 changes: 2 additions & 2 deletions crates/fuzzing/src/generators/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub struct ModuleConfig {
// config-to-`wasmtime::Config` translation.
pub function_references_enabled: bool,
pub component_model_async: bool,
pub component_model_async_builtins: bool,
pub component_model_more_async_builtins: bool,
pub component_model_async_stackful: bool,
pub component_model_threading: bool,
pub component_model_error_context: bool,
Expand Down Expand Up @@ -77,7 +77,7 @@ impl<'a> Arbitrary<'a> for ModuleConfig {

Ok(ModuleConfig {
component_model_async: false,
component_model_async_builtins: false,
component_model_more_async_builtins: false,
component_model_async_stackful: false,
component_model_threading: false,
component_model_error_context: false,
Expand Down
2 changes: 1 addition & 1 deletion crates/misc/component-async-tests/tests/scenario/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub fn config() -> Config {
}
config.wasm_component_model(true);
config.wasm_component_model_async(true);
config.wasm_component_model_async_builtins(true);
config.wasm_component_model_more_async_builtins(true);
config.wasm_component_model_async_stackful(true);
config.wasm_component_model_threading(true);
config.wasm_component_model_error_context(true);
Expand Down
6 changes: 3 additions & 3 deletions crates/test-util/src/wasmtime_wast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub fn apply_test_config(config: &mut Config, test_config: &wast::TestConfig) {
extended_const,
wide_arithmetic,
component_model_async,
component_model_async_builtins,
component_model_more_async_builtins,
component_model_async_stackful,
component_model_threading,
component_model_error_context,
Expand Down Expand Up @@ -72,7 +72,7 @@ pub fn apply_test_config(config: &mut Config, test_config: &wast::TestConfig) {
let extended_const = extended_const.unwrap_or(false);
let wide_arithmetic = wide_arithmetic.unwrap_or(false);
let component_model_async = component_model_async.unwrap_or(false);
let component_model_async_builtins = component_model_async_builtins.unwrap_or(false);
let component_model_more_async_builtins = component_model_more_async_builtins.unwrap_or(false);
let component_model_async_stackful = component_model_async_stackful.unwrap_or(false);
let component_model_threading = component_model_threading.unwrap_or(false);
let component_model_error_context = component_model_error_context.unwrap_or(false);
Expand Down Expand Up @@ -114,7 +114,7 @@ pub fn apply_test_config(config: &mut Config, test_config: &wast::TestConfig) {
.wasm_extended_const(extended_const)
.wasm_wide_arithmetic(wide_arithmetic)
.wasm_component_model_async(component_model_async)
.wasm_component_model_async_builtins(component_model_async_builtins)
.wasm_component_model_more_async_builtins(component_model_more_async_builtins)
.wasm_component_model_async_stackful(component_model_async_stackful)
.wasm_component_model_threading(component_model_threading)
.wasm_component_model_error_context(component_model_error_context)
Expand Down
14 changes: 9 additions & 5 deletions crates/test-util/src/wast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ fn component_test_config(test: &Path) -> TestConfig {
{
ret.component_model_async = Some(true);
ret.component_model_async_stackful = Some(true);
ret.component_model_async_builtins = Some(true);
ret.component_model_more_async_builtins = Some(true);
ret.component_model_threading = Some(true);
}
if parent.ends_with("wasm-tools") {
Expand Down Expand Up @@ -275,7 +275,7 @@ macro_rules! foreach_config_option {
hogs_memory
nan_canonicalization
component_model_async
component_model_async_builtins
component_model_more_async_builtins
component_model_async_stackful
component_model_threading
component_model_error_context
Expand Down Expand Up @@ -467,12 +467,16 @@ impl WastTest {
return true;
}

// These tests in the `component-model` submodule have not yet been
// updated to account for the recent threading-related intrinsic
// changes
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",
"test/async/trap-if-block-and-sync.wast",
// These tests assert different errors and aren't updated for
// memory64.
"test/wasm-tools/memory64.wast",
"test/wasm-tools/resources.wast",
];
if unsupported.iter().any(|part| self.path.ends_with(part)) {
return true;
Expand Down
8 changes: 4 additions & 4 deletions crates/wasmtime/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1236,8 +1236,8 @@ impl Config {
/// [proposal]:
/// https://github.com/WebAssembly/component-model/blob/main/design/mvp/Concurrency.md
#[cfg(feature = "component-model-async")]
pub fn wasm_component_model_async_builtins(&mut self, enable: bool) -> &mut Self {
self.wasm_features(WasmFeatures::CM_ASYNC_BUILTINS, enable);
pub fn wasm_component_model_more_async_builtins(&mut self, enable: bool) -> &mut Self {
self.wasm_features(WasmFeatures::CM_MORE_ASYNC_BUILTINS, enable);
self
}

Expand Down Expand Up @@ -2321,7 +2321,7 @@ impl Config {
| WasmFeatures::WIDE_ARITHMETIC
| WasmFeatures::CM_ASYNC
| WasmFeatures::CM_ASYNC_STACKFUL
| WasmFeatures::CM_ASYNC_BUILTINS
| WasmFeatures::CM_MORE_ASYNC_BUILTINS
| WasmFeatures::CM_THREADING
| WasmFeatures::CM_ERROR_CONTEXT
| WasmFeatures::CM_GC
Expand Down Expand Up @@ -2615,7 +2615,7 @@ impl Config {

// Concurrency support is required for some component model features.
let requires_concurrency = WasmFeatures::CM_ASYNC
| WasmFeatures::CM_ASYNC_BUILTINS
| WasmFeatures::CM_MORE_ASYNC_BUILTINS
| WasmFeatures::CM_ASYNC_STACKFUL
| WasmFeatures::CM_THREADING
| WasmFeatures::CM_ERROR_CONTEXT;
Expand Down
49 changes: 37 additions & 12 deletions supply-chain/imports.lock
Original file line number Diff line number Diff line change
Expand Up @@ -769,8 +769,8 @@ user-login = "alexcrichton"
user-name = "Alex Crichton"

[[publisher.json-from-wast]]
version = "0.247.0"
when = "2026-04-17"
version = "0.248.0"
when = "2026-04-28"
trusted-publisher = "github:bytecodealliance/wasm-tools"

[[publisher.libc]]
Expand Down Expand Up @@ -1256,8 +1256,8 @@ user-login = "alexcrichton"
user-name = "Alex Crichton"

[[publisher.wasm-compose]]
version = "0.247.0"
when = "2026-04-17"
version = "0.248.0"
when = "2026-04-28"
trusted-publisher = "github:bytecodealliance/wasm-tools"

[[publisher.wasm-encoder]]
Expand All @@ -1270,6 +1270,11 @@ version = "0.247.0"
when = "2026-04-17"
trusted-publisher = "github:bytecodealliance/wasm-tools"

[[publisher.wasm-encoder]]
version = "0.248.0"
when = "2026-04-28"
trusted-publisher = "github:bytecodealliance/wasm-tools"

[[publisher.wasm-metadata]]
version = "0.236.0"
when = "2025-07-28"
Expand All @@ -1281,9 +1286,14 @@ version = "0.247.0"
when = "2026-04-17"
trusted-publisher = "github:bytecodealliance/wasm-tools"

[[publisher.wasm-metadata]]
version = "0.248.0"
when = "2026-04-28"
trusted-publisher = "github:bytecodealliance/wasm-tools"

[[publisher.wasm-wave]]
version = "0.247.0"
when = "2026-04-17"
version = "0.248.0"
when = "2026-04-28"
trusted-publisher = "github:bytecodealliance/wasm-tools"

[[publisher.wasmparser]]
Expand All @@ -1296,9 +1306,14 @@ version = "0.247.0"
when = "2026-04-17"
trusted-publisher = "github:bytecodealliance/wasm-tools"

[[publisher.wasmparser]]
version = "0.248.0"
when = "2026-04-28"
trusted-publisher = "github:bytecodealliance/wasm-tools"

[[publisher.wasmprinter]]
version = "0.247.0"
when = "2026-04-17"
version = "0.248.0"
when = "2026-04-28"
trusted-publisher = "github:bytecodealliance/wasm-tools"

[[publisher.wasmtime]]
Expand Down Expand Up @@ -1457,13 +1472,13 @@ when = "2026-04-09"
trusted-publisher = "github:bytecodealliance/wasmtime"

[[publisher.wast]]
version = "247.0.0"
when = "2026-04-17"
version = "248.0.0"
when = "2026-04-28"
trusted-publisher = "github:bytecodealliance/wasm-tools"

[[publisher.wat]]
version = "1.247.0"
when = "2026-04-17"
version = "1.248.0"
when = "2026-04-28"
trusted-publisher = "github:bytecodealliance/wasm-tools"

[[publisher.wiggle]]
Expand Down Expand Up @@ -1751,6 +1766,11 @@ version = "0.247.0"
when = "2026-04-17"
trusted-publisher = "github:bytecodealliance/wasm-tools"

[[publisher.wit-component]]
version = "0.248.0"
when = "2026-04-28"
trusted-publisher = "github:bytecodealliance/wasm-tools"

[[publisher.wit-parser]]
version = "0.244.0"
when = "2026-01-06"
Expand All @@ -1761,6 +1781,11 @@ version = "0.247.0"
when = "2026-04-17"
trusted-publisher = "github:bytecodealliance/wasm-tools"

[[publisher.wit-parser]]
version = "0.248.0"
when = "2026-04-28"
trusted-publisher = "github:bytecodealliance/wasm-tools"

[[publisher.witx]]
version = "0.9.1"
when = "2021-06-22"
Expand Down
Loading
Loading