* Delete historical interruptable support in Wasmtime This commit removes the `Config::interruptable` configuration along with the `InterruptHandle` type from the `wasmtime` crate. The original support for adding interruption to WebAssembly was added pretty early on in the history of Wasmtime when there was no other method to prevent an infinite loop from the host. Nowadays, however, there are alternative methods for interruption such as fuel or epoch-based interruption. One of the major downsides of `Config::interruptable` is that even when it's not enabled it forces an atomic swap to happen when entering WebAssembly code. This technically could be a non-atomic swap if the configuration option isn't enabled but that produces even more branch-y code on entry into WebAssembly which is already something we try to optimize. Calling into WebAssembly is on the order of a dozens of nanoseconds at this time and an atomic swap, even uncontended, can add up to 5ns on some platforms. The main goal of this PR is to remove this atomic swap on entry into WebAssembly. This is done by removing the `Config::interruptable` field entirely, moving all existing consumers to epochs instead which are suitable for the same purposes. This means that the stack overflow check is no longer entangled with the interruption check and perhaps one day we could continue to optimize that further as well. Some consequences of this change are: * Epochs are now the only method of remote-thread interruption. * There are no more Wasmtime traps that produces the `Interrupted` trap code, although we may wish to move future traps to this so I left it in place. * The C API support for interrupt handles was also removed and bindings for epoch methods were added. * Function-entry checks for interruption are a tiny bit less efficient since one check is performed for the stack limit and a second is performed for the epoch as opposed to the `Config::interruptable` style of bundling the stack limit and the interrupt check in one. It's expected though that this is likely to not really be measurable. * The old `VMInterrupts` structure is renamed to `VMRuntimeLimits`.
52 KiB
Wasmtime Releases
0.36.0
Unreleased.
Added
- Support for epoch-based interruption has been added to the C API. #3925
Removed
- Support for
Config::interruptableandInterruptHandlehas been removed from thewasmtimecrate. Users should migrate to using epoch-based interruption instead. #3925
0.35.1
Released 2022-03-09.
Fixed
- Fixed a bug in the x86-64 lowering of the
uextendopcode for narrow (i8,i16) integer sources when the value is produced by one of several arithmetic instructions. #3906
0.35.0
Released 2022-03-07.
Added
- The
wasmtime_wasi::add_to_linkerfunction now allows providing a context object of a custom type instead ofwasmtime_wasi::WasiCtx, as long as that type implements the required WASI snapshot traits. This allows, for example, wrappingWasiCtxinto a struct and providing custom implementations for those traits to override the default behaviour.
Changed
-
WebAssembly tables of
funcrefvalues are now lazily initialized which can, in some cases, greatly speed up instantiation of a module. #3733 -
The
memfdfeature in 0.34.0, now renamed tomemory-init-cow, has been enabled by default. This means that, where applicable, WebAssembly linear memories are now initialized with copy-on-write mappings. Support from this has been expanded from Linux-only to include macOS and other Unix systems when modules are loaded from precompiled*.cwasmfiles on disk. #3777 #3778 #3787 #3819 #3831 -
Clarify that SSE 4.2 (and prior) is required for running WebAssembly code with simd support enabled on x86_64. #3816 #3817 #3833 #3825
-
Support for profiling with VTune is now enabled at compile time by default, but it remains disabled at runtime by default. #3821
-
The
ModuleLimitstype has been removed from the configuration of the pooling allocator in favor of configuring the total size of an instance allocation rather than each individual field. #3837 -
The native stack size allowed for WebAssembly has been decreased from 1 MiB to 512 KiB on all platforms to better accomodate running wasm on the main thread on Windows. #3861
-
The
wasi-commoncrate now supports doing polls for both read and write interest on a file descriptor at the same time. #3866
Fixed
- The
Store::call_hookcallback is now invoked when entering host functions defined with*_uncheckedvariants. #3881
Removed
- The incomplete and unmaintained ARM32 backend has been removed from Cranelift. #3799
0.34.1
Released 2022-02-16.
Security Fixes
- CVE-2022-23636: Fixed an invalid drop of a partially-initialized instance in the pooling instance allocator.
0.33.1
Released 2022-02-16.
Security Fixes
- CVE-2022-23636: Fixed an invalid drop of a partially-initialized instance in the pooling instance allocator.
0.34.0
Released 2022-02-07.
Fixed
-
The
wasi-commondefault implementation of some attributes of files has been updated to ensure thatwasi-libc'sisattyfunction works as intended. #3696 -
A benign debug assertion related to
externrefand garbage-collection has been fixed. #3734
Added
-
Function names are now automatically demangled when informing profilers of regions of JIT code to apply Rust-specific demangling rules if applicable. #3683
-
Support for profiling JIT-generated trampolines with VTune has been added. #3687
-
Wasmtime now supports a new method of async preemption dubbed "epoch-based interruption" which is intended to be much more efficient than the current fuel-based method of preemption. #3699
-
On Linux Wasmtime will now by default use copy-on-write mappings to initialize memories of wasm modules where possible, accelerating instantiation by avoiding costly memory copies. When combined with the pooling allocator this can also be used to speed up instance-reuse cases due to fewer syscalls to change memory mappings being necessary. #3697 #3738 #3760
-
Wasmtime now supports the recently-added
sock_acceptWASI function. #3711 -
Cranelift now has support for specifying blocks as cold. #3698
Changed
-
Many more instructions for the x64 backend have been migrated to ISLE, additionally with refactorings to make incorrect lowerings harder to accidentally write. #3653 #3659 #3681 #3686 #3688 #3690 #3752
-
More instructions in the aarch64 backend are now lowered with ISLE. #3658 #3662
-
The s390x backend's lowering rules are now almost entirely defined with ISLE. #3702 #3703 #3706 #3717 #3723 #3724
-
Instantiation of modules in Wasmtime has been further optimized now that the copy-on-write memory initialization removed the previously most-expensive part of instantiating a module. #3727 #3739 #3741 #3742
0.33.0
Released 2022-01-05.
Added
-
Compiled wasm modules may now optionally omit debugging information about mapping addresses to source locations, resulting in smaller binaries. #3598
-
The WebAssembly SIMD proposal is now enabled by default. #3601
0.32.1
Released 2022-01-04.
Fixed
-
Cranelift: remove recently-added build dependency on
sha2to allow usage in some dependency-sensitive environments, by computing ISLE manifest hashes with a different hash function. #3619 -
Cranelift: fixed 8- and 16-bit behavior of popcount (bit population count) instruction. Does not affect Wasm frontend. #3617
-
Cranelift: fixed miscompilation of 8- and 16-bit bit-rotate instructions. Does not affect Wasm frontend. #3610
0.32.0
Released 2021-12-13.
Added
-
A new configuration option has been added to force using a "static" memory style to automatically limit growth of memories in some configurations. #3503
-
The
InstancePre<T>type now implementsClone. #3510 -
Cranelift's instruction selection process has begun to be migrated towards the ISLE compiler and definition language. #3506
-
A
pooling-allocatorfeature has been added, which is on-by-default, to disable the pooling allocator at compile time. #3514
Fixed
-
A possible panic when parsing a WebAssembly
namesection has been fixed. #3509 -
Generating native DWARF information for some C-produced modules has been fixed, notably those where there may be DWARF about dead code. #3498
-
A number of SIMD code generation bugs have been fixed in the x64 backend by migrating their lowerings to ISLE.
0.31.0
Released 2021-10-29.
Added
-
New
Func::new_uncheckedandFunc::call_uncheckedAPIs have been added with accompanying functions in the C API to improve the performance of calls into wasm and the host in the C API. #3350 -
Release binaries are now available for the s390x-unknown-linux-gnu architecture. #3372
-
A new
ResourceLimiterAsynctrait is added which allows asynchronous blocking of WebAssembly on instructions such asmemory.grow. #3393
Changed
-
The
Func::callmethod now takes a slice to write the results into rather than returning a boxed slice. #3319 -
Trampolines are now covered when jitdump profiling is enabled. #3344
Fixed
-
Debugging with GDB has been fixed on Windows. #3373
-
Some quadradic behavior in Wasmtime's compilation of modules has been fixed. #3469 #3466
-
Bounds-checks for wasm memory accesses in certain non-default configurations have been fixed to correctly allow loads at the end of the address space. #3462
-
When type-checking memories and tables for satisfying instance imports the runtime size of the table/memory is now consulted instead of the object's original type. #3450
Removed
0.30.0
Released 2021-09-17.
Security Fixes
-
CVE-2021-39216: Fixed a use after free passing
externrefs to Wasm in Wasmtime. -
CVE-2021-39218: Fixed an out-of-bounds read/write and invalid free with
externrefs and GC safepoints in Wasmtime. -
CVE-2021-39219: Fixed a bug where using two different
Engines with the sameLinker-define functions caused unsafety withoutunsafeblocks.
Added
-
Added experimental support for the in-progress 64-bit memories Wasm proposal.
-
Added support to build Wasmtime without the compiler. This lets you run pre-compiled Wasm modules, without the ability (or potential attack surface) of compiling new Wasm modules. The compilation functionality is gated by the on-by-default
craneliftcargo feature. -
Added support for NaN canonicalization with SIMD vectors.
-
Added support for differential fuzzing against V8's Wasm engine.
-
Added support for fuzzing against the Wasm spec interpreter.
-
Enabled SIMD fuzzing on oss-fuzz.
Changed
-
A variety of performance improvements to loading pre-compiled modules.
-
A variety of performance improvements to function calls, both through Rust and the C API.
-
Leaf functions that do not use the stack no longer bump the frame pointer on aarch64 and s390x.
-
Many updates and expanded instruction support to the in-progress CLIF interpreter.
-
Expanded fuzzing of reference types and GC.
Fixed
-
A number of fixes to both aarch64 and x86_64 support for the Wasm SIMD proposal and the underlying CLIF vector instructions.
-
Fixed a potential infinite loop in the SSA computation for
cranelift-frontend. This was not reachable fromcranelift-wasmor Wasmtime, but might have affected general Cranelift users.
Removed
- The
wasmtime wasm2objsubcommand has been removed. Generating raw object files for linking natively is no longer supported. Use thewasmtime compilesubcommand to pre-compile a Wasm module andwasmtime runto run pre-compiled Wasm modules.
0.29.0
Released 2021-08-02.
Changed
-
Instance exports are now loaded lazily from instances instead of eagerly as they were before. This is an internal-only change and is not a breaking change. #2984
-
All linear memories created by Wasmtime will now, by default, have guard pages in front of them in addition to after them. This is intended to help mitigate future bugs in Cranelift, should they arise. #2977
-
Linear memories now correctly support a maximum size of 4GB. Previously, the limit field was 32 bits, which did not properly support a full 4GB memory. This update is also a necessary change in preparation for future memory64 support. #3013 #3134
-
Injection counts of fuel into a
wasmtime::Storenow uses a u64 instead of a u32. #3048
Added
-
Support for
i128has improved in the AArch64 backend. #2959 #2975 #2985 #2990 #3002 #3004 #3005 #3008 #3027 -
The
wasmtime::Linkertype now implementsClone. #2993 -
Support for the SIMD proposal on both x86_64 and AArch64 has improved. On x86_64, all SIMD opcodes are now supported. #2997 #3035 #2982 #3084 #3082 #3107 #3105 #3114 #3070 #3126
-
A
Trapcan now display its reason without also displaying the backtrace. #3033 -
An initiall fuzzer for CLIF has been added. #3038
-
High-level architecture documentation has been added for Wasmtime. #3019
-
Support for multi-memory can now be configured in Wasmtime's C API. #3071
-
The
wasmtimecrate now supports aposix-signals-on-macosfeature to force the usage of signals instead of mach ports to handle traps on macOS. #3063 -
Wasmtime's C API now has a
wasmtime_trap_codefunction to get the raw trap code, if present, for a trap. #3086 -
Wasmtime's C API now has a
wasmtime_linker_define_funcfunction to define a store-independent function within a linker. #3122 -
A
wasmtime::Linker::module_asyncfunction was added as the asynchronous counterpart towasmtime::Linker::module. #3121
Fixed
-
Compiling the
wasmtimecrate into adylibcrate type has been fixed. #3010 -
The enter/exit hooks for WebAssembly are now executed for an instance's
startfunction, if present. #3001 -
Some WASI functions in
wasi-commonhave been fixed for big-endian platforms. #3016 -
Wasmtime no longer erroneously assumes that all custom sections may contain DWARF information, reducing instances of
Trap'sDisplayimplementation providing misleading information to set an env var to get more information. #3083 -
Some issues with parsing DWARF debug information have been fixed. #3116
0.28.0
Released 2021-06-09.
Changed
- Breaking: Wasmtime's embedding API has been redesigned, as specified in RFC
11. Rust users can now enjoy easier times with
SendandSync, and all users can now more clearly manage memory, especially in the C API. Language embeddings have been updated to the new API as well. #2897
Added
-
A new
InstancePretype, created withLinker::instantiate_pre, has been added to perform type-checking of an instance once and reduce the work done for each instantiation of a module: #2962 -
Deserialization of a module can now optionally skip checking the wasmtime version string: #2945
-
A method has been exposed to frontload per-thread initialization costs if the latency of every last wasm call is important: #2946
-
Hooks have been added for entry/exit into wasm code to allow embeddings to track time and other properties about execution in a wasm environment: #2952
Fixed
- Multiple returns on macOS AArch64 have been fixed: #2956
0.27.0
Released 2021-05-21.
Security Fixes
- Fixed a security issue in Cranelift's x64 backend that could result in a heap sandbox escape due to an incorrect sign-extension: #2913.
Added
-
Support for IBM z/Archiecture (
s390x) machines in Cranelift and Wasmtime: #2836, #2837, #2838, #2843, #2854, #2870, #2871, #2872, #2874. -
Improved async support in wasi-common runtime: #2832.
-
Added
Store::with_limits,StoreLimits, andResourceLimiterto the Wasmtime API to help with enforcing resource limits at runtime. TheResourceLimitertrait can be implemented by custom resource limiters to decide if linear memories or tables can be grown. -
Added
allow-unknown-exportsoption for the run command: #2879. -
Added API to notify that a
Storehas moved to a new thread: #2822. -
Documented guidance around using Wasmtime in multithreaded contexts: #2812. In the future, the Wasmtime API will change to allow some of its core types to be Send/Sync; see the in-progress #2897 for details.
-
Support calls from native code to multiple-return-value functions: #2806.
Changed
- Breaking:
Memory::newhas been changed to returnResultas creating a host memory object is now a fallible operation when the initial size of the memory exceeds the store limits.
Fixed
-
Many instruction selection improvements on x64 and aarch64: #2819, #2828, #2823, #2862, #2886, #2889, #2905.
-
Improved performance of Wasmtime runtime substantially: #2811, #2818, #2821, #2847, #2900.
-
Fixed WASI issue with file metadata on Windows: #2884.
-
Fixed an issue with debug info and an underflowing (trapping) offset: #2866.
-
Fixed an issue with unwind information in the old x86 backend: #2845.
-
Fixed i32 spilling in x64 backend: #2840.
0.26.0
Released 2021-04-05.
Added
-
Added the
wasmtime compilecommand to support AOT compilation of Wasm modules. This adds theEngine::precompile_modulemethod. Also added theConfig::targetmethod to change the compilation target of the configuration. This can be used in conjunction withEngine::precompile_moduleto 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_enablemethod to enable setting Cranelift boolean flags or presets in a config. -
Added CLI option
--cranelift-enableto 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-wasito 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-backendfeature flag to thecranelift-codegenorwasmtimecrates, 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::deserializehas been removed in favor ofModule::new. -
Breaking:
Config::cranelift_clear_cpu_flagswas removed. UseConfig::targetto clear the CPU flags for the host's target. -
Breaking:
Config::cranelift_other_flagwas renamed toConfig::cranelift_flag_set. -
CLI changes:
- Wasmtime CLI options to enable WebAssembly features have been replaced with
a singular
--wasm-featuresoption. The previous options are still supported, but are not displayed in help text. - Breaking: the CLI option
--cranelift-flagswas changed to--cranelift-set. - Breaking: the CLI option
--enable-reference-types=falsehas been changed to--wasm-features=-reference-types. - Breaking: the CLI option
--enable-multi-value=falsehas been changed to--wasm-features=-multi-value. - Breaking: the CLI option
--enable-bulk-memory=falsehas 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_oneoffwith a sleep. #2753 -
Allow a
StackMapSinkto 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 % -1should return0, rather than trapping. This only occurred whenavoid_div_traps == falsewas set by the embedding. #2763 -
Fixed a memory leak of the
Storewhen 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
Linkerto 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
userfaultfdon 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
Configto share the function across allStoreobjects connected to anEngine. This can improve the time it takes to instantiate instances in a short-livedStore. #2625 -
The
Storeobject now supports having typed values attached to it which can be retrieved from host functions. #2625 -
The
wigglecode generator now supportsasynchost functions. #2701
Changed
-
The
Func::getN{,_async}APIs have all been removed in favor of a newFunc::typedAPI which should be more compact in terms of API surface area as well as more flexible in how it can be used. #2719 -
Engine::newhas been changed from returningEngineto returninganyhow::Result<Engine>. Callers ofEngine::newwill 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_oneofffor WASI have been fixed to correctly use nanoseconds instead of microseconds. #2717
0.24.0
Released 2021-03-04.
Added
- Implement support for
asyncfunctions in Wasmtime #2434
Fixed
- Fix preservation of the sigaltstack on macOS #2676
- Fix incorrect semver dependencies involving fs-set-times. #2705
- Fix some
i128shift-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
Configacross 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-stdcrate was added, replacing the previous implementation. This brings improved robustness, portability, and performance. -
wasmtime_wasi::WasiCtxBuildermoved 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_readdiron 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
selectinstruction didn't acceptv128SIMD 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
SPinstead 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_codeAPI 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
FuncTypeAPI 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_gcC 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_exportfunction is now implemented forFuncreferences as well. #2108
Fixed
-
Leaks in the C API have been fixed. #2040
-
The
wasm_val_copyC API has been fixed for reference types. #2041 -
Fix a panic with
Func::newand 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_namefunction was added to the C API. #1897 -
A
wasmtime_trap_exit_statusfunction was added to the C API. #1912 -
Compilation for the
aarch64-linux-androidtarget 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
mainbranch 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
*_samefunctions 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::moduleloads 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
Instancestruct has new accessors,get_func,get_table,get_memory, andget_globalfor 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
Memorywith a newMemoryCreatortrait. #1400 -
Go bindings for Wasmtime are now available. #1481
-
APIs for looking up values in a
Linkerhave been added. #1480 -
Preliminary support for AArch64, also known as ARM64. #1581
Changed
-
Instance::exportsnow returnsExportobjects which contain thenames of the exports in addition to theirExterndefinitions, so it's no longer necessary to useModule::exportsto obtain the export names. #1524 -
The
Func::callAPI has changed its error type fromTraptoanyhow::Errorto 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::newis 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
wasmtimehas been updated. Be sure to check out the book and API documentation! -
All wasmtime example programs are now in a top-level
examplesdirectory and are available in both C and Rust. #1286 -
A
wasmtime::Linkertype 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::Callertype 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::neworFunc::wrapwhich allows easily implementing methods which take a pointer into wasm memory. Note that this only works for accessing the caller'sMemoryfor 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_wat2wasmto parse*.watfiles via the C API. #1206
Changed
-
The
wastandwasm2objstandalone binaries have been removed. They're available via thewasmtime wastandwasmtime wasm2objsubcommands. #1372 -
The
wasi-commoncrate now uses the newwigglecrate 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::wrapNAPIs have been consolidated into oneFunc::wrapAPI. #1363 -
The
Callabletrait has been removed and nowFunc::newtakes 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
wasmtimeCLI has changed if the program traps. #1274 -
The
wasmtimeCLI now logs to stderr by default and the-dflag has been renamed to--log-to-file. #1266 -
Values cannot cross
Storeobjects, 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::getNfunctions have been added to thewasmtimeAPI 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
wasmtimeCLI as well as embedding API will optimize WebAssembly code by default now. #973 #988 -
The
verifierpass 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
wasmtimePython package. #971