Skip to content

Commit ab5a448

Browse files
wasmtime-publishalexcrichtonPat Hickey
authored
Release Wasmtime 17.0.0 (#7800)
* Release Wasmtime 17.0.0 [automatically-tag-and-release-this-commit] * Change update of gcc on MinGW (#7760) Try not passing `-y -u` to `pacman` to avoid full system updates. Currently full system updates might update the `msys2-runtime` package before actually updating the package we requested, meaning that this might not actually update anything given an update. This is what's currently happening on CI which is breaking due to an update of gcc not actually updating gcc. I'm mostly reading the invocation in rust-lang/rust CI and seeing that it doesn't pass `-y -u` and hopeing that by copying that here things might work. prtest:full * use released WASI Preview 2 (version 0.2.0) wits (#7817) * WASI: copy in the version 0.2.0 wits * wasmtime's wits: use versions 0.2.0 of wasi packages * bindgens and other fixed version strings: change 0.2.0-rc-etc to 0.2.0 * Enable the component model by default This commit enables the component model by default in the embedding API and the CLI. This means that an opt-in of `-W component-model` is no longer required and additionally `.wasm_component_model(true)` is no longer required. Note that this won't impact existing embeddings since the component model feature doesn't do much less `wasmtime::component` is used, and if that's being used this is probably good news for you. * Add release notes for 17.0.0 * Fix non-component-model build --------- Co-authored-by: Wasmtime Publish <wasmtime-publish@users.noreply.github.com> Co-authored-by: Alex Crichton <alex@alexcrichton.com> Co-authored-by: Pat Hickey <phickey@fastly.com>
1 parent b239c50 commit ab5a448

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+215
-123
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ jobs:
431431
if: matrix.target == 'x86_64-pc-windows-gnu'
432432

433433
# Update binutils if MinGW due to https://github.com/rust-lang/rust/issues/112368
434-
- run: C:/msys64/usr/bin/pacman.exe -Syu --needed mingw-w64-x86_64-gcc --noconfirm
434+
- run: C:/msys64/usr/bin/pacman.exe -S --needed mingw-w64-x86_64-gcc --noconfirm
435435
if: matrix.target == 'x86_64-pc-windows-gnu'
436436
- shell: pwsh
437437
run: echo "C:\msys64\mingw64\bin" >> $Env:GITHUB_PATH

RELEASES.md

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,79 @@
22

33
## 17.0.0
44

5-
Unreleased.
5+
Released 2024-01-25
6+
7+
The major feature of this release is that the WASI support in Wasmtime is now
8+
considered stable and flagged at an 0.2.0 version approved by the WASI subgroup.
9+
The release was delayed a few days to hold off until the WASI subgroup voted to
10+
approve the CLI and HTTP worlds and they're now on-by-default! Additionally the
11+
component model is now enabled by default in Wasmtime, for example an opt-in
12+
flag is no longer required on the CLI. Note that embeddings still must opt-in to
13+
using the component model by using the `wasmtime::component` module.
614

715
### Added
816

17+
* Cranelift optimizations have been added for "3-way comparisons", or `Ord::cmp`
18+
in Rust or `<=>` in C++.
19+
[#7636](https://github.com/bytecodealliance/wasmtime/pull/7636)
20+
[#7702](https://github.com/bytecodealliance/wasmtime/pull/7702)
21+
22+
* Components now use Wasmtime's compilation cache used for core wasm modules by
23+
default.
24+
[#7649](https://github.com/bytecodealliance/wasmtime/pull/7649)
25+
26+
* The `Resource<T>` and `ResourceAny` types can now be converted between each
27+
other.
28+
[#7649](https://github.com/bytecodealliance/wasmtime/pull/7649)
29+
[#7712](https://github.com/bytecodealliance/wasmtime/pull/7712)
30+
931
### Changed
1032

33+
* Minor changes have been made to a number of WITs as they progressed to their
34+
official 0.2.0 status.
35+
[#7625](https://github.com/bytecodealliance/wasmtime/pull/7625)
36+
[#7640](https://github.com/bytecodealliance/wasmtime/pull/7640)
37+
[#7690](https://github.com/bytecodealliance/wasmtime/pull/7690)
38+
[#7781](https://github.com/bytecodealliance/wasmtime/pull/7781)
39+
[#7817](https://github.com/bytecodealliance/wasmtime/pull/7817)
40+
41+
* The component model is now enabled by default.
42+
[#7821](https://github.com/bytecodealliance/wasmtime/pull/7821)
43+
44+
* The implementation of `memory.atomic.{wait,notify}` has been rewritten.
45+
[#7629](https://github.com/bytecodealliance/wasmtime/pull/7629)
46+
47+
* The `wasmtime_wasi::preview2::Table` type has been moved to
48+
`wasmtime::component::ResourceTable`.
49+
[#7655](https://github.com/bytecodealliance/wasmtime/pull/7655)
50+
51+
* Creating a UDP stream now validates the address being sent to.
52+
[#7648](https://github.com/bytecodealliance/wasmtime/pull/7648)
53+
54+
* Defining resource types in `Linker<T>` now takes the type to define as a
55+
runtime parameter.
56+
[#7680](https://github.com/bytecodealliance/wasmtime/pull/7680)
57+
58+
* Socket address checks can now be performed dynamically at runtime.
59+
[#7662](https://github.com/bytecodealliance/wasmtime/pull/7662)
60+
61+
* Wasmtime and Cranelift's MSRV is now 1.73.0.
62+
[#7739](https://github.com/bytecodealliance/wasmtime/pull/7739)
63+
64+
### Fixed
65+
66+
* Bindings for WIT APIs where interfaces have multiple versions are now fixed by
67+
putting the version in the generated binding names.
68+
[#7656](https://github.com/bytecodealliance/wasmtime/pull/7656)
69+
70+
* The preview1 `fd_{read,write}` APIs are now fixed when a shared memory is
71+
used.
72+
[#7755](https://github.com/bytecodealliance/wasmtime/pull/7755)
73+
74+
* The preview1 `fd_{read,write}` APIs no longer leak an intermediate stream
75+
created.
76+
[#7819](https://github.com/bytecodealliance/wasmtime/pull/7819)
77+
1178
--------------------------------------------------------------------------------
1279

1380
## 16.0.0

crates/wasi-http/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ pub mod bindings {
1111
wasmtime::component::bindgen!({
1212
path: "wit",
1313
interfaces: "
14-
import wasi:http/incoming-handler@0.2.0-rc-2024-01-16;
15-
import wasi:http/outgoing-handler@0.2.0-rc-2024-01-16;
16-
import wasi:http/types@0.2.0-rc-2024-01-16;
14+
import wasi:http/incoming-handler@0.2.0;
15+
import wasi:http/outgoing-handler@0.2.0;
16+
import wasi:http/types@0.2.0;
1717
",
1818
tracing: true,
1919
async: false,
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// All of the same imports and exports available in the wasi:cli/command world
22
// with addition of HTTP proxy related imports:
33
world command-extended {
4-
include wasi:cli/command@0.2.0-rc-2024-01-16;
5-
import wasi:http/outgoing-handler@0.2.0-rc-2024-01-16;
4+
include wasi:cli/command@0.2.0;
5+
import wasi:http/outgoing-handler@0.2.0;
66
}

crates/wasi-http/wit/deps/cli/command.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:cli@0.2.0-rc-2024-01-16;
1+
package wasi:cli@0.2.0;
22

33
world command {
44
include imports;

crates/wasi-http/wit/deps/cli/imports.wit

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
package wasi:cli@0.2.0-rc-2024-01-16;
1+
package wasi:cli@0.2.0;
22

33
world imports {
4-
include wasi:clocks/imports@0.2.0-rc-2023-11-10;
5-
include wasi:filesystem/imports@0.2.0-rc-2023-11-10;
6-
include wasi:sockets/imports@0.2.0-rc-2024-01-16;
7-
include wasi:random/imports@0.2.0-rc-2023-11-10;
8-
include wasi:io/imports@0.2.0-rc-2023-11-10;
4+
include wasi:clocks/imports@0.2.0;
5+
include wasi:filesystem/imports@0.2.0;
6+
include wasi:sockets/imports@0.2.0;
7+
include wasi:random/imports@0.2.0;
8+
include wasi:io/imports@0.2.0;
99

1010
import environment;
1111
import exit;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
interface stdin {
2-
use wasi:io/streams@0.2.0-rc-2023-11-10.{input-stream};
2+
use wasi:io/streams@0.2.0.{input-stream};
33

44
get-stdin: func() -> input-stream;
55
}
66

77
interface stdout {
8-
use wasi:io/streams@0.2.0-rc-2023-11-10.{output-stream};
8+
use wasi:io/streams@0.2.0.{output-stream};
99

1010
get-stdout: func() -> output-stream;
1111
}
1212

1313
interface stderr {
14-
use wasi:io/streams@0.2.0-rc-2023-11-10.{output-stream};
14+
use wasi:io/streams@0.2.0.{output-stream};
1515

1616
get-stderr: func() -> output-stream;
1717
}

crates/wasi-http/wit/deps/clocks/monotonic-clock.wit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:clocks@0.2.0-rc-2023-11-10;
1+
package wasi:clocks@0.2.0;
22
/// WASI Monotonic Clock is a clock API intended to let users measure elapsed
33
/// time.
44
///
@@ -10,7 +10,7 @@ package wasi:clocks@0.2.0-rc-2023-11-10;
1010
///
1111
/// It is intended for measuring elapsed time.
1212
interface monotonic-clock {
13-
use wasi:io/poll@0.2.0-rc-2023-11-10.{pollable};
13+
use wasi:io/poll@0.2.0.{pollable};
1414

1515
/// An instant in time, in nanoseconds. An instant is relative to an
1616
/// unspecified initial value, and can only be compared to instances from

crates/wasi-http/wit/deps/clocks/wall-clock.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:clocks@0.2.0-rc-2023-11-10;
1+
package wasi:clocks@0.2.0;
22
/// WASI Wall Clock is a clock API intended to let users query the current
33
/// time. The name "wall" makes an analogy to a "clock on the wall", which
44
/// is not necessarily monotonic as it may be reset.

crates/wasi-http/wit/deps/clocks/world.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:clocks@0.2.0-rc-2023-11-10;
1+
package wasi:clocks@0.2.0;
22

33
world imports {
44
import monotonic-clock;

crates/wasi-http/wit/deps/filesystem/preopens.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:filesystem@0.2.0-rc-2023-11-10;
1+
package wasi:filesystem@0.2.0;
22

33
interface preopens {
44
use types.{descriptor};

crates/wasi-http/wit/deps/filesystem/types.wit

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:filesystem@0.2.0-rc-2023-11-10;
1+
package wasi:filesystem@0.2.0;
22
/// WASI filesystem is a filesystem API primarily intended to let users run WASI
33
/// programs that access their files on their existing filesystems, without
44
/// significant overhead.
@@ -24,8 +24,8 @@ package wasi:filesystem@0.2.0-rc-2023-11-10;
2424
///
2525
/// [WASI filesystem path resolution]: https://github.com/WebAssembly/wasi-filesystem/blob/main/path-resolution.md
2626
interface types {
27-
use wasi:io/streams@0.2.0-rc-2023-11-10.{input-stream, output-stream, error};
28-
use wasi:clocks/wall-clock@0.2.0-rc-2023-11-10.{datetime};
27+
use wasi:io/streams@0.2.0.{input-stream, output-stream, error};
28+
use wasi:clocks/wall-clock@0.2.0.{datetime};
2929

3030
/// File size or length of a region within a file.
3131
type filesize = u64;

crates/wasi-http/wit/deps/filesystem/world.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:filesystem@0.2.0-rc-2023-11-10;
1+
package wasi:filesystem@0.2.0;
22

33
world imports {
44
import types;

crates/wasi-http/wit/deps/http/proxy.wit

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
package wasi:http@0.2.0-rc-2024-01-16;
1+
package wasi:http@0.2.0;
22

33
/// The `wasi:http/proxy` world captures a widely-implementable intersection of
44
/// hosts that includes HTTP forward and reverse proxies. Components targeting
55
/// this world may concurrently stream in and out any number of incoming and
66
/// outgoing HTTP requests.
77
world proxy {
88
/// HTTP proxies have access to time and randomness.
9-
include wasi:clocks/imports@0.2.0-rc-2023-11-10;
10-
import wasi:random/random@0.2.0-rc-2023-11-10;
9+
include wasi:clocks/imports@0.2.0;
10+
import wasi:random/random@0.2.0;
1111

1212
/// Proxies have standard output and error streams which are expected to
1313
/// terminate in a developer-facing console provided by the host.
14-
import wasi:cli/stdout@0.2.0-rc-2024-01-16;
15-
import wasi:cli/stderr@0.2.0-rc-2024-01-16;
14+
import wasi:cli/stdout@0.2.0;
15+
import wasi:cli/stderr@0.2.0;
1616

1717
/// TODO: this is a temporary workaround until component tooling is able to
1818
/// gracefully handle the absence of stdin. Hosts must return an eof stream
1919
/// for this import, which is what wasi-libc + tooling will do automatically
2020
/// when this import is properly removed.
21-
import wasi:cli/stdin@0.2.0-rc-2024-01-16;
21+
import wasi:cli/stdin@0.2.0;
2222

2323
/// This is the default handler to use when user code simply wants to make an
2424
/// HTTP request (e.g., via `fetch()`).

crates/wasi-http/wit/deps/http/types.wit

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
/// HTTP Requests and Responses, both incoming and outgoing, as well as
33
/// their headers, trailers, and bodies.
44
interface types {
5-
use wasi:clocks/monotonic-clock@0.2.0-rc-2023-11-10.{duration};
6-
use wasi:io/streams@0.2.0-rc-2023-11-10.{input-stream, output-stream};
7-
use wasi:io/error@0.2.0-rc-2023-11-10.{error as io-error};
8-
use wasi:io/poll@0.2.0-rc-2023-11-10.{pollable};
5+
use wasi:clocks/monotonic-clock@0.2.0.{duration};
6+
use wasi:io/streams@0.2.0.{input-stream, output-stream};
7+
use wasi:io/error@0.2.0.{error as io-error};
8+
use wasi:io/poll@0.2.0.{pollable};
99

1010
/// This type corresponds to HTTP standard Methods.
1111
variant method {

crates/wasi-http/wit/deps/io/error.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:io@0.2.0-rc-2023-11-10;
1+
package wasi:io@0.2.0;
22

33

44
interface error {

crates/wasi-http/wit/deps/io/poll.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:io@0.2.0-rc-2023-11-10;
1+
package wasi:io@0.2.0;
22

33
/// A poll API intended to let users wait for I/O events on multiple handles
44
/// at once.

crates/wasi-http/wit/deps/io/streams.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:io@0.2.0-rc-2023-11-10;
1+
package wasi:io@0.2.0;
22

33
/// WASI I/O is an I/O abstraction API which is currently focused on providing
44
/// stream types.

crates/wasi-http/wit/deps/io/world.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:io@0.2.0-rc-2023-11-10;
1+
package wasi:io@0.2.0;
22

33
world imports {
44
import streams;

crates/wasi-http/wit/deps/random/insecure-seed.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:random@0.2.0-rc-2023-11-10;
1+
package wasi:random@0.2.0;
22
/// The insecure-seed interface for seeding hash-map DoS resistance.
33
///
44
/// It is intended to be portable at least between Unix-family platforms and

crates/wasi-http/wit/deps/random/insecure.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:random@0.2.0-rc-2023-11-10;
1+
package wasi:random@0.2.0;
22
/// The insecure interface for insecure pseudo-random numbers.
33
///
44
/// It is intended to be portable at least between Unix-family platforms and

crates/wasi-http/wit/deps/random/random.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:random@0.2.0-rc-2023-11-10;
1+
package wasi:random@0.2.0;
22
/// WASI Random is a random data API.
33
///
44
/// It is intended to be portable at least between Unix-family platforms and

crates/wasi-http/wit/deps/random/world.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:random@0.2.0-rc-2023-11-10;
1+
package wasi:random@0.2.0;
22

33
world imports {
44
import random;

crates/wasi-http/wit/deps/sockets/ip-name-lookup.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
interface ip-name-lookup {
3-
use wasi:io/poll@0.2.0-rc-2023-11-10.{pollable};
3+
use wasi:io/poll@0.2.0.{pollable};
44
use network.{network, error-code, ip-address};
55

66

crates/wasi-http/wit/deps/sockets/tcp.wit

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
interface tcp {
3-
use wasi:io/streams@0.2.0-rc-2023-11-10.{input-stream, output-stream};
4-
use wasi:io/poll@0.2.0-rc-2023-11-10.{pollable};
5-
use wasi:clocks/monotonic-clock@0.2.0-rc-2023-11-10.{duration};
3+
use wasi:io/streams@0.2.0.{input-stream, output-stream};
4+
use wasi:io/poll@0.2.0.{pollable};
5+
use wasi:clocks/monotonic-clock@0.2.0.{duration};
66
use network.{network, error-code, ip-socket-address, ip-address-family};
77

88
enum shutdown-type {

crates/wasi-http/wit/deps/sockets/udp.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
interface udp {
3-
use wasi:io/poll@0.2.0-rc-2023-11-10.{pollable};
3+
use wasi:io/poll@0.2.0.{pollable};
44
use network.{network, error-code, ip-socket-address, ip-address-family};
55

66
/// A received datagram.

crates/wasi-http/wit/deps/sockets/world.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package wasi:sockets@0.2.0-rc-2024-01-16;
1+
package wasi:sockets@0.2.0;
22

33
world imports {
44
import instance-network;

crates/wasi-http/wit/test.wit

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@ package wasmtime:wasi;
22

33
// only used as part of `test-programs`
44
world test-reactor {
5-
include wasi:cli/imports@0.2.0-rc-2024-01-16;
5+
include wasi:cli/imports@0.2.0;
66

77
export add-strings: func(s: list<string>) -> u32;
88
export get-strings: func() -> list<string>;
99

10-
use wasi:io/streams@0.2.0-rc-2023-11-10.{output-stream};
10+
use wasi:io/streams@0.2.0.{output-stream};
1111

1212
export write-strings-to: func(o: output-stream) -> result;
1313

14-
use wasi:filesystem/types@0.2.0-rc-2023-11-10.{descriptor-stat};
14+
use wasi:filesystem/types@0.2.0.{descriptor-stat};
1515
export pass-an-imported-record: func(d: descriptor-stat) -> string;
1616
}
1717

1818
world test-command {
19-
include wasi:cli/imports@0.2.0-rc-2024-01-16;
20-
import wasi:http/types@0.2.0-rc-2024-01-16;
21-
import wasi:http/outgoing-handler@0.2.0-rc-2024-01-16;
19+
include wasi:cli/imports@0.2.0;
20+
import wasi:http/types@0.2.0;
21+
import wasi:http/outgoing-handler@0.2.0;
2222
}

crates/wasi-preview1-component-adapter/src/descriptors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ impl Descriptors {
194194

195195
#[cfg(not(feature = "proxy"))]
196196
fn open_preopens(&self, import_alloc: &ImportAlloc, arena: &BumpArena) {
197-
#[link(wasm_import_module = "wasi:filesystem/preopens@0.2.0-rc-2023-11-10")]
197+
#[link(wasm_import_module = "wasi:filesystem/preopens@0.2.0")]
198198
#[allow(improper_ctypes)] // FIXME(bytecodealliance/wit-bindgen#684)
199199
extern "C" {
200200
#[link_name = "get-directories"]

0 commit comments

Comments
 (0)