27 KiB
Wasmtime Releases
Unreleased
0.26.0
Released 2021-04-05.
Added
-
Added the
wasmtime compile
command to support AOT compilation of Wasm modules. This adds theEngine::precompile_module
method. Also added theConfig::target
method to change the compilation target of the configuration. This can be used in conjunction withEngine::precompile_module
to target a different host triple than the current one. #2791 -
Support for macOS on aarch64 (Apple M1 Silicon), including Apple-specific calling convention details and unwinding/exception handling using Mach ports. #2742, #2723
-
A number of SIMD instruction implementations in the new x86-64 backend. #2771
-
Added the
Config::cranelift_flag_enable
method to enable setting Cranelift boolean flags or presets in a config. -
Added CLI option
--cranelift-enable
to enable boolean settings and ISA presets. -
Deduplicate function signatures in Wasm modules. #2772
-
Optimize overheads of calling into Wasm functions. #2757, #2759
-
Improvements related to Module Linking: compile fewer trampolines;
-
Re-export sibling crates from
wasmtime-wasi
to make embedding easier without needing to match crate versions. #2776
Changed
-
Switched the default compiler backend on x86-64 to Cranelift's new backend. This should not have any user-visible effects other than possibly runtime performance improvements. The old backend is still available with the
old-x86-backend
feature flag to thecranelift-codegen
orwasmtime
crates, or programmatically withBackendVariant::Legacy
. We plan to maintain the old backend for at least one more release and ensure it works on CI. #2718 -
Breaking:
Module::deserialize
has been removed in favor ofModule::new
. -
Breaking:
Config::cranelift_clear_cpu_flags
was removed. UseConfig::target
to clear the CPU flags for the host's target. -
Breaking:
Config::cranelift_other_flag
was renamed toConfig::cranelift_flag_set
. -
CLI changes:
- Wasmtime CLI options to enable WebAssembly features have been replaced with
a singular
--wasm-features
option. The previous options are still supported, but are not displayed in help text. - Breaking: the CLI option
--cranelift-flags
was changed to--cranelift-set
. - Breaking: the CLI option
--enable-reference-types=false
has been changed to--wasm-features=-reference-types
. - Breaking: the CLI option
--enable-multi-value=false
has been changed to--wasm-features=-multi-value
. - Breaking: the CLI option
--enable-bulk-memory=false
has been changed to--wasm-features=-bulk-memory
.
- Wasmtime CLI options to enable WebAssembly features have been replaced with
a singular
-
Improved error-reporting in wiggle. #2760
-
Make WASI sleeping fallible (some systems do not support sleep). #2756
-
WASI: Support
poll_oneoff
with a sleep. #2753 -
Allow a
StackMapSink
to be passed when defining functions withcranelift-module
. #2739 -
Some refactoring in new x86-64 backend to prepare for VEX/EVEX (e.g., AVX-512) instruction encodings to be supported. #2799
Fixed
-
Fixed a corner case in
srem
(signed remainder) in the new x86-64 backend:INT_MIN % -1
should return0
, rather than trapping. This only occurred whenavoid_div_traps == false
was set by the embedding. #2763 -
Fixed a memory leak of the
Store
when an instance traps. #2803 -
Fixed memory-initialization bug in uffd allocator that could copy into the wrong destination under certain conditions. Does not affect the default wasmtime instance allocator. #2801
-
Fix printing of float values from the Wasmtime CLI. #2797
-
Remove the ability for the
Linker
to instantiate modules with duplicate import strings of different types. #2789
0.25.0
Released 2021-03-16.
Added
-
An implementation of a pooling instance allocator, optionally backed by
userfaultfd
on Linux, was added to improve the performance of embeddings that instantiate a large number of instances continuously. #2518 -
Host functions can now be defined on
Config
to share the function across allStore
objects connected to anEngine
. This can improve the time it takes to instantiate instances in a short-livedStore
. #2625 -
The
Store
object now supports having typed values attached to it which can be retrieved from host functions. #2625 -
The
wiggle
code generator now supportsasync
host functions. #2701
Changed
-
The
Func::getN{,_async}
APIs have all been removed in favor of a newFunc::typed
API which should be more compact in terms of API surface area as well as more flexible in how it can be used. #2719 -
Engine::new
has been changed from returningEngine
to returninganyhow::Result<Engine>
. Callers ofEngine::new
will need to be updated to use the?
operator on the return value or otherwise unwrap the result to get theEngine
.
Fixed
- Interpretation of timestamps in
poll_oneoff
for WASI have been fixed to correctly use nanoseconds instead of microseconds. #2717
0.24.0
Released 2021-03-04.
Added
- Implement support for
async
functions in Wasmtime #2434
Fixed
- Fix preservation of the sigaltstack on macOS #2676
- Fix incorrect semver dependencies involving fs-set-times. #2705
- Fix some
i128
shift-related bugs in x64 backend. #2682 - Fix incomplete trap metadata due to multiple traps at one address #2685
0.23.0
Released 2021-02-16.
Added
- Support for limiting WebAssembly execution with fuel was added, including support in the C API. #2611 #2643
- Wasmtime now has more knobs for limiting memory and table allocations #2617
- Added a method to share
Config
across machines #2608 - Added a safe memory read/write API #2528
- Added support for the experimental wasi-crypto APIs #2597
- Added an instance limit to
Config
#2593 - Implemented module-linking's outer module aliases #2590
- Cranelift now supports 128-bit operations for the new x64 backend. #2539
- Cranelift now has detailed debug-info (DWARF) support in new backends (initially x64). #2565
- Cranelift now uses the
POPCNT
,TZCNT
, andLZCNT
, as well as SSE 4.1 rounding instructions on x64 when available. - Cranelift now uses the
CNT
, instruction on aarch64 when available.
Changed
-
A new WASI implementation built on the new
cap-std
crate was added, replacing the previous implementation. This brings improved robustness, portability, and performance. -
wasmtime_wasi::WasiCtxBuilder
moved towasi_cap_std_sync::WasiCtxBuilder
. -
The WebAssembly C API is updated, with a few minor API changes #2579
Fixed
- Fixed a panic in WASI
fd_readdir
on large directories #2620 - Fixed a memory leak with command modules #2017
0.22.0
Released 2021-01-07.
Added
-
Experimental support for the module-linking proposal was added. #2094
-
Added support for the reference types proposal on the aarch64 architecture. #2410
Changed
Fixed
-
Fixed an issue where the
select
instruction didn't acceptv128
SIMD operands. #2391 -
Fixed an issue where Wasmtime could potentially use the wrong stack map during GCs, leading to a panic. #2396
-
Fixed an issue where if a host-defined function erroneously returned a value from a different store, that value would be leaked. #2424
-
Fixed a bug where in certain cases if a module's instantiation failed, it could leave trampolines in the store that referenced the no-longer-valid instance. These trampolines could be reused in future instantiations, leading to use after free bugs. #2408
-
Fixed a miscompilation on aarch64 where certain instructions would read
SP
instead of the zero register. This could only affect you if you explicitly enabled the Wasm SIMD proposal. #2548
0.21.0
Released 2020-11-05.
Added
-
Experimental support for the multi-memory proposal was added. #2263
-
The
Trap::trap_code
API enables learning what kind of trap was raised. #2309
Changed
-
WebAssembly module validation is now parallelized. #2059
-
Documentation is now available at docs.wasmtime.dev. #2317
-
Windows now compiles like other platforms with a huge guard page instead of having its own custom limit which made modules compile and run more slowly. #2326
-
The size of the cache entry for serialized modules has been greatly reduced. #2321 #2322 #2324 #2325
-
The
FuncType
API constructor and accessors are now iterator-based. #2365
Fixed
- A panic in compiling reference-types-using modules has been fixed. #2350
0.20.0
Released 2020-09-23.
Added
-
Support for explicitly serializing and deserializing compiled wasm modules has been added. #2020
-
A
wasmtime_store_gc
C API was added to run GC forexternref
. #2052 -
Support for atomics in Cranelift has been added. Support is not fully implemented in Wasmtime at this time, however. #2077
-
The
Caller::get_export
function is now implemented forFunc
references as well. #2108
Fixed
-
Leaks in the C API have been fixed. #2040
-
The
wasm_val_copy
C API has been fixed for reference types. #2041 -
Fix a panic with
Func::new
and reference types when the store doesn't have reference types enabled. #2039
0.19.0
Released 2020-07-14.
Added
-
The WebAssembly reference-types proposal is now supported in Wasmtime and the C API. #1832, #1882, #1894, #1901, #1923, #1969, #1973, #1982, #1984, #1991, #1996
-
The [WebAssembly simd proposal's][simd] spec tests now pass in Wasmtime. #1765, #1876, #1941, #1957, #1990, #1994
-
Wasmtime can now be compiled without the usage of threads for parallel compilation, although this is still enabled by default. #1903
-
The C API is now documented. #1928, #1959, #1968
-
A
wasmtime_linker_get_one_by_name
function was added to the C API. #1897 -
A
wasmtime_trap_exit_status
function was added to the C API. #1912 -
Compilation for the
aarch64-linux-android
target should now work, although keep in mind this platform is not fully tested still. #2002
Fixed
-
Runtime warnings when using Wasmtime on musl have been fixed. #1914
-
A bug affecting Windows unwind information with functions that have spilled floating point registers has been fixed. #1983
Changed
- Wasmtime's default branch and development now happens on the
main
branch instead ofmaster
. #1924
Removed
-
The "host info" support in the C API has been removed since it was never fully or correctly implemented. #1922
-
Support for the
*_same
functions in the C API has been removed in the same vein as the host info APIs. #1926
0.18.0
Release 2020-06-09.
Added
The WasmTy
trait is now implemented for u32
and u64
.
0.17.0
Released 2020-06-01.
Added
-
The Commands and Reactors ABI is now supported in the Rust API.
Linker::module
loads a module and automatically handles Commands and Reactors semantics.
The Table::grow
function now returns the previous table size, making it consistent
with the table.grow
instruction.
New Wasmtime-specific C APIs for working with tables were added which provide more
detailed error information and which make growing a table more consistent with the
table.grow
instruction as well.
The C API now includes support for enabling logging in Wasmtime.
Changed
The WASI proc_exit
function no longer exits the host process. It now unwinds the
callstack back to the wasm entrypoint, and the exit value is available from the
Trap::i32_exit_status
method.
The WebAssembly multi-value proposal is now enabled by default.
The Rust API does not require a store provided during Module::new
operation. The Module
can be send accross threads and instantiate for a specific store. The Instance::new
now requires the store.
0.16.0
Released 2020-04-29.
Added
-
The
Instance
struct has new accessors,get_func
,get_table
,get_memory
, andget_global
for quickly looking up exported functions, tables, memories, and globals by name. #1524 -
The C API has a number of new
wasmtime_*
functions which return error objects to get detailed error information when an API fails. #1467 -
Users now have fine-grained control over creation of instances of
Memory
with a newMemoryCreator
trait. #1400 -
Go bindings for Wasmtime are now available. #1481
-
APIs for looking up values in a
Linker
have been added. #1480 -
Preliminary support for AArch64, also known as ARM64. #1581
Changed
-
Instance::exports
now returnsExport
objects which contain thename
s of the exports in addition to theirExtern
definitions, so it's no longer necessary to useModule::exports
to obtain the export names. #1524 -
The
Func::call
API has changed its error type fromTrap
toanyhow::Error
to distinguish between wasm traps and runtime violations (like the wrong number of parameters). #1467 -
A number of
wasmtime_linker_*
andwasmtime_config_*
C APIs have new type signatures which reflect returning errors. #1467 -
Bindings for .NET have moved to https://github.com/bytecodealliance/wasmtime-dotnet. #1477
-
Passing too many imports to
Instance::new
is now considered an error. #1478
Fixed
- Spurious segfaults due to out-of-stack conditions when handling signals have been fixed. #1315
0.15.0
Released 2020-03-31.
Fixed
Full release produced for all artifacts to account for hiccups in 0.13.0 and 0.14.0.
0.14.0
This version ended up not getting a full release
Fixed
Fix build errors in wasi-common on Windows.
0.13.0
Released 2020-03-24.
Added
-
Lots of documentation of
wasmtime
has been updated. Be sure to check out the book and API documentation! -
All wasmtime example programs are now in a top-level
examples
directory and are available in both C and Rust. #1286 -
A
wasmtime::Linker
type was added to conveniently link link wasm modules together and create instances that reference one another. #1384 -
Wasmtime now has "jitdump" support enabled by default which allows profiling wasm code on linux. #1310
-
The
wasmtime::Caller
type now exists as a first-class way to access the caller's exports, namely memory, when implementing host APIs. This can be the first argument of functions defined withFunc::new
orFunc::wrap
which allows easily implementing methods which take a pointer into wasm memory. Note that this only works for accessing the caller'sMemory
for now and it must be exported. This will eventually be replaced with a more general-purpose mechanism like interface types. #1290 -
The bulk memory proposal has been fully implemented. #1264 #976
-
Virtual file support has been added to
wasi-common
. #701 -
The C API has been enhanced with a Wasmtime-specific
wasmtime_wat2wasm
to parse*.wat
files via the C API. #1206
Changed
-
The
wast
andwasm2obj
standalone binaries have been removed. They're available via thewasmtime wast
andwasmtime wasm2obj
subcommands. #1372 -
The
wasi-common
crate now uses the newwiggle
crate to auto-generate a trait which is implemented for the current wasi snapshot. #1202 -
Wasmtime no longer has a dependency on a C++ compiler. #1365
-
The
Func::wrapN
APIs have been consolidated into oneFunc::wrap
API. #1363 -
The
Callable
trait has been removed and nowFunc::new
takes a closure directly. #1363 -
The Cranelift repository has been merged into the Wasmtime repository.
-
Support for interface types has been temporarily removed. #1292
-
The exit code of the
wasmtime
CLI has changed if the program traps. #1274 -
The
wasmtime
CLI now logs to stderr by default and the-d
flag has been renamed to--log-to-file
. #1266 -
Values cannot cross
Store
objects, meaning you can't instantiate a module with values from different stores nor pass values from different stores into methods. #1016
0.12.0
Released 2020-02-26.
Added
-
Support for the WebAssembly text annotations proposal has been added. #998
-
An initial C API for instantiating WASI modules has been added. #977
-
A new suite of
Func::getN
functions have been added to thewasmtime
API to call statically-known function signatures in a highly optimized fashion. #955 -
Initial support for profiling JIT code through perf jitdump has been added. #360
-
More CLI flags corresponding to proposed WebAssembly features have been added. #917
Changed
-
The
wasmtime
CLI as well as embedding API will optimize WebAssembly code by default now. #973 #988 -
The
verifier
pass in Cranelift is now no longer run by default when using the embedding API. #882
Fixed
-
Code caching now accurately accounts for optimization levels, ensuring that if you ask for optimized code you're not accidentally handed unoptimized code from the cache. #974
-
Automated releases for tags should be up and running again, along with automatic publication of the
wasmtime
Python package. #971