Releases: bytecodealliance/wasmtime
dev: Remove need for explicit `Config::async_support` knob (#12371)
* Refactor component model host function definitions
Push the `async`-ness down one layer.
* Remove need for explicit `Config::async_support` knob
This commit is an attempt to step towards reconciling "old async" and
"new async" in Wasmtime. The old async style is the original async
support in Wasmtime with `call_async`, `func_wrap_async`, etc, where the
main property is that the store is "locked" during an async operation.
Put another way, a store can only execute at most one async operation at
a time. This is in contrast to "new async" support in Wasmtime with the
component-model-async (WASIp3) support, where stores can have more than
one async operation in flight at once.
This commit does not fully reconcile these differences, but it does
remove one hurdle along the way: `Config::async_support`. Since the
beginning of Wasmtime this configuration knob has existed to explicitly
demarcate a config/engine/store as "this thing requires `async` stuff
internally." This has started to make less and less sense over time
where the line between sync and async has become more murky with WASIp3
where the two worlds comingle. The goal of this commit is to deprecate
`Config::async_support` and make the function not actually do anything.
In isolation this can't simply be done, however, because there are many
load-bearing aspects of Wasmtime that rely on this `async_support` knob.
For example once epochs + yielding are enabled it's required that all
Wasm is executed on a fiber lest it hit an epoch and not know how to
yield. That means that this commit is not a simple removal of
`async_support` but instead a refactoring/rearchitecting of how async is
used internally within Wasmtime. The high-level ideas within Wasmtime
now are:
* A `Store` has a "requires async" boolean stored within it.
* All configuration options which end up requiring async, such as
yielding with epochs, turn this boolean on.
* Creation of host functions which use async
(e.g. `func_wrap_{async,concurrent}`) will also turn this option on.
* Synchronous API entrypoints into Wasmtime ensure that this boolean is
disabled.
* Asynchronous APIs are usable at any time.
This means that the concept of an async store vs a sync store is now
gone. All stores are equally capable of executing sync/async, and the
change now is that dynamically some stores will require that async is
used with certain configuration. Additionally all panicking conditions
around `async_support` have been converted to errors instead. All
relevant APIs already returned an error and things are murky enough now
that it's not necessarily trivial to get this right at the embedder
level. In the interest of avoiding panics all detected async mismatches
are now first-class `wasmtime::Error` values.
The end result of this commit is that `Config::async_support` is a
deprecated `#[doc(hidden)]` function that does nothing. While many
internal changes happened as well as having new tests for all this sort
of behavior this is not expected to have a great impact on external
consumers. In general a deletion of `async_support(true)` is in theory
all that's required. This is intended to make it easier to think about
async/sync/etc in the future with WASIp3 and eventually reconcile
`func_wrap_async` and `func_wrap_concurrent` for example. That's left
for future refactorings however.
prtest:full
* Review comments
* Fix CI failures
v41.0.0: Release Wasmtime 41.0.0 (#12373)
41.0.0
Released 2026-01-20.
Added
-
Support for
{Future,Stream}Anyin the component model has improved.
#12142 -
Wasmtime has initial support for breakpoints and single-stepping with the
debugfeature for guest programs.
#12133 -
Wasmtime has begun adding a new
Errortype which is similar to
anyhow::Errorbut supports gracefully handling OOM. Wasmtime still uses
anyhow::Errorbut this will change in the future towasmtime::Errorwhich
will be a distinct type.
#12163 -
An initial top-level crate for async-debugging guest programs has been added.
#12183
Changed
-
Cranelift now optimizes redundant
select+icmpinstructions.
#12135 -
Synchronous component model functions can no longer block before returning.
This implements a change in the upstream specification to the upcomingasync
support in the component model which places stricter restrictions on
non-asyncfunctions and their ability to perform blocking operations.
#12043 -
Frame iteration in
debugmode now visits all activations which enables
seeing all frames from recursive wasm calls.
#12176 -
Wasmtime now requires Rust 1.90.0 or later.
#12167 -
Intra-component stream/future reads/writes are now allowed for simple data
types.
#12181 -
The
POLLcallback code has been removed from the canonical ABI for async
functions and thewaitable-set.pollfunction no longer yields.
#12182 -
Guest-to-guest adapters injected by Wasmtime now have improved trapping error
messages.
#12215
Fixed
v40.0.2: Release Wasmtime 40.0.2 (#12346)
v39.0.2: Release Wasmtime 39.0.2 (#12347)
39.0.2
Released 2026-01-14.
Fixed
- A possible stack overflow in the x64 backend with
cmpemission has been
fixed.
#12333
v36.0.4: Release Wasmtime 36.0.4 (#12348)
36.0.4
Released 2026-01-14.
Fixed
- A possible stack overflow in the x64 backend with
cmpemission has been
fixed.
#12333
v40.0.1: Release Wasmtime 40.0.1 (#12271)
40.0.1
Released 2026-01-07.
Changed
- This release is a test of Wasmtime's CI-based crate publishing infrastructure.
Wasmtime is switching to crates.io-based trusted publishing for this release
and is testing that everything works.
#12257
v40.0.0: Release Wasmtime 40.0.0 (#12192)
40.0.0
Released 2025-12-20.
Added
-
WASIp3 support for
wasi:httpnow implementsResponse::from_httpto convert
from standard Rust types to WASI types.
#12063 -
Cranelift now supports a "patchable" ABI which has a maximum number of
arguments and clobbers no registers. This is paired as well with a new
patchable_callinstruction which supports being turned into NOPs at runtime.
#12061
#12101
Changed
-
Support for the WebAssembly
threadsproposal is now classified as tier 2 by
default. Additionally creation ofSharedMemoryis disabled by deafult behind
a new config knob/CLI flag.
#12036 -
A variety of peephole-style optimizations have been added to Cranelift's
optimization passes.
#11994
#11995
#11996
#11997
#11998
#11999
#12000
#12006
#12008 -
Component host functions have been slightly optimized to remove an
Arcclone
and reduce contention.
#11987 -
Support for component-model-async has been updated to account for the
changes specified in WebAssembly/component-model#578.
This means that historical binaries using WASIp3, for example, are no longer
valid. Recompilation of historical components will be required and
source-level changes may also be required in some circumstances.
#12031
#12043 -
The
UnsyncBoxBodytype is now used everywhere in wasmtime-wasi-http instead
of just in the wasip3 support.
#12060 -
Initial groundwork for gracefully handling OOM (e.g. returning an error
instead of aborting) has been added.
#12070
#12089 -
Wasmtime will create a private copy of code memory when guest debugging is
enabled to assist with modifying code when adding/removing breakpoints.
#12051 -
The
ResourceTabletype will no longer useTombstonewhen compiled in debug
mode.
#12114 -
Intra-component future/stream reads/writes will now trap instead of
accidentally being allowed.
#12117 -
Cranelift optimization rules have been tweaked after it was discovered that
they could pessimize code containing long chains of computations.
#12116
Fixed
-
Compilation of
i8x16.popcnthas been fixed in Winch for some potential
inputs.
#12010 -
A panic in
Instance::prepare_callfor some component-model-async situations
has been fixed.
#12054 -
An off-by-one error for lifting/lowering enums/variants with 255 cases has
been fixed.
#12066 -
Restarting the read of a host future after cancellation has been fixed.
#12093 -
Compilation for OpenBSD on x86_64 has been fixed.
#12097 -
Components containing a module type which exoprts a
tagare now supported.
#12125
v39.0.1: Release Wasmtime 39.0.1 (#12084)
39.0.1
Released 2025-11-24.
Fixed
- Compiling the
debugfeature without thegcfeature enabled has been fixed.
#12074
v39.0.0: Release Wasmtime 39.0.0 (#12050)
39.0.0
Released 2025-11-20.
Added
-
Initial work has begun to support WebAssembly-level debugging natively in
Wasmtime. This is intended to complement today's preexisting DWARF-level
debugging, but this work will be portable and operate at the WebAssembly level
of abstraction rather than the machine-level. Note that this work is not yet
complete at this time but is expected to get filled out over the coming
releases.
#11768
#11769
#11873
#11892
#11895 -
The pooling allocator now exposes more metrics about unused slots.
#11789 -
The Wizer and component-init projects have been merged into Wasmtime under
a newwasmtime wizerCLI subcommand andwasmtime-wizercrate. This is
mostly a drop-in replacement for both with a minor caveat that the
initialization function is now calledwizer-initializeinstead of
wizer.initializeto be compatible with components.
#11805
#11851
#11853
#11855
#11857
#11863
#11866
#11867
#11877
#11876
#11878
#11891
#11897
#11898
-
The
Config::wasm_featuremethod is now public.
#11812 -
Enabling the wasm exceptions proposal is now exposed in the C API.
#11861 -
The
wasmtimecrate now has acustom-sync-primitivesCargo feature which
enables using custom synchronization primitives defined by the embedder. This
is useful inno_stdtargets where the default panic-on-contention primitives
are not appropriate.
#11836 -
Wasmtime now supports unsafe intrinsics to be used for compile-time builtins.
This can be used to provide give low-level access to host APIs/memory to a
guest program in a controlled fashion.
#11825
#11918 -
The
signals_based_trapsconfiguration option is now exposed in the C API.
#11879 -
A new
EqRef::from_i31function has been added.
#11884 -
The
wasmtime servesubcommand will, by default, now reuse instances when
used with WASIp3 components. This increases throughput and additionally
showcases the concurrent features of WASIp3. This can be opted-out-of on the
CLI as well.
#11807 -
The C++ API for components has been filled out and implemented.
#11880
#11889
#11988 -
A new
ResourceDynamictype, similar toResource<T>, has been added to
support host resources that have a dynamic tag at runtime rather than a
statically known tag at compile time. This is then used to implement resources
in the C/C++ API as well.
#11885
#11920 -
The C/C++ API of Wasmtime now supports the custom-page-sizes wasm proposal.
#11890 -
Initial support has been added for the cooperative multithreading component
model proposal in Wasmtime, built on async primitives.
#11751 -
The
epoch_deadline_callbackRust API has been bound in C++.
#11945 -
A new
Request::into_httphelper has been added to the WASIp3 implementation
ofwasi:http.
#11843 -
A
define_unknown_imports_as_trapsfunction has been added to the C API.
#11962 -
A callback-based implementation of
stdoutandstderrhas been added to the
C API for WASI configuration.
#11965
Changed
-
Running async functions in the component model now operates at the
Store-level of abstraction rather than anInstance.
#11796 -
The
wasmtime servesubcommand no longer mistakenly spawns an epoch thread
per-request and instead uses a single epoch thread.
#11817 -
The
component-model-asyncCargo feature is now on-by-default. Note that it
is still gated at runtime by default. Also note that Wasmtime 39 does not include
#12031 which means
that components using async produced with the latestwasm-toolswill not run
in Wasmtime 39. To run async components it's recommended to pin to a
historical version ofwasm-toolsand guest toolchains for now.
#11822 -
Bindings generated by
wiggleno longer useasync_trait.
#11839 -
Wasmtime's documentation now has an example of a plugin system using Wasmtime.
#11848 -
Profiling with perfmap or jitdump now uses
O_APPENDto be more amenable to
other engines in the same process also using perfmap/jitdump.
#11865 -
The
wasmtime-wasi-httpcrate now usesUnsyncBoxBodyto clarify thatSync
is not required.
#11941 -
A
.character is now used instead of/int hebindgen!macro to separate
interface members.
#11947 -
The
func_newfunction for component linkers now provides the type to the
callee so it knows the type that the component that imported it is using.
#11944 -
The
component::Functype now has a type accessor and the old params/result
accessors were deleted.
#11943 -
Wasmtime now requires Rust 1.89.0 or later to compile.
#11959
Fixed
-
Some panics handling shapes of components with resources in various locations
has been fixed.
#11798 -
Bitwise float operations in Cranelift have been fixed on aarch64.
#11811 -
An off-by-one in the bounds check of wasm atomic operations has been fixed.
#11977 -
Bounds-check elision now happens again with 4 GiB guard pages.
#11973