Wasmtime

Latest version: v20.0.0

Safety actively analyzes 630656 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 17

14.0.3

Released 2023-10-29

Fixed

* The `wasmtime` executable will now attempt to more gracefully handle the
transition from the 13.0.0 CLI arguments and parsing to the changes in 14.0.0.
CLI commands should now warn if they no longer work with the new parser, but
still execute as they previously did. This behavior can be controlled via a
new `WASMTIME_NEW_CLI` environment variable if necessary.
[7385](https://github.com/bytecodealliance/wasmtime/pull/7385)

* The `serve` subcommand of the `wasmtime` CLI is now enabled by default for the
`wasmtime` executable.
[7392](https://github.com/bytecodealliance/wasmtime/pull/7392)

--------------------------------------------------------------------------------

14.0.2

Released 2023-10-26

Fixed

* Make the `wasmtime::unix` module accessible on macOS again.
[7360](https://github.com/bytecodealliance/wasmtime/pull/7360)

* Inter-crate dependencies between `cranelift-*` crates now disable the
`default` feature meaning that it's possible for embedders to depend on
`cranelift-codegen` as well without the `default` feature.
[7369](https://github.com/bytecodealliance/wasmtime/pull/7369)

--------------------------------------------------------------------------------

14.0.1

Released 2023-10-23

Fixed

* Cranelift: preserve uext and sext flags for parameters on x86\_64 and apple
aarch64. Note that this does not affect Wasmtime and is only intended for
Cranelift embedders such as `rustc_codegen_cranelift`.
[7333](https://github.com/bytecodealliance/wasmtime/pull/7333)

--------------------------------------------------------------------------------

14.0.0

Not secure
Released 2023-10-20

One of the larger changes in this release is a redesign of Wasmtime's CLI
arguments and where arguments are passed. This means that previous invocations
of the `wasmtime` CLI executable will need to be updated. No functionality was
removed but most of it is behind new flags. One major change is that Wasmtime
CLI flags are now grouped behind short options like `-O`. For example

wasmtime run --opt-level 2 foo.wasm

is now:

wasmtime run -O opt-level=2 foo.wasm

Additionally options prefixed with `--enable-*` or `--disable-*` now
consistently are considered boolean setters. For example:

wasmtime run --disable-cache foo.wasm

is now:

wasmtime run -C cache=n foo.wasm

Options can be explored with `wasmtime -C help` for example, and `wasmtime -h`
will show all option groups that can be expanded.

Another major change in the CLI is that any CLI argument which positionally
comes after the wasm file specified will be passed as an argument to the guest
module. For example this invocations

wasmtime run foo.wasm --epoch-interruption

was previously accepted as enabling epoch interruption for the `foo.wasm` file.
This is now interpreted as if it were `./foo.wasm --epoch-interruption`,
however, passing the flag to the wasm file itself. Flags to Wasmtime must now
come after Wasmtime's subcommand (in this case `run`) and before the wasm file
that's being run, for example:

wasmtime run -W epoch-interruption foo.wasm

More information about this change can be found on
[6925](https://github.com/bytecodealliance/wasmtime/pull/6925) and
[6946](https://github.com/bytecodealliance/wasmtime/pull/6946).

Added

* Added the `wasmtime::FrameInfo::module` method, which returns the
`wasmtime::Module` associated with the stack frame.

* The `wasmtime::component::Linker` type now implements `Clone`.
[7032](https://github.com/bytecodealliance/wasmtime/pull/7032)

* Wasmtime's `TypedFunc` API now supports the `v128` WebAssembly type on x86\_64
and aarch64.
[7010](https://github.com/bytecodealliance/wasmtime/pull/7010)

* Support for resources exported from a WebAssembly guest has been added to the
component `bindgen!` macro.
[7050](https://github.com/bytecodealliance/wasmtime/pull/7050)

* The C API now supports learning about a module's `image_range`.
[7064](https://github.com/bytecodealliance/wasmtime/pull/7064)

* Passing values between components is now possible with a more complete
implementation of type-checking of values.
[7065](https://github.com/bytecodealliance/wasmtime/pull/7065)

* Types representing resources can now be customized with `bindgen!`.
[7069](https://github.com/bytecodealliance/wasmtime/pull/7069)

* Wasm-defined globals and memories are now included in core dumps, and the
`wasmtime::WasmCoreDump` type is now serializable.
[6935](https://github.com/bytecodealliance/wasmtime/pull/6935)
[7078](https://github.com/bytecodealliance/wasmtime/pull/7078)

* Initial experimental support for Intel MPK has been added to support running
more instances concurrently.
[7072](https://github.com/bytecodealliance/wasmtime/pull/7072)

* The implementation of `wasi:http` now supports inbound requests in addition to
outbound requests. A new `wasmtime serve` command is an example way of
handling http requests with wasm files.
[7091](https://github.com/bytecodealliance/wasmtime/pull/7091)

* The C API now supports Wasmtime's "host memory creation" API to customize the
allocation of linear memories.
[7115](https://github.com/bytecodealliance/wasmtime/pull/7115)

* The C API now supports asynchronous invocation of WebAssembly programs.
[7106](https://github.com/bytecodealliance/wasmtime/pull/7106)

* The C API now supports Wasmtime's `InstancePre<T>` type.
[7140](https://github.com/bytecodealliance/wasmtime/pull/7140)

* The `wasi:sockets/ip-name-lookup` interface is now implemented by Wasmtime.
[7109](https://github.com/bytecodealliance/wasmtime/pull/7109)

Changed

* Wasmtime's CLI has been significantly overhauled. See the note above.
[6925](https://github.com/bytecodealliance/wasmtime/pull/6925)
[6946](https://github.com/bytecodealliance/wasmtime/pull/6946)

* The `wasmtime::FrameInfo::module_name` has been removed, however you can now
get identical results by chaining `wasmtime::FrameInfo::module` and
`wasmtime::Module::name`: `my_frame.module().name()`.

* WASI interfaces have seen significant work since the previous release. Streams
for example have a new backpressure and flushing design. Additionally WIT
`resource`s are now used ubiquitously throughout the specification and
implementation.
[6877](https://github.com/bytecodealliance/wasmtime/pull/6877)
[7029](https://github.com/bytecodealliance/wasmtime/pull/7029)
[7090](https://github.com/bytecodealliance/wasmtime/pull/7090)

* The implementation of `wasi:http` now uses `{input,output}-stream` from the
`wasi:io/streams` interface.
[7056](https://github.com/bytecodealliance/wasmtime/pull/7056)

* Lifting and lowering of the `list<u8>` component values has been significantly
optimized.
[6971](https://github.com/bytecodealliance/wasmtime/pull/6971)

* The `wasmtime-c-api` crate is now additionally built as an rlib as well as the
previous cdylib/staticlib combo.
[6765](https://github.com/bytecodealliance/wasmtime/pull/6765)

Fixed

* Support referencing stack slots in the DWARF debug info.
[6960](https://github.com/bytecodealliance/wasmtime/pull/6960)

* Printing unicode to stdio on Windows has been fixed.
[6825](https://github.com/bytecodealliance/wasmtime/pull/6825)

* Building for x86\_64-linux-android has been fixed.
[7055](https://github.com/bytecodealliance/wasmtime/pull/7055)

* Fixed stdout/stderr becoming nonblocking by accident with WASI preview2 on
macOS.
[7058](https://github.com/bytecodealliance/wasmtime/pull/7058)

* Fixed some character boundary-related panics in the preview2 implementation of
preview1.
[7011](https://github.com/bytecodealliance/wasmtime/pull/7011)

* Fixed an issue of guests sleeping for an incorrect amount of time with
preview2.
[6993](https://github.com/bytecodealliance/wasmtime/pull/6993)

* Cranelift will now return an error when running out of temporaries in a very
large function instead of panicking.
[7114](https://github.com/bytecodealliance/wasmtime/pull/7114)

--------------------------------------------------------------------------------

13.0.1

Not secure
Released 2023-10-26

Fixed

* Make the `wasmtime::unix` module accessible on macOS again.
[7360](https://github.com/bytecodealliance/wasmtime/pull/7360)

--------------------------------------------------------------------------------

13.0.0

Not secure
Released 2023-09-20

Added

* Configuration of mach ports vs signals on macOS is now done through a `Config`
instead of at compile time.
[6807](https://github.com/bytecodealliance/wasmtime/pull/6807)

* `Engine::detect_precompiled{,_file}` can be used to determine whether some
bytes or a file look like a precompiled module or a component.
[6832](https://github.com/bytecodealliance/wasmtime/pull/6832)
[6937](https://github.com/bytecodealliance/wasmtime/pull/6937)

* A new feature "wmemcheck" has been added to enable Valgrind-like detection of
use-after-free within a WebAssembly guest module.
[6820](https://github.com/bytecodealliance/wasmtime/pull/6820)
[6856](https://github.com/bytecodealliance/wasmtime/pull/6856)

* The `wasmtime` CLI now supports executing components.
[6836](https://github.com/bytecodealliance/wasmtime/pull/6836)

* Support for WASI preview2's TCP sockets interface has been added.
[6837](https://github.com/bytecodealliance/wasmtime/pull/6837)

* Wasmtime's implementation of the wasi-nn proposal now supports named models.
[6854](https://github.com/bytecodealliance/wasmtime/pull/6854)

* The C API now supports configuring `native_unwind_info`,
`dynamic_memory_reserved_for_growth`, `target`, and Cranelift settings.
[6896](https://github.com/bytecodealliance/wasmtime/pull/6896)
[6934](https://github.com/bytecodealliance/wasmtime/pull/6934)

* The `wasmtime` crate now has initial support for component model bindings
generation for the WIT `resource` type.
[6886](https://github.com/bytecodealliance/wasmtime/pull/6886)

* Cranelift's RISC-V backend now has a complete implementation of the
WebAssembly SIMD proposal. Many thanks to Afonso Bordado for all their
contributions!
[6920](https://github.com/bytecodealliance/wasmtime/pull/6920)
[6924](https://github.com/bytecodealliance/wasmtime/pull/6924)

* The `bindgen!` macro in the `wasmtime` crate now supports conditional
configuration for which imports should be `async` and which should be
synchronous.
[6942](https://github.com/bytecodealliance/wasmtime/pull/6942)

Changed

* The pooling allocator was significantly refactored and the
`PoolingAllocationConfig` has some minor breaking API changes that reflect
those changes.

Previously, the pooling allocator had `count` slots, and each slot had `N`
memories and `M` tables. Every allocated instance would reserve those `N`
memories and `M` tables regardless whether it actually needed them all or
not. This could lead to some waste and over-allocation when a module used less
memories and tables than the pooling allocator's configured maximums.

After the refactors in this release, the pooling allocator doesn't have
one-size-fits-all slots anymore. Instead, memories and tables are in separate
pools that can be allocated from independently, and we allocate exactly as
many memories and tables as are necessary for the instance being allocated.

To preserve your old configuration with the new methods you can do the following:

rust
let mut config = PoolingAllocationConfig::default();

// If you used to have this old, no-longer-compiling configuration:
config.count(count);
config.instance_memories(n);
config.instance_tables(m);

// You can use these equivalent settings for the new config methods:
config.total_core_instances(count);
config.total_stacks(count); // If using the `async` feature.
config.total_memories(count * n);
config.max_memories_per_module(n);
config.total_tables(count * m);
config.max_tables_per_module(m);


There are additionally a variety of methods to limit the maximum amount of
resources a single core Wasm or component instance can take from the pool:

* `PoolingAllocationConfig::max_memories_per_module`
* `PoolingAllocationConfig::max_tables_per_module`
* `PoolingAllocationConfig::max_memories_per_component`
* `PoolingAllocationConfig::max_tables_per_component`
* `PoolingAllocationConfig::max_core_instances_per_component`

These methods do not affect the size of the pre-allocated pool.
[6835](https://github.com/bytecodealliance/wasmtime/pull/6835)

* Builder methods for WASI contexts now use `&mut self` instead of `self`.
[6770](https://github.com/bytecodealliance/wasmtime/pull/6770)

* Native unwinding information is now properly disabled when it is configured to
be turned off.
[6547](https://github.com/bytecodealliance/wasmtime/pull/6547)

* Wasmtime's minimum supported Rust version (MSRV) is now 1.70.0. Wasmtime's
MSRV policy of supporting the last three releases of Rust (N-2) is now
additionally documented. More discussion can additionally be found on the PR
itself.
[6900](https://github.com/bytecodealliance/wasmtime/pull/6900)

* Wasmtime's support for DWARF debugging information has seen some fixes for
previously reported crashes.
[6931](https://github.com/bytecodealliance/wasmtime/pull/6931)

Removed

* Wasmtime's experimental implementation of wasi-crypto has been removed. More
discussion of this change can be found on
[6732](https://github.com/bytecodealliance/wasmtime/pull/6732)
and
[6816](https://github.com/bytecodealliance/wasmtime/pull/6816)

* Support for `union` types in the component model has been removed.
[6913](https://github.com/bytecodealliance/wasmtime/pull/6913)

--------------------------------------------------------------------------------

Page 4 of 17

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.