Skip to content

Releases: bytecodealliance/wasmtime

dev: Fuel const expr operator cost (#14215)

Choose a tag to compare

@github-actions github-actions released this 28 Sep 20:31
d8a0da6
* Charge const-expr operators the configured fuel cost

Operators inside constant expressions - global initializers, element and
data segment offsets, element segment expressions - were each charged a
hardcoded 1 fuel unit, so `Config::operator_cost` had no effect on any
instantiation-time work.

Constant expressions are stored as `ConstOp` rather than
`wasmparser::Operator`, so add a `const_op_cost` lookup alongside the
existing `cost` lookup and use it in `translate_const_expr`. Default costs
are unchanged: every `ConstOp` still costs 1 with the default table.

* Charge the configured Call cost for the synthesized start call

`module_start` synthesizes the call to a module's `(start ...)` function
and manually replicates the fuel accounting that `fuel_before_op` performs
for `Operator::Call`. That replica used a hardcoded 1 rather than the
configured cost, so the `Call` entry of `Config::operator_cost` did not
apply to the start call. Look the cost up from the table instead.

* Note the const-expr fuel change in RELEASES.md and tighten the tests

`Config::operator_cost` shipped in 48.0.0, so applying it to const-expr
operators and the synthesized start call changes the observable behavior
of released public API; note it under 49.0.0's `Changed` section.

Also pin a second cost-table entry in the const-expr test so a mis-wired
`ConstOp` match arm cannot pass, and document where the two flat
per-function entry charges in the start-call test come from.

* Reuse the operator cost lookup for const-expr operators

Translate a `ConstOp` back into the `wasmparser::Operator` it was parsed
from and charge it through the existing `OperatorCostStrategy::cost`,
rather than carrying a second lookup over the same table. That removes
the duplicate cost mapping and the default table that had to be kept in
sync with `default_operator_cost` by hand.

Only `ConstOp::RefNull` cannot reproduce its immediate, since
`TypeConvert::convert_heap_type` has no reverse; a placeholder heap type
stands in, which is fine because the cost lookup ignores immediates.

Also drop the test doc comments and assert the start-call test under the
default cost table as well as a custom one.

* Move the const-expr operator translation onto `ConstOp`

`ConstOp::to_operator` now lives next to `ConstOp::from_wasmparser`, and
`translate_const_expr` charges through `OperatorCostStrategy::cost`
directly, so `tunables.rs` no longer carries any const-expr specific
lookup.

Run both new tests under `#[wasmtime_test]` like the neighbouring cost
tests, with `extended_const` enabled for the `i32.add` initializer, and
link the release note to the PR.

v48.0.1: Release Wasmtime 48.0.1 (#14197)

Choose a tag to compare

@github-actions github-actions released this 24 Aug 20:03
Immutable release. Only release title and notes can be modified.
7bac2c2

48.0.1

Released 2026-08-24.

Fixed

  • Context slots in component compositions are now correctly managed.
    #14139

  • The Host header is now set by default for HTTP requests sent with WASIp2.
    #14167

v48.0.0: Release Wasmtime 48.0.0 (#14169)

Choose a tag to compare

@github-actions github-actions released this 20 Aug 16:34
Immutable release. Only release title and notes can be modified.
f1412a5

48.0.0

Released 2026-08-20.

Added

  • Wasmtime has an initial implementation of the component model
    fixed-length-lists feature.
    #12315

  • Wasmtime's reflection of component imports/exports now exposes external-id
    information.
    #13874

  • Cranelift's alias analysis pass now eliminates dead stores.
    #13806
    #13947

  • Winch now supports the wasm SIMD proposal on AArch64.
    #13911
    #13921
    #13928
    #13937
    #13945
    #13938
    #13946
    ...

  • Cranelift now supports an AVX512-VNNI lowering for the dot-product wasm
    instruction and usdot on AArch64.
    #14006
    #14054

  • Wasmtime's bindgen! macro now has an include_component_type option to
    generate a COMPONENT_TYPE constant with the encoded type of the world being
    bound.
    #14013

  • Wasmtime now supports configurable fuel costs for variable-length wasm
    opcodes.
    #13931

Changed

  • Host-implemented traits in wasmtime-wasi-http are now the same across
    wasip2/wasip3 and no longer require separate implementations/structures.
    #13810
    #13812
    #13835

  • Wasmtime will now use the process_madvise syscall on Linux where available
    which can improve the performance of the pooling allocator when the
    deallocation batch size is configured to larger than 1.
    #13830

  • Synchronous cancellation of streams/futures/subtasks now traps if the waitable
    was already in a waitable set.
    #13708

  • Winch is now flagged to be compatible with component-model-async.
    #13845

  • Wasmtime's pooling allocator now uses more sharding to reduce lock contention.
    #13840

  • Wasmtime now requires Rust 1.95.0 to build.
    #13853

  • Cranelift now has a uniform maximum size across all backends on the bounds of
    a function's stack frame.
    #13783

  • Wasmtime's LinkerInstance for components now supports being reopened to
    gradually add more items.
    #13908

  • The wasmtime-wasi crate's default configuration now denies creation of
    TCP/UDP sockets by default.
    #13936

  • Wasmtime now configures async task context fields on realloc calls to zero.
    #13949

  • Work has continued on continuous verification of Cranelift's lowering rules
    on AArch64.
    #13935
    #13929
    #13998

  • Codegen for loads on AArch64 has been optimized slightly to improve sharing
    common sub-expressions.
    #13766

  • Work continues on implementing the stack-switching proposal.
    #11717
    #13996
    #14052

  • Permissions for wasi-filesystem in the implementation of the wasmtime-wasi
    crate have been simplified to either read-write or read-only for a directory.
    #14010

Fixed

  • A late-drop of host-defined stream producers/consumers has been fixed.
    #13891

  • Call hooks are now invoked around async yields when dealing with concurrent
    execution.
    #13871

  • Extreme filesystem timestamps no longer cause panics.
    #13894

  • An erroneous trap was fixed where an async-delivered write-closed event was
    sent to a future.
    #13914

  • An erroneous trap where Wasmtime internally used the wrong thread id has been
    fixed.
    #13926

  • Cross-component instance streams are no longer erroneously flagged as being
    intra-instance.
    #14018

  • A panic in the wasmtime CLI with non-utf8 environment variables has been
    fixed.
    #14017

  • Atomic waits on big-endian hosts have been fixed.
    #14027

  • Enabling MPK with CoW images has been fixed.
    #14076

v47.0.4: Add release notes (#14183)

Choose a tag to compare

@github-actions github-actions released this 20 Aug 17:11
Immutable release. Only release title and notes can be modified.
254cb7a

47.0.4

Released 2026-08-20

Fixed

v46.0.3: Release Wasmtime 46.0.3 (#14170)

Choose a tag to compare

@github-actions github-actions released this 20 Aug 17:12
Immutable release. Only release title and notes can be modified.
c5569e6

46.0.3

Released 2026-08-20

Fixed

v36.0.14: Release Wasmtime 36.0.14 (#14172)

Choose a tag to compare

@github-actions github-actions released this 20 Aug 17:59
Immutable release. Only release title and notes can be modified.
3d0ec7e

36.0.14

Released 2026-08-20

Fixed

  • Filesystem sandbox escape when paths or symlinks contain trailing slashes.
    GHSA-vqjp-4c8c-hfgg

v24.0.13: Release Wasmtime 24.0.13 (#14173)

Choose a tag to compare

@github-actions github-actions released this 20 Aug 17:10
Immutable release. Only release title and notes can be modified.
6ab9d98

24.0.13

Released 2026-08-20

Fixed

  • Filesystem sandbox escape when paths or symlinks contain trailing slashes.
    GHSA-vqjp-4c8c-hfgg

v47.0.3: Release Wasmtime 47.0.3 (#14037)

Choose a tag to compare

@github-actions github-actions released this 31 Jul 16:22
Immutable release. Only release title and notes can be modified.
5554cc1

47.0.3

Released 2026-07-31.

Fixed

v46.0.2: Release Wasmtime 46.0.2 (#14038)

Choose a tag to compare

@github-actions github-actions released this 31 Jul 16:20
Immutable release. Only release title and notes can be modified.
4f87260

46.0.2

Released 2026-07-31.

Fixed

v36.0.13: Release Wasmtime 36.0.13 (#14035)

Choose a tag to compare

@github-actions github-actions released this 31 Jul 15:46
Immutable release. Only release title and notes can be modified.
f65ae51

36.0.13

Released 2026-07-31.

Fixed