From a1e817cfbd5df0845483386adba47754542d36a2 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 12 Dec 2024 11:22:57 -0800 Subject: [PATCH 1/2] Update to WASI 0.2.3 WIT files No major changes here; this just updates WIT files from WASI 0.2.2 to 0.2.3. --- crates/test-programs/src/lib.rs | 26 +++++++++---------- crates/wasi-http/wit/deps/cli/command.wit | 2 +- crates/wasi-http/wit/deps/cli/imports.wit | 12 ++++----- crates/wasi-http/wit/deps/cli/stdio.wit | 6 ++--- .../wit/deps/clocks/monotonic-clock.wit | 4 +-- crates/wasi-http/wit/deps/clocks/timezone.wit | 2 +- .../wasi-http/wit/deps/clocks/wall-clock.wit | 2 +- crates/wasi-http/wit/deps/clocks/world.wit | 2 +- .../wit/deps/filesystem/preopens.wit | 4 +-- .../wasi-http/wit/deps/filesystem/types.wit | 10 +++---- .../wasi-http/wit/deps/filesystem/world.wit | 2 +- crates/wasi-http/wit/deps/http/proxy.wit | 14 +++++----- crates/wasi-http/wit/deps/http/types.wit | 10 +++---- crates/wasi-http/wit/deps/io/error.wit | 2 +- crates/wasi-http/wit/deps/io/poll.wit | 2 +- crates/wasi-http/wit/deps/io/streams.wit | 2 +- crates/wasi-http/wit/deps/io/world.wit | 2 +- .../wit/deps/random/insecure-seed.wit | 2 +- crates/wasi-http/wit/deps/random/insecure.wit | 2 +- crates/wasi-http/wit/deps/random/random.wit | 2 +- crates/wasi-http/wit/deps/random/world.wit | 2 +- .../wit/deps/sockets/ip-name-lookup.wit | 2 +- crates/wasi-http/wit/deps/sockets/network.wit | 2 +- crates/wasi-http/wit/deps/sockets/tcp.wit | 6 ++--- crates/wasi-http/wit/deps/sockets/udp.wit | 2 +- crates/wasi-http/wit/deps/sockets/world.wit | 2 +- crates/wasi-http/wit/world.wit | 2 +- .../src/lib.rs | 18 ++++++------- crates/wasi/src/bindings.rs | 4 +-- crates/wasi/wit/deps/cli/command.wit | 2 +- crates/wasi/wit/deps/cli/imports.wit | 12 ++++----- crates/wasi/wit/deps/cli/stdio.wit | 6 ++--- .../wasi/wit/deps/clocks/monotonic-clock.wit | 4 +-- crates/wasi/wit/deps/clocks/timezone.wit | 2 +- crates/wasi/wit/deps/clocks/wall-clock.wit | 2 +- crates/wasi/wit/deps/clocks/world.wit | 2 +- crates/wasi/wit/deps/filesystem/preopens.wit | 4 +-- crates/wasi/wit/deps/filesystem/types.wit | 10 +++---- crates/wasi/wit/deps/filesystem/world.wit | 2 +- crates/wasi/wit/deps/io/error.wit | 2 +- crates/wasi/wit/deps/io/poll.wit | 2 +- crates/wasi/wit/deps/io/streams.wit | 2 +- crates/wasi/wit/deps/io/world.wit | 2 +- crates/wasi/wit/deps/random/insecure-seed.wit | 2 +- crates/wasi/wit/deps/random/insecure.wit | 2 +- crates/wasi/wit/deps/random/random.wit | 2 +- crates/wasi/wit/deps/random/world.wit | 2 +- .../wasi/wit/deps/sockets/ip-name-lookup.wit | 2 +- crates/wasi/wit/deps/sockets/network.wit | 2 +- crates/wasi/wit/deps/sockets/tcp.wit | 6 ++--- crates/wasi/wit/deps/sockets/udp.wit | 2 +- crates/wasi/wit/deps/sockets/world.wit | 2 +- crates/wasi/wit/test.wit | 6 ++--- crates/wasi/wit/world.wit | 2 +- 54 files changed, 117 insertions(+), 117 deletions(-) diff --git a/crates/test-programs/src/lib.rs b/crates/test-programs/src/lib.rs index bdd9f1cba609..49301621dbd0 100644 --- a/crates/test-programs/src/lib.rs +++ b/crates/test-programs/src/lib.rs @@ -8,8 +8,8 @@ wit_bindgen::generate!({ package wasmtime:test; world test { - include wasi:cli/imports@0.2.2; - include wasi:http/imports@0.2.2; + include wasi:cli/imports@0.2.3; + include wasi:http/imports@0.2.3; include wasi:config/imports@0.2.0-draft; include wasi:keyvalue/imports@0.2.0-draft; } @@ -31,17 +31,17 @@ pub mod proxy { default_bindings_module: "test_programs::proxy", pub_export_macro: true, with: { - "wasi:http/types@0.2.2": crate::wasi::http::types, - "wasi:http/outgoing-handler@0.2.2": crate::wasi::http::outgoing_handler, - "wasi:random/random@0.2.2": crate::wasi::random::random, - "wasi:io/error@0.2.2": crate::wasi::io::error, - "wasi:io/poll@0.2.2": crate::wasi::io::poll, - "wasi:io/streams@0.2.2": crate::wasi::io::streams, - "wasi:cli/stdout@0.2.2": crate::wasi::cli::stdout, - "wasi:cli/stderr@0.2.2": crate::wasi::cli::stderr, - "wasi:cli/stdin@0.2.2": crate::wasi::cli::stdin, - "wasi:clocks/monotonic-clock@0.2.2": crate::wasi::clocks::monotonic_clock, - "wasi:clocks/wall-clock@0.2.2": crate::wasi::clocks::wall_clock, + "wasi:http/types@0.2.3": crate::wasi::http::types, + "wasi:http/outgoing-handler@0.2.3": crate::wasi::http::outgoing_handler, + "wasi:random/random@0.2.3": crate::wasi::random::random, + "wasi:io/error@0.2.3": crate::wasi::io::error, + "wasi:io/poll@0.2.3": crate::wasi::io::poll, + "wasi:io/streams@0.2.3": crate::wasi::io::streams, + "wasi:cli/stdout@0.2.3": crate::wasi::cli::stdout, + "wasi:cli/stderr@0.2.3": crate::wasi::cli::stderr, + "wasi:cli/stdin@0.2.3": crate::wasi::cli::stdin, + "wasi:clocks/monotonic-clock@0.2.3": crate::wasi::clocks::monotonic_clock, + "wasi:clocks/wall-clock@0.2.3": crate::wasi::clocks::wall_clock, }, }); } diff --git a/crates/wasi-http/wit/deps/cli/command.wit b/crates/wasi-http/wit/deps/cli/command.wit index cc7a352c26e7..3a81766d6450 100644 --- a/crates/wasi-http/wit/deps/cli/command.wit +++ b/crates/wasi-http/wit/deps/cli/command.wit @@ -1,4 +1,4 @@ -package wasi:cli@0.2.2; +package wasi:cli@0.2.3; @since(version = 0.2.0) world command { diff --git a/crates/wasi-http/wit/deps/cli/imports.wit b/crates/wasi-http/wit/deps/cli/imports.wit index ebd7ba173988..8b4e3975ec30 100644 --- a/crates/wasi-http/wit/deps/cli/imports.wit +++ b/crates/wasi-http/wit/deps/cli/imports.wit @@ -1,17 +1,17 @@ -package wasi:cli@0.2.2; +package wasi:cli@0.2.3; @since(version = 0.2.0) world imports { @since(version = 0.2.0) - include wasi:clocks/imports@0.2.2; + include wasi:clocks/imports@0.2.3; @since(version = 0.2.0) - include wasi:filesystem/imports@0.2.2; + include wasi:filesystem/imports@0.2.3; @since(version = 0.2.0) - include wasi:sockets/imports@0.2.2; + include wasi:sockets/imports@0.2.3; @since(version = 0.2.0) - include wasi:random/imports@0.2.2; + include wasi:random/imports@0.2.3; @since(version = 0.2.0) - include wasi:io/imports@0.2.2; + include wasi:io/imports@0.2.3; @since(version = 0.2.0) import environment; diff --git a/crates/wasi-http/wit/deps/cli/stdio.wit b/crates/wasi-http/wit/deps/cli/stdio.wit index 860313eea94e..1b54f5318a8b 100644 --- a/crates/wasi-http/wit/deps/cli/stdio.wit +++ b/crates/wasi-http/wit/deps/cli/stdio.wit @@ -1,7 +1,7 @@ @since(version = 0.2.0) interface stdin { @since(version = 0.2.0) - use wasi:io/streams@0.2.2.{input-stream}; + use wasi:io/streams@0.2.3.{input-stream}; @since(version = 0.2.0) get-stdin: func() -> input-stream; @@ -10,7 +10,7 @@ interface stdin { @since(version = 0.2.0) interface stdout { @since(version = 0.2.0) - use wasi:io/streams@0.2.2.{output-stream}; + use wasi:io/streams@0.2.3.{output-stream}; @since(version = 0.2.0) get-stdout: func() -> output-stream; @@ -19,7 +19,7 @@ interface stdout { @since(version = 0.2.0) interface stderr { @since(version = 0.2.0) - use wasi:io/streams@0.2.2.{output-stream}; + use wasi:io/streams@0.2.3.{output-stream}; @since(version = 0.2.0) get-stderr: func() -> output-stream; diff --git a/crates/wasi-http/wit/deps/clocks/monotonic-clock.wit b/crates/wasi-http/wit/deps/clocks/monotonic-clock.wit index 233cace4c0a3..c676fb84d8b4 100644 --- a/crates/wasi-http/wit/deps/clocks/monotonic-clock.wit +++ b/crates/wasi-http/wit/deps/clocks/monotonic-clock.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.2.2; +package wasi:clocks@0.2.3; /// WASI Monotonic Clock is a clock API intended to let users measure elapsed /// time. /// @@ -10,7 +10,7 @@ package wasi:clocks@0.2.2; @since(version = 0.2.0) interface monotonic-clock { @since(version = 0.2.0) - use wasi:io/poll@0.2.2.{pollable}; + use wasi:io/poll@0.2.3.{pollable}; /// An instant in time, in nanoseconds. An instant is relative to an /// unspecified initial value, and can only be compared to instances from diff --git a/crates/wasi-http/wit/deps/clocks/timezone.wit b/crates/wasi-http/wit/deps/clocks/timezone.wit index 349fb5703f7e..b43e93b23346 100644 --- a/crates/wasi-http/wit/deps/clocks/timezone.wit +++ b/crates/wasi-http/wit/deps/clocks/timezone.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.2.2; +package wasi:clocks@0.2.3; @unstable(feature = clocks-timezone) interface timezone { diff --git a/crates/wasi-http/wit/deps/clocks/wall-clock.wit b/crates/wasi-http/wit/deps/clocks/wall-clock.wit index ec05a1f1ad56..e00ce08933b1 100644 --- a/crates/wasi-http/wit/deps/clocks/wall-clock.wit +++ b/crates/wasi-http/wit/deps/clocks/wall-clock.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.2.2; +package wasi:clocks@0.2.3; /// WASI Wall Clock is a clock API intended to let users query the current /// time. The name "wall" makes an analogy to a "clock on the wall", which /// is not necessarily monotonic as it may be reset. diff --git a/crates/wasi-http/wit/deps/clocks/world.wit b/crates/wasi-http/wit/deps/clocks/world.wit index e36802cc8e1c..05f04f797dd2 100644 --- a/crates/wasi-http/wit/deps/clocks/world.wit +++ b/crates/wasi-http/wit/deps/clocks/world.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.2.2; +package wasi:clocks@0.2.3; @since(version = 0.2.0) world imports { diff --git a/crates/wasi-http/wit/deps/filesystem/preopens.wit b/crates/wasi-http/wit/deps/filesystem/preopens.wit index 410bec1dc2f1..cea97495b50c 100644 --- a/crates/wasi-http/wit/deps/filesystem/preopens.wit +++ b/crates/wasi-http/wit/deps/filesystem/preopens.wit @@ -1,11 +1,11 @@ -package wasi:filesystem@0.2.2; +package wasi:filesystem@0.2.3; @since(version = 0.2.0) interface preopens { @since(version = 0.2.0) use types.{descriptor}; - /// Return the set of preopened directories, and their path. + /// Return the set of preopened directories, and their paths. @since(version = 0.2.0) get-directories: func() -> list>; } diff --git a/crates/wasi-http/wit/deps/filesystem/types.wit b/crates/wasi-http/wit/deps/filesystem/types.wit index 49e0a30bb814..d229a21f4853 100644 --- a/crates/wasi-http/wit/deps/filesystem/types.wit +++ b/crates/wasi-http/wit/deps/filesystem/types.wit @@ -1,4 +1,4 @@ -package wasi:filesystem@0.2.2; +package wasi:filesystem@0.2.3; /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without /// significant overhead. @@ -26,9 +26,9 @@ package wasi:filesystem@0.2.2; @since(version = 0.2.0) interface types { @since(version = 0.2.0) - use wasi:io/streams@0.2.2.{input-stream, output-stream, error}; + use wasi:io/streams@0.2.3.{input-stream, output-stream, error}; @since(version = 0.2.0) - use wasi:clocks/wall-clock@0.2.2.{datetime}; + use wasi:clocks/wall-clock@0.2.3.{datetime}; /// File size or length of a region within a file. @since(version = 0.2.0) @@ -327,7 +327,7 @@ interface types { /// May fail with an error-code describing why the file cannot be appended. /// /// Note: This allows using `write-stream`, which is similar to `write` with - /// `O_APPEND` in in POSIX. + /// `O_APPEND` in POSIX. @since(version = 0.2.0) append-via-stream: func() -> result; @@ -623,7 +623,7 @@ interface types { /// replaced. It may also include a secret value chosen by the /// implementation and not otherwise exposed. /// - /// Implementations are encourated to provide the following properties: + /// Implementations are encouraged to provide the following properties: /// /// - If the file is not modified or replaced, the computed hash value should /// usually not change. diff --git a/crates/wasi-http/wit/deps/filesystem/world.wit b/crates/wasi-http/wit/deps/filesystem/world.wit index 8064bd64b8d8..29405bc2cc72 100644 --- a/crates/wasi-http/wit/deps/filesystem/world.wit +++ b/crates/wasi-http/wit/deps/filesystem/world.wit @@ -1,4 +1,4 @@ -package wasi:filesystem@0.2.2; +package wasi:filesystem@0.2.3; @since(version = 0.2.0) world imports { diff --git a/crates/wasi-http/wit/deps/http/proxy.wit b/crates/wasi-http/wit/deps/http/proxy.wit index fadb89a3ee6f..de3bbe8ae0c1 100644 --- a/crates/wasi-http/wit/deps/http/proxy.wit +++ b/crates/wasi-http/wit/deps/http/proxy.wit @@ -1,4 +1,4 @@ -package wasi:http@0.2.2; +package wasi:http@0.2.3; /// The `wasi:http/imports` world imports all the APIs for HTTP proxies. /// It is intended to be `include`d in other worlds. @@ -6,25 +6,25 @@ package wasi:http@0.2.2; world imports { /// HTTP proxies have access to time and randomness. @since(version = 0.2.0) - import wasi:clocks/monotonic-clock@0.2.2; + import wasi:clocks/monotonic-clock@0.2.3; @since(version = 0.2.0) - import wasi:clocks/wall-clock@0.2.2; + import wasi:clocks/wall-clock@0.2.3; @since(version = 0.2.0) - import wasi:random/random@0.2.2; + import wasi:random/random@0.2.3; /// Proxies have standard output and error streams which are expected to /// terminate in a developer-facing console provided by the host. @since(version = 0.2.0) - import wasi:cli/stdout@0.2.2; + import wasi:cli/stdout@0.2.3; @since(version = 0.2.0) - import wasi:cli/stderr@0.2.2; + import wasi:cli/stderr@0.2.3; /// TODO: this is a temporary workaround until component tooling is able to /// gracefully handle the absence of stdin. Hosts must return an eof stream /// for this import, which is what wasi-libc + tooling will do automatically /// when this import is properly removed. @since(version = 0.2.0) - import wasi:cli/stdin@0.2.2; + import wasi:cli/stdin@0.2.3; /// This is the default handler to use when user code simply wants to make an /// HTTP request (e.g., via `fetch()`). diff --git a/crates/wasi-http/wit/deps/http/types.wit b/crates/wasi-http/wit/deps/http/types.wit index 40ee770686fc..2498f180ad6c 100644 --- a/crates/wasi-http/wit/deps/http/types.wit +++ b/crates/wasi-http/wit/deps/http/types.wit @@ -4,13 +4,13 @@ @since(version = 0.2.0) interface types { @since(version = 0.2.0) - use wasi:clocks/monotonic-clock@0.2.2.{duration}; + use wasi:clocks/monotonic-clock@0.2.3.{duration}; @since(version = 0.2.0) - use wasi:io/streams@0.2.2.{input-stream, output-stream}; + use wasi:io/streams@0.2.3.{input-stream, output-stream}; @since(version = 0.2.0) - use wasi:io/error@0.2.2.{error as io-error}; + use wasi:io/error@0.2.3.{error as io-error}; @since(version = 0.2.0) - use wasi:io/poll@0.2.2.{pollable}; + use wasi:io/poll@0.2.3.{pollable}; /// This type corresponds to HTTP standard Methods. @since(version = 0.2.0) @@ -36,7 +36,7 @@ interface types { } /// These cases are inspired by the IANA HTTP Proxy Error Types: - /// https://www.iana.org/assignments/http-proxy-status/http-proxy-status.xhtml#table-http-proxy-error-types + /// @since(version = 0.2.0) variant error-code { DNS-timeout, diff --git a/crates/wasi-http/wit/deps/io/error.wit b/crates/wasi-http/wit/deps/io/error.wit index 717135f8cb38..97c6068779ac 100644 --- a/crates/wasi-http/wit/deps/io/error.wit +++ b/crates/wasi-http/wit/deps/io/error.wit @@ -1,4 +1,4 @@ -package wasi:io@0.2.2; +package wasi:io@0.2.3; @since(version = 0.2.0) interface error { diff --git a/crates/wasi-http/wit/deps/io/poll.wit b/crates/wasi-http/wit/deps/io/poll.wit index 49c1c5ede324..9bcbe8e03692 100644 --- a/crates/wasi-http/wit/deps/io/poll.wit +++ b/crates/wasi-http/wit/deps/io/poll.wit @@ -1,4 +1,4 @@ -package wasi:io@0.2.2; +package wasi:io@0.2.3; /// A poll API intended to let users wait for I/O events on multiple handles /// at once. diff --git a/crates/wasi-http/wit/deps/io/streams.wit b/crates/wasi-http/wit/deps/io/streams.wit index 330f7095c881..0de0846293ff 100644 --- a/crates/wasi-http/wit/deps/io/streams.wit +++ b/crates/wasi-http/wit/deps/io/streams.wit @@ -1,4 +1,4 @@ -package wasi:io@0.2.2; +package wasi:io@0.2.3; /// WASI I/O is an I/O abstraction API which is currently focused on providing /// stream types. diff --git a/crates/wasi-http/wit/deps/io/world.wit b/crates/wasi-http/wit/deps/io/world.wit index f7001ccff9bf..f1d2102dca1d 100644 --- a/crates/wasi-http/wit/deps/io/world.wit +++ b/crates/wasi-http/wit/deps/io/world.wit @@ -1,4 +1,4 @@ -package wasi:io@0.2.2; +package wasi:io@0.2.3; @since(version = 0.2.0) world imports { diff --git a/crates/wasi-http/wit/deps/random/insecure-seed.wit b/crates/wasi-http/wit/deps/random/insecure-seed.wit index cdea716cfdb4..67d024d5bf73 100644 --- a/crates/wasi-http/wit/deps/random/insecure-seed.wit +++ b/crates/wasi-http/wit/deps/random/insecure-seed.wit @@ -1,4 +1,4 @@ -package wasi:random@0.2.2; +package wasi:random@0.2.3; /// The insecure-seed interface for seeding hash-map DoS resistance. /// /// It is intended to be portable at least between Unix-family platforms and diff --git a/crates/wasi-http/wit/deps/random/insecure.wit b/crates/wasi-http/wit/deps/random/insecure.wit index b71e85879d11..a07dfab32759 100644 --- a/crates/wasi-http/wit/deps/random/insecure.wit +++ b/crates/wasi-http/wit/deps/random/insecure.wit @@ -1,4 +1,4 @@ -package wasi:random@0.2.2; +package wasi:random@0.2.3; /// The insecure interface for insecure pseudo-random numbers. /// /// It is intended to be portable at least between Unix-family platforms and diff --git a/crates/wasi-http/wit/deps/random/random.wit b/crates/wasi-http/wit/deps/random/random.wit index 0c57e8c80bd4..91957e63308c 100644 --- a/crates/wasi-http/wit/deps/random/random.wit +++ b/crates/wasi-http/wit/deps/random/random.wit @@ -1,4 +1,4 @@ -package wasi:random@0.2.2; +package wasi:random@0.2.3; /// WASI Random is a random data API. /// /// It is intended to be portable at least between Unix-family platforms and diff --git a/crates/wasi-http/wit/deps/random/world.wit b/crates/wasi-http/wit/deps/random/world.wit index 16d68acfa179..0c1218f36e83 100644 --- a/crates/wasi-http/wit/deps/random/world.wit +++ b/crates/wasi-http/wit/deps/random/world.wit @@ -1,4 +1,4 @@ -package wasi:random@0.2.2; +package wasi:random@0.2.3; @since(version = 0.2.0) world imports { diff --git a/crates/wasi-http/wit/deps/sockets/ip-name-lookup.wit b/crates/wasi-http/wit/deps/sockets/ip-name-lookup.wit index d3ab88aedb02..c1d8a47c16b0 100644 --- a/crates/wasi-http/wit/deps/sockets/ip-name-lookup.wit +++ b/crates/wasi-http/wit/deps/sockets/ip-name-lookup.wit @@ -1,7 +1,7 @@ @since(version = 0.2.0) interface ip-name-lookup { @since(version = 0.2.0) - use wasi:io/poll@0.2.2.{pollable}; + use wasi:io/poll@0.2.3.{pollable}; @since(version = 0.2.0) use network.{network, error-code, ip-address}; diff --git a/crates/wasi-http/wit/deps/sockets/network.wit b/crates/wasi-http/wit/deps/sockets/network.wit index 7f2d86a4cfe0..f3f60a3709cb 100644 --- a/crates/wasi-http/wit/deps/sockets/network.wit +++ b/crates/wasi-http/wit/deps/sockets/network.wit @@ -1,7 +1,7 @@ @since(version = 0.2.0) interface network { @unstable(feature = network-error-code) - use wasi:io/error@0.2.2.{error}; + use wasi:io/error@0.2.3.{error}; /// An opaque resource that represents access to (a subset of) the network. /// This enables context-based security for networking. diff --git a/crates/wasi-http/wit/deps/sockets/tcp.wit b/crates/wasi-http/wit/deps/sockets/tcp.wit index 728822dfa0fb..b4cd87fcefc5 100644 --- a/crates/wasi-http/wit/deps/sockets/tcp.wit +++ b/crates/wasi-http/wit/deps/sockets/tcp.wit @@ -1,11 +1,11 @@ @since(version = 0.2.0) interface tcp { @since(version = 0.2.0) - use wasi:io/streams@0.2.2.{input-stream, output-stream}; + use wasi:io/streams@0.2.3.{input-stream, output-stream}; @since(version = 0.2.0) - use wasi:io/poll@0.2.2.{pollable}; + use wasi:io/poll@0.2.3.{pollable}; @since(version = 0.2.0) - use wasi:clocks/monotonic-clock@0.2.2.{duration}; + use wasi:clocks/monotonic-clock@0.2.3.{duration}; @since(version = 0.2.0) use network.{network, error-code, ip-socket-address, ip-address-family}; diff --git a/crates/wasi-http/wit/deps/sockets/udp.wit b/crates/wasi-http/wit/deps/sockets/udp.wit index d8acb2d292b8..01901ca27ffa 100644 --- a/crates/wasi-http/wit/deps/sockets/udp.wit +++ b/crates/wasi-http/wit/deps/sockets/udp.wit @@ -1,7 +1,7 @@ @since(version = 0.2.0) interface udp { @since(version = 0.2.0) - use wasi:io/poll@0.2.2.{pollable}; + use wasi:io/poll@0.2.3.{pollable}; @since(version = 0.2.0) use network.{network, error-code, ip-socket-address, ip-address-family}; diff --git a/crates/wasi-http/wit/deps/sockets/world.wit b/crates/wasi-http/wit/deps/sockets/world.wit index 6e349c756b5e..2f0ad0d7c925 100644 --- a/crates/wasi-http/wit/deps/sockets/world.wit +++ b/crates/wasi-http/wit/deps/sockets/world.wit @@ -1,4 +1,4 @@ -package wasi:sockets@0.2.2; +package wasi:sockets@0.2.3; @since(version = 0.2.0) world imports { diff --git a/crates/wasi-http/wit/world.wit b/crates/wasi-http/wit/world.wit index 75aa81ff0512..db3023637487 100644 --- a/crates/wasi-http/wit/world.wit +++ b/crates/wasi-http/wit/world.wit @@ -2,5 +2,5 @@ package wasmtime:wasi-http; world bindings { - include wasi:http/proxy@0.2.2; + include wasi:http/proxy@0.2.3; } diff --git a/crates/wasi-preview1-component-adapter/src/lib.rs b/crates/wasi-preview1-component-adapter/src/lib.rs index d6b080d4abbe..89a5442ecbfe 100644 --- a/crates/wasi-preview1-component-adapter/src/lib.rs +++ b/crates/wasi-preview1-component-adapter/src/lib.rs @@ -91,12 +91,12 @@ pub mod bindings { package wasmtime:adapter; world adapter { - import wasi:clocks/wall-clock@0.2.2; - import wasi:clocks/monotonic-clock@0.2.2; - import wasi:random/random@0.2.2; - import wasi:cli/stdout@0.2.2; - import wasi:cli/stderr@0.2.2; - import wasi:cli/stdin@0.2.2; + import wasi:clocks/wall-clock@0.2.3; + import wasi:clocks/monotonic-clock@0.2.3; + import wasi:random/random@0.2.3; + import wasi:cli/stdout@0.2.3; + import wasi:cli/stderr@0.2.3; + import wasi:cli/stdin@0.2.3; } "#, world: "wasmtime:adapter/adapter", @@ -114,7 +114,7 @@ pub mod bindings { } } -#[export_name = "wasi:cli/run@0.2.2#run"] +#[export_name = "wasi:cli/run@0.2.3#run"] #[cfg(feature = "command")] pub unsafe extern "C" fn run() -> u32 { #[link(wasm_import_module = "__main_module__")] @@ -456,7 +456,7 @@ impl BumpAlloc { } #[cfg(not(feature = "proxy"))] -#[link(wasm_import_module = "wasi:cli/environment@0.2.2")] +#[link(wasm_import_module = "wasi:cli/environment@0.2.3")] extern "C" { #[link_name = "get-arguments"] fn wasi_cli_get_arguments(rval: *mut WasmStrList); @@ -2155,7 +2155,7 @@ pub unsafe extern "C" fn poll_oneoff( }); } - #[link(wasm_import_module = "wasi:io/poll@0.2.2")] + #[link(wasm_import_module = "wasi:io/poll@0.2.3")] extern "C" { #[link_name = "poll"] fn poll_import(pollables: *const Pollable, len: usize, rval: *mut ReadyList); diff --git a/crates/wasi/src/bindings.rs b/crates/wasi/src/bindings.rs index 72c2c3ff9943..64bcb072818f 100644 --- a/crates/wasi/src/bindings.rs +++ b/crates/wasi/src/bindings.rs @@ -26,7 +26,7 @@ //! // An example of extending the `wasi:cli/command` world with a //! // custom host interface. //! world my-world { -//! include wasi:cli/command@0.2.2; +//! include wasi:cli/command@0.2.3; //! //! import custom-host; //! } @@ -96,7 +96,7 @@ /// // An example of extending the `wasi:cli/command` world with a /// // custom host interface. /// world my-world { -/// include wasi:cli/command@0.2.2; +/// include wasi:cli/command@0.2.3; /// /// import custom-host; /// } diff --git a/crates/wasi/wit/deps/cli/command.wit b/crates/wasi/wit/deps/cli/command.wit index cc7a352c26e7..3a81766d6450 100644 --- a/crates/wasi/wit/deps/cli/command.wit +++ b/crates/wasi/wit/deps/cli/command.wit @@ -1,4 +1,4 @@ -package wasi:cli@0.2.2; +package wasi:cli@0.2.3; @since(version = 0.2.0) world command { diff --git a/crates/wasi/wit/deps/cli/imports.wit b/crates/wasi/wit/deps/cli/imports.wit index ebd7ba173988..8b4e3975ec30 100644 --- a/crates/wasi/wit/deps/cli/imports.wit +++ b/crates/wasi/wit/deps/cli/imports.wit @@ -1,17 +1,17 @@ -package wasi:cli@0.2.2; +package wasi:cli@0.2.3; @since(version = 0.2.0) world imports { @since(version = 0.2.0) - include wasi:clocks/imports@0.2.2; + include wasi:clocks/imports@0.2.3; @since(version = 0.2.0) - include wasi:filesystem/imports@0.2.2; + include wasi:filesystem/imports@0.2.3; @since(version = 0.2.0) - include wasi:sockets/imports@0.2.2; + include wasi:sockets/imports@0.2.3; @since(version = 0.2.0) - include wasi:random/imports@0.2.2; + include wasi:random/imports@0.2.3; @since(version = 0.2.0) - include wasi:io/imports@0.2.2; + include wasi:io/imports@0.2.3; @since(version = 0.2.0) import environment; diff --git a/crates/wasi/wit/deps/cli/stdio.wit b/crates/wasi/wit/deps/cli/stdio.wit index 860313eea94e..1b54f5318a8b 100644 --- a/crates/wasi/wit/deps/cli/stdio.wit +++ b/crates/wasi/wit/deps/cli/stdio.wit @@ -1,7 +1,7 @@ @since(version = 0.2.0) interface stdin { @since(version = 0.2.0) - use wasi:io/streams@0.2.2.{input-stream}; + use wasi:io/streams@0.2.3.{input-stream}; @since(version = 0.2.0) get-stdin: func() -> input-stream; @@ -10,7 +10,7 @@ interface stdin { @since(version = 0.2.0) interface stdout { @since(version = 0.2.0) - use wasi:io/streams@0.2.2.{output-stream}; + use wasi:io/streams@0.2.3.{output-stream}; @since(version = 0.2.0) get-stdout: func() -> output-stream; @@ -19,7 +19,7 @@ interface stdout { @since(version = 0.2.0) interface stderr { @since(version = 0.2.0) - use wasi:io/streams@0.2.2.{output-stream}; + use wasi:io/streams@0.2.3.{output-stream}; @since(version = 0.2.0) get-stderr: func() -> output-stream; diff --git a/crates/wasi/wit/deps/clocks/monotonic-clock.wit b/crates/wasi/wit/deps/clocks/monotonic-clock.wit index 233cace4c0a3..c676fb84d8b4 100644 --- a/crates/wasi/wit/deps/clocks/monotonic-clock.wit +++ b/crates/wasi/wit/deps/clocks/monotonic-clock.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.2.2; +package wasi:clocks@0.2.3; /// WASI Monotonic Clock is a clock API intended to let users measure elapsed /// time. /// @@ -10,7 +10,7 @@ package wasi:clocks@0.2.2; @since(version = 0.2.0) interface monotonic-clock { @since(version = 0.2.0) - use wasi:io/poll@0.2.2.{pollable}; + use wasi:io/poll@0.2.3.{pollable}; /// An instant in time, in nanoseconds. An instant is relative to an /// unspecified initial value, and can only be compared to instances from diff --git a/crates/wasi/wit/deps/clocks/timezone.wit b/crates/wasi/wit/deps/clocks/timezone.wit index 349fb5703f7e..b43e93b23346 100644 --- a/crates/wasi/wit/deps/clocks/timezone.wit +++ b/crates/wasi/wit/deps/clocks/timezone.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.2.2; +package wasi:clocks@0.2.3; @unstable(feature = clocks-timezone) interface timezone { diff --git a/crates/wasi/wit/deps/clocks/wall-clock.wit b/crates/wasi/wit/deps/clocks/wall-clock.wit index ec05a1f1ad56..e00ce08933b1 100644 --- a/crates/wasi/wit/deps/clocks/wall-clock.wit +++ b/crates/wasi/wit/deps/clocks/wall-clock.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.2.2; +package wasi:clocks@0.2.3; /// WASI Wall Clock is a clock API intended to let users query the current /// time. The name "wall" makes an analogy to a "clock on the wall", which /// is not necessarily monotonic as it may be reset. diff --git a/crates/wasi/wit/deps/clocks/world.wit b/crates/wasi/wit/deps/clocks/world.wit index e36802cc8e1c..05f04f797dd2 100644 --- a/crates/wasi/wit/deps/clocks/world.wit +++ b/crates/wasi/wit/deps/clocks/world.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.2.2; +package wasi:clocks@0.2.3; @since(version = 0.2.0) world imports { diff --git a/crates/wasi/wit/deps/filesystem/preopens.wit b/crates/wasi/wit/deps/filesystem/preopens.wit index 410bec1dc2f1..cea97495b50c 100644 --- a/crates/wasi/wit/deps/filesystem/preopens.wit +++ b/crates/wasi/wit/deps/filesystem/preopens.wit @@ -1,11 +1,11 @@ -package wasi:filesystem@0.2.2; +package wasi:filesystem@0.2.3; @since(version = 0.2.0) interface preopens { @since(version = 0.2.0) use types.{descriptor}; - /// Return the set of preopened directories, and their path. + /// Return the set of preopened directories, and their paths. @since(version = 0.2.0) get-directories: func() -> list>; } diff --git a/crates/wasi/wit/deps/filesystem/types.wit b/crates/wasi/wit/deps/filesystem/types.wit index 49e0a30bb814..d229a21f4853 100644 --- a/crates/wasi/wit/deps/filesystem/types.wit +++ b/crates/wasi/wit/deps/filesystem/types.wit @@ -1,4 +1,4 @@ -package wasi:filesystem@0.2.2; +package wasi:filesystem@0.2.3; /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without /// significant overhead. @@ -26,9 +26,9 @@ package wasi:filesystem@0.2.2; @since(version = 0.2.0) interface types { @since(version = 0.2.0) - use wasi:io/streams@0.2.2.{input-stream, output-stream, error}; + use wasi:io/streams@0.2.3.{input-stream, output-stream, error}; @since(version = 0.2.0) - use wasi:clocks/wall-clock@0.2.2.{datetime}; + use wasi:clocks/wall-clock@0.2.3.{datetime}; /// File size or length of a region within a file. @since(version = 0.2.0) @@ -327,7 +327,7 @@ interface types { /// May fail with an error-code describing why the file cannot be appended. /// /// Note: This allows using `write-stream`, which is similar to `write` with - /// `O_APPEND` in in POSIX. + /// `O_APPEND` in POSIX. @since(version = 0.2.0) append-via-stream: func() -> result; @@ -623,7 +623,7 @@ interface types { /// replaced. It may also include a secret value chosen by the /// implementation and not otherwise exposed. /// - /// Implementations are encourated to provide the following properties: + /// Implementations are encouraged to provide the following properties: /// /// - If the file is not modified or replaced, the computed hash value should /// usually not change. diff --git a/crates/wasi/wit/deps/filesystem/world.wit b/crates/wasi/wit/deps/filesystem/world.wit index 8064bd64b8d8..29405bc2cc72 100644 --- a/crates/wasi/wit/deps/filesystem/world.wit +++ b/crates/wasi/wit/deps/filesystem/world.wit @@ -1,4 +1,4 @@ -package wasi:filesystem@0.2.2; +package wasi:filesystem@0.2.3; @since(version = 0.2.0) world imports { diff --git a/crates/wasi/wit/deps/io/error.wit b/crates/wasi/wit/deps/io/error.wit index 717135f8cb38..97c6068779ac 100644 --- a/crates/wasi/wit/deps/io/error.wit +++ b/crates/wasi/wit/deps/io/error.wit @@ -1,4 +1,4 @@ -package wasi:io@0.2.2; +package wasi:io@0.2.3; @since(version = 0.2.0) interface error { diff --git a/crates/wasi/wit/deps/io/poll.wit b/crates/wasi/wit/deps/io/poll.wit index 49c1c5ede324..9bcbe8e03692 100644 --- a/crates/wasi/wit/deps/io/poll.wit +++ b/crates/wasi/wit/deps/io/poll.wit @@ -1,4 +1,4 @@ -package wasi:io@0.2.2; +package wasi:io@0.2.3; /// A poll API intended to let users wait for I/O events on multiple handles /// at once. diff --git a/crates/wasi/wit/deps/io/streams.wit b/crates/wasi/wit/deps/io/streams.wit index 330f7095c881..0de0846293ff 100644 --- a/crates/wasi/wit/deps/io/streams.wit +++ b/crates/wasi/wit/deps/io/streams.wit @@ -1,4 +1,4 @@ -package wasi:io@0.2.2; +package wasi:io@0.2.3; /// WASI I/O is an I/O abstraction API which is currently focused on providing /// stream types. diff --git a/crates/wasi/wit/deps/io/world.wit b/crates/wasi/wit/deps/io/world.wit index f7001ccff9bf..f1d2102dca1d 100644 --- a/crates/wasi/wit/deps/io/world.wit +++ b/crates/wasi/wit/deps/io/world.wit @@ -1,4 +1,4 @@ -package wasi:io@0.2.2; +package wasi:io@0.2.3; @since(version = 0.2.0) world imports { diff --git a/crates/wasi/wit/deps/random/insecure-seed.wit b/crates/wasi/wit/deps/random/insecure-seed.wit index cdea716cfdb4..67d024d5bf73 100644 --- a/crates/wasi/wit/deps/random/insecure-seed.wit +++ b/crates/wasi/wit/deps/random/insecure-seed.wit @@ -1,4 +1,4 @@ -package wasi:random@0.2.2; +package wasi:random@0.2.3; /// The insecure-seed interface for seeding hash-map DoS resistance. /// /// It is intended to be portable at least between Unix-family platforms and diff --git a/crates/wasi/wit/deps/random/insecure.wit b/crates/wasi/wit/deps/random/insecure.wit index b71e85879d11..a07dfab32759 100644 --- a/crates/wasi/wit/deps/random/insecure.wit +++ b/crates/wasi/wit/deps/random/insecure.wit @@ -1,4 +1,4 @@ -package wasi:random@0.2.2; +package wasi:random@0.2.3; /// The insecure interface for insecure pseudo-random numbers. /// /// It is intended to be portable at least between Unix-family platforms and diff --git a/crates/wasi/wit/deps/random/random.wit b/crates/wasi/wit/deps/random/random.wit index 0c57e8c80bd4..91957e63308c 100644 --- a/crates/wasi/wit/deps/random/random.wit +++ b/crates/wasi/wit/deps/random/random.wit @@ -1,4 +1,4 @@ -package wasi:random@0.2.2; +package wasi:random@0.2.3; /// WASI Random is a random data API. /// /// It is intended to be portable at least between Unix-family platforms and diff --git a/crates/wasi/wit/deps/random/world.wit b/crates/wasi/wit/deps/random/world.wit index 16d68acfa179..0c1218f36e83 100644 --- a/crates/wasi/wit/deps/random/world.wit +++ b/crates/wasi/wit/deps/random/world.wit @@ -1,4 +1,4 @@ -package wasi:random@0.2.2; +package wasi:random@0.2.3; @since(version = 0.2.0) world imports { diff --git a/crates/wasi/wit/deps/sockets/ip-name-lookup.wit b/crates/wasi/wit/deps/sockets/ip-name-lookup.wit index d3ab88aedb02..c1d8a47c16b0 100644 --- a/crates/wasi/wit/deps/sockets/ip-name-lookup.wit +++ b/crates/wasi/wit/deps/sockets/ip-name-lookup.wit @@ -1,7 +1,7 @@ @since(version = 0.2.0) interface ip-name-lookup { @since(version = 0.2.0) - use wasi:io/poll@0.2.2.{pollable}; + use wasi:io/poll@0.2.3.{pollable}; @since(version = 0.2.0) use network.{network, error-code, ip-address}; diff --git a/crates/wasi/wit/deps/sockets/network.wit b/crates/wasi/wit/deps/sockets/network.wit index 7f2d86a4cfe0..f3f60a3709cb 100644 --- a/crates/wasi/wit/deps/sockets/network.wit +++ b/crates/wasi/wit/deps/sockets/network.wit @@ -1,7 +1,7 @@ @since(version = 0.2.0) interface network { @unstable(feature = network-error-code) - use wasi:io/error@0.2.2.{error}; + use wasi:io/error@0.2.3.{error}; /// An opaque resource that represents access to (a subset of) the network. /// This enables context-based security for networking. diff --git a/crates/wasi/wit/deps/sockets/tcp.wit b/crates/wasi/wit/deps/sockets/tcp.wit index 728822dfa0fb..b4cd87fcefc5 100644 --- a/crates/wasi/wit/deps/sockets/tcp.wit +++ b/crates/wasi/wit/deps/sockets/tcp.wit @@ -1,11 +1,11 @@ @since(version = 0.2.0) interface tcp { @since(version = 0.2.0) - use wasi:io/streams@0.2.2.{input-stream, output-stream}; + use wasi:io/streams@0.2.3.{input-stream, output-stream}; @since(version = 0.2.0) - use wasi:io/poll@0.2.2.{pollable}; + use wasi:io/poll@0.2.3.{pollable}; @since(version = 0.2.0) - use wasi:clocks/monotonic-clock@0.2.2.{duration}; + use wasi:clocks/monotonic-clock@0.2.3.{duration}; @since(version = 0.2.0) use network.{network, error-code, ip-socket-address, ip-address-family}; diff --git a/crates/wasi/wit/deps/sockets/udp.wit b/crates/wasi/wit/deps/sockets/udp.wit index d8acb2d292b8..01901ca27ffa 100644 --- a/crates/wasi/wit/deps/sockets/udp.wit +++ b/crates/wasi/wit/deps/sockets/udp.wit @@ -1,7 +1,7 @@ @since(version = 0.2.0) interface udp { @since(version = 0.2.0) - use wasi:io/poll@0.2.2.{pollable}; + use wasi:io/poll@0.2.3.{pollable}; @since(version = 0.2.0) use network.{network, error-code, ip-socket-address, ip-address-family}; diff --git a/crates/wasi/wit/deps/sockets/world.wit b/crates/wasi/wit/deps/sockets/world.wit index 6e349c756b5e..2f0ad0d7c925 100644 --- a/crates/wasi/wit/deps/sockets/world.wit +++ b/crates/wasi/wit/deps/sockets/world.wit @@ -1,4 +1,4 @@ -package wasi:sockets@0.2.2; +package wasi:sockets@0.2.3; @since(version = 0.2.0) world imports { diff --git a/crates/wasi/wit/test.wit b/crates/wasi/wit/test.wit index 4013722cd353..904deae96888 100644 --- a/crates/wasi/wit/test.wit +++ b/crates/wasi/wit/test.wit @@ -1,13 +1,13 @@ world test-reactor { - include wasi:cli/imports@0.2.2; + include wasi:cli/imports@0.2.3; export add-strings: func(s: list) -> u32; export get-strings: func() -> list; - use wasi:io/streams@0.2.2.{output-stream}; + use wasi:io/streams@0.2.3.{output-stream}; export write-strings-to: func(o: output-stream) -> result; - use wasi:filesystem/types@0.2.2.{descriptor-stat}; + use wasi:filesystem/types@0.2.3.{descriptor-stat}; export pass-an-imported-record: func(d: descriptor-stat) -> string; } diff --git a/crates/wasi/wit/world.wit b/crates/wasi/wit/world.wit index 0b3c628192ec..689c9c268060 100644 --- a/crates/wasi/wit/world.wit +++ b/crates/wasi/wit/world.wit @@ -2,5 +2,5 @@ package wasmtime:wasi; world bindings { - include wasi:cli/imports@0.2.2; + include wasi:cli/imports@0.2.3; } From 3d8fffbe26d84ab078f1ac84bfa649433d5effc6 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 12 Dec 2024 11:32:50 -0800 Subject: [PATCH 2/2] Update the vendor-wit.sh script to 0.2.3. --- ci/vendor-wit.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/ci/vendor-wit.sh b/ci/vendor-wit.sh index 80b276f8e884..252fb9a863e5 100755 --- a/ci/vendor-wit.sh +++ b/ci/vendor-wit.sh @@ -37,22 +37,22 @@ make_vendor() { cache_dir=$(mktemp -d) make_vendor "wasi" " - cli@v0.2.2 - clocks@v0.2.2 - filesystem@v0.2.2 - io@v0.2.2 - random@v0.2.2 - sockets@v0.2.2 + cli@v0.2.3 + clocks@v0.2.3 + filesystem@v0.2.3 + io@v0.2.3 + random@v0.2.3 + sockets@v0.2.3 " make_vendor "wasi-http" " - cli@v0.2.2 - clocks@v0.2.2 - filesystem@v0.2.2 - io@v0.2.2 - random@v0.2.2 - sockets@v0.2.2 - http@v0.2.2 + cli@v0.2.3 + clocks@v0.2.3 + filesystem@v0.2.3 + io@v0.2.3 + random@v0.2.3 + sockets@v0.2.3 + http@v0.2.3 " make_vendor "wasi-config" "config@f4d699b"