Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to v0.2.2 #47

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ jobs:
./wit-deps lock
git add -N wit/deps
git diff --exit-code
- uses: WebAssembly/wit-abi-up-to-date@v21
- uses: WebAssembly/wit-abi-up-to-date@v22
with:
wit-bindgen: '0.28.0'
wit-bindgen: '0.33.0'
wasm-tools: '1.218.0'
worlds: 'command imports'
features: 'cli-exit-with-code'
1,399 changes: 698 additions & 701 deletions command.md

Large diffs are not rendered by default.

1,397 changes: 697 additions & 700 deletions imports.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion wit/command.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:cli@0.2.1;
package wasi:cli@0.2.2;

@since(version = 0.2.0)
world command {
Expand Down
20 changes: 10 additions & 10 deletions wit/deps.lock
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
[clocks]
url = "https://github.com/WebAssembly/wasi-clocks/archive/main.tar.gz"
sha256 = "ea9d69ee803bc176e23e5268f5e24a2ac485dd1f62a0ab4c748e9d3f901f576f"
sha512 = "5efc22927c46cd56c41e5549ec775561c7fac2ea0d365abc0b55396d9475a7c9f984077a81f84a44a726f1c008fd2fadbffffa4fa53ecd5fbfd05afd379ab428"
sha256 = "c2da62619d1067646316e8592b583d77036d778e28b1154353e0825956b3d6aa"
sha512 = "4d409fc38b31646fc5de70160e81bd3fa67f9c99b4d24543b4fd40a922c7545739869521b8a997efb675d0816de8b001b6af7950e0cb0bc823d89b9f07b286c4"

[filesystem]
url = "https://github.com/WebAssembly/wasi-filesystem/archive/main.tar.gz"
sha256 = "cfe8c420e8b857de612ae2a3336680dae16b95c93c8ba3a6ff05b21210966740"
sha512 = "3c00c5544a58658e3e8025677091685286027fd49f37abf198c30b4e83b9e68f19723975aaa98794fba9f425ae9ef4f3dc0f5b9cf59203b5ecfaadf62b296f9a"
sha256 = "69e220ec22593f097c7f486dd9e4f95576ef7056d3d531a86a277654872997ba"
sha512 = "457c027aebd1430e924564b3bb2477bc163083cb1029105c1432cbdc165cdf3cce4ac62dbb8e43e3dec09e24a6b2029204212e2f0e3919137cb207165368e157"

[io]
url = "https://github.com/WebAssembly/wasi-io/archive/main.tar.gz"
sha256 = "2a74bd811adc46b5a0f19827ddbde89870e52b17615f4d0873f06fd977250caf"
sha512 = "94624f00c66e66203592cee820f80b1ba91ecdb71f682c154f25eaf71f8d8954197dcb64503bc21e72ed5e812af7eae876df47b7eb727b02db3a74a7ce0aefca"
sha256 = "6d8dbfaaaa685167c1829616dc7265f5f3cb776845879555612d56544f6d9bfc"
sha512 = "52219562c4183503169cd2947b8164e1c96974500a5adf15bbf382c5992a10a626cc89c3b319204aeda6698ce59cbca2c42f98f7fde296aa77b9db4b41154dbe"

[random]
url = "https://github.com/WebAssembly/wasi-random/archive/main.tar.gz"
sha256 = "9e2d5056186f81b2e7f96bc97d2babd0341840f6abb4f170449b70992f1b598f"
sha512 = "67bf41d8d5d4b7af084124ee85196585225785969059f59e2f9ddb77ac1a8095cfe811ae29d076aac817418fa01064d7b9fbc0233930bace680758eeb21e36f8"
sha256 = "b4bb285b1c51aac2f8911f6b44ba1587108a2b24f910fe4774414dc286678b66"
sha512 = "bc2ffca0ae48f54977a763a70fcfcd5f4fca6b7c530916352f98c59627cc3f5899e47b6308bd9848b8c72e14db57e254757d580010a3d56e6888dafce3dcb679"

[sockets]
url = "https://github.com/WebAssembly/wasi-sockets/archive/main.tar.gz"
sha256 = "4c361137a7e61e8b9a73da2a0899dd9ad1a0c2dfee7d310cf168704c57b7a07c"
sha512 = "348b4ef381f57aec23d48537df8b69ab8963587dcb056e94c4cd5657e217677a4ee2a545868a5c829d2334cc6b8b0a61d3e72797999f44d78553fbd3a73c5b8d"
sha256 = "f254783796170fdeac6756496cc6169903a88adeda7a5895265414bc63ba4d66"
sha512 = "3f68e874beb0ac9729d1738546a430f2f8b369eb510d3cd6dfcfc41427acb52a82701d73584b8ab637b8c3908c5d4f7a7d4806032cc5d375643fad0ebf84e053"
4 changes: 2 additions & 2 deletions wit/deps/clocks/monotonic-clock.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:clocks@0.2.1;
package wasi:clocks@0.2.2;
/// WASI Monotonic Clock is a clock API intended to let users measure elapsed
/// time.
///
Expand All @@ -10,7 +10,7 @@ package wasi:clocks@0.2.1;
@since(version = 0.2.0)
interface monotonic-clock {
@since(version = 0.2.0)
use wasi:io/poll@0.2.1.{pollable};
use wasi:io/poll@0.2.2.{pollable};

/// An instant in time, in nanoseconds. An instant is relative to an
/// unspecified initial value, and can only be compared to instances from
Expand Down
2 changes: 1 addition & 1 deletion wit/deps/clocks/timezone.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:clocks@0.2.1;
package wasi:clocks@0.2.2;

@unstable(feature = clocks-timezone)
interface timezone {
Expand Down
2 changes: 1 addition & 1 deletion wit/deps/clocks/wall-clock.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:clocks@0.2.1;
package wasi:clocks@0.2.2;
/// 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.
Expand Down
2 changes: 1 addition & 1 deletion wit/deps/clocks/world.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:clocks@0.2.1;
package wasi:clocks@0.2.2;

@since(version = 0.2.0)
world imports {
Expand Down
2 changes: 1 addition & 1 deletion wit/deps/filesystem/preopens.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:filesystem@0.2.1;
package wasi:filesystem@0.2.2;

@since(version = 0.2.0)
interface preopens {
Expand Down
12 changes: 3 additions & 9 deletions wit/deps/filesystem/types.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:filesystem@0.2.1;
package wasi:filesystem@0.2.2;
/// 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.
Expand Down Expand Up @@ -26,9 +26,9 @@ package wasi:filesystem@0.2.1;
@since(version = 0.2.0)
interface types {
@since(version = 0.2.0)
use wasi:io/streams@0.2.1.{input-stream, output-stream, error};
use wasi:io/streams@0.2.2.{input-stream, output-stream, error};
@since(version = 0.2.0)
use wasi:clocks/wall-clock@0.2.1.{datetime};
use wasi:clocks/wall-clock@0.2.2.{datetime};

/// File size or length of a region within a file.
@since(version = 0.2.0)
Expand Down Expand Up @@ -523,12 +523,6 @@ interface types {

/// Open a file or directory.
///
/// The returned descriptor is not guaranteed to be the lowest-numbered
/// descriptor not currently open/ it is randomized to prevent applications
/// from depending on making assumptions about indexes, since this is
/// error-prone in multi-threaded contexts. The returned descriptor is
/// guaranteed to be less than 2**31.
///
/// If `flags` contains `descriptor-flags::mutate-directory`, and the base
/// descriptor doesn't have `descriptor-flags::mutate-directory` set,
/// `open-at` fails with `error-code::read-only`.
Expand Down
2 changes: 1 addition & 1 deletion wit/deps/filesystem/world.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:filesystem@0.2.1;
package wasi:filesystem@0.2.2;

@since(version = 0.2.0)
world imports {
Expand Down
2 changes: 1 addition & 1 deletion wit/deps/io/error.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:io@0.2.1;
package wasi:io@0.2.2;

@since(version = 0.2.0)
interface error {
Expand Down
2 changes: 1 addition & 1 deletion wit/deps/io/poll.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:io@0.2.1;
package wasi:io@0.2.2;

/// A poll API intended to let users wait for I/O events on multiple handles
/// at once.
Expand Down
6 changes: 5 additions & 1 deletion wit/deps/io/streams.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:io@0.2.1;
package wasi:io@0.2.2;

/// WASI I/O is an I/O abstraction API which is currently focused on providing
/// stream types.
Expand All @@ -18,6 +18,9 @@ interface streams {
/// The last operation (a write or flush) failed before completion.
///
/// More information is available in the `error` payload.
///
/// After this, the stream will be closed. All future operations return
/// `stream-error::closed`.
last-operation-failed(error),
/// The stream is closed: no more input will be accepted by the
/// stream. A closed output-stream will return this error on all
Expand Down Expand Up @@ -205,6 +208,7 @@ interface streams {
/// The created `pollable` is a child resource of the `output-stream`.
/// Implementations may trap if the `output-stream` is dropped before
/// all derived `pollable`s created with this function are dropped.
@since(version = 0.2.0)
subscribe: func() -> pollable;

/// Write zeroes to a stream.
Expand Down
2 changes: 1 addition & 1 deletion wit/deps/io/world.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:io@0.2.1;
package wasi:io@0.2.2;

@since(version = 0.2.0)
world imports {
Expand Down
2 changes: 1 addition & 1 deletion wit/deps/random/insecure-seed.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:random@0.2.1;
package wasi:random@0.2.2;
/// The insecure-seed interface for seeding hash-map DoS resistance.
///
/// It is intended to be portable at least between Unix-family platforms and
Expand Down
2 changes: 1 addition & 1 deletion wit/deps/random/insecure.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:random@0.2.1;
package wasi:random@0.2.2;
/// The insecure interface for insecure pseudo-random numbers.
///
/// It is intended to be portable at least between Unix-family platforms and
Expand Down
2 changes: 1 addition & 1 deletion wit/deps/random/random.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:random@0.2.1;
package wasi:random@0.2.2;
/// WASI Random is a random data API.
///
/// It is intended to be portable at least between Unix-family platforms and
Expand Down
2 changes: 1 addition & 1 deletion wit/deps/random/world.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:random@0.2.1;
package wasi:random@0.2.2;

@since(version = 0.2.0)
world imports {
Expand Down
4 changes: 2 additions & 2 deletions wit/deps/sockets/ip-name-lookup.wit
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@since(version = 0.2.0)
interface ip-name-lookup {
@since(version = 0.2.0)
use wasi:io/poll@0.2.1.{pollable};
use wasi:io/poll@0.2.2.{pollable};
@since(version = 0.2.0)
use network.{network, error-code, ip-address};

Expand Down Expand Up @@ -48,7 +48,7 @@ interface ip-name-lookup {

/// Create a `pollable` which will resolve once the stream is ready for I/O.
///
/// Note: this function is here for WASI Preview2 only.
/// Note: this function is here for WASI 0.2 only.
/// It's planned to be removed when `future` is natively supported in Preview3.
@since(version = 0.2.0)
subscribe: func() -> pollable;
Expand Down
16 changes: 16 additions & 0 deletions wit/deps/sockets/network.wit
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@since(version = 0.2.0)
interface network {
@unstable(feature = network-error-code)
use wasi:io/error@0.2.2.{error};

/// An opaque resource that represents access to (a subset of) the network.
/// This enables context-based security for networking.
/// There is no need for this to map 1:1 to a physical network interface.
Expand Down Expand Up @@ -105,6 +108,19 @@ interface network {
permanent-resolver-failure,
}

/// Attempts to extract a network-related `error-code` from the stream
/// `error` provided.
///
/// Stream operations which return `stream-error::last-operation-failed`
/// have a payload with more information about the operation that failed.
/// This payload can be passed through to this function to see if there's
/// network-related information about the error to return.
///
/// Note that this function is fallible because not all stream-related
/// errors are network-related errors.
@unstable(feature = network-error-code)
network-error-code: func(err: borrow<error>) -> option<error-code>;

@since(version = 0.2.0)
enum ip-address-family {
/// Similar to `AF_INET` in POSIX.
Expand Down
8 changes: 4 additions & 4 deletions wit/deps/sockets/tcp.wit
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@since(version = 0.2.0)
interface tcp {
@since(version = 0.2.0)
use wasi:io/streams@0.2.1.{input-stream, output-stream};
use wasi:io/streams@0.2.2.{input-stream, output-stream};
@since(version = 0.2.0)
use wasi:io/poll@0.2.1.{pollable};
use wasi:io/poll@0.2.2.{pollable};
@since(version = 0.2.0)
use wasi:clocks/monotonic-clock@0.2.1.{duration};
use wasi:clocks/monotonic-clock@0.2.2.{duration};
@since(version = 0.2.0)
use network.{network, error-code, ip-socket-address, ip-address-family};

Expand Down Expand Up @@ -353,7 +353,7 @@ interface tcp {
/// See <https://github.com/WebAssembly/wasi-sockets/blob/main/TcpSocketOperationalSemantics.md#pollable-readiness>
/// for more information.
///
/// Note: this function is here for WASI Preview2 only.
/// Note: this function is here for WASI 0.2 only.
/// It's planned to be removed when `future` is natively supported in Preview3.
@since(version = 0.2.0)
subscribe: func() -> pollable;
Expand Down
8 changes: 4 additions & 4 deletions wit/deps/sockets/udp.wit
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@since(version = 0.2.0)
interface udp {
@since(version = 0.2.0)
use wasi:io/poll@0.2.1.{pollable};
use wasi:io/poll@0.2.2.{pollable};
@since(version = 0.2.0)
use network.{network, error-code, ip-socket-address, ip-address-family};

Expand Down Expand Up @@ -184,7 +184,7 @@ interface udp {

/// Create a `pollable` which will resolve once the socket is ready for I/O.
///
/// Note: this function is here for WASI Preview2 only.
/// Note: this function is here for WASI 0.2 only.
/// It's planned to be removed when `future` is natively supported in Preview3.
@since(version = 0.2.0)
subscribe: func() -> pollable;
Expand Down Expand Up @@ -220,7 +220,7 @@ interface udp {

/// Create a `pollable` which will resolve once the stream is ready to receive again.
///
/// Note: this function is here for WASI Preview2 only.
/// Note: this function is here for WASI 0.2 only.
/// It's planned to be removed when `future` is natively supported in Preview3.
@since(version = 0.2.0)
subscribe: func() -> pollable;
Expand Down Expand Up @@ -280,7 +280,7 @@ interface udp {

/// Create a `pollable` which will resolve once the stream is ready to send again.
///
/// Note: this function is here for WASI Preview2 only.
/// Note: this function is here for WASI 0.2 only.
/// It's planned to be removed when `future` is natively supported in Preview3.
@since(version = 0.2.0)
subscribe: func() -> pollable;
Expand Down
2 changes: 1 addition & 1 deletion wit/deps/sockets/world.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:sockets@0.2.1;
package wasi:sockets@0.2.2;

@since(version = 0.2.0)
world imports {
Expand Down
12 changes: 6 additions & 6 deletions wit/imports.wit
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package wasi:cli@0.2.1;
package wasi:cli@0.2.2;

@since(version = 0.2.0)
world imports {
@since(version = 0.2.0)
include wasi:clocks/imports@0.2.1;
include wasi:clocks/imports@0.2.2;
@since(version = 0.2.0)
include wasi:filesystem/imports@0.2.1;
include wasi:filesystem/imports@0.2.2;
@since(version = 0.2.0)
include wasi:sockets/imports@0.2.1;
include wasi:sockets/imports@0.2.2;
@since(version = 0.2.0)
include wasi:random/imports@0.2.1;
include wasi:random/imports@0.2.2;
@since(version = 0.2.0)
include wasi:io/imports@0.2.1;
include wasi:io/imports@0.2.2;

@since(version = 0.2.0)
import environment;
Expand Down
6 changes: 3 additions & 3 deletions wit/stdio.wit
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@since(version = 0.2.0)
interface stdin {
@since(version = 0.2.0)
use wasi:io/streams@0.2.1.{input-stream};
use wasi:io/streams@0.2.2.{input-stream};

@since(version = 0.2.0)
get-stdin: func() -> input-stream;
Expand All @@ -10,7 +10,7 @@ interface stdin {
@since(version = 0.2.0)
interface stdout {
@since(version = 0.2.0)
use wasi:io/streams@0.2.1.{output-stream};
use wasi:io/streams@0.2.2.{output-stream};

@since(version = 0.2.0)
get-stdout: func() -> output-stream;
Expand All @@ -19,7 +19,7 @@ interface stdout {
@since(version = 0.2.0)
interface stderr {
@since(version = 0.2.0)
use wasi:io/streams@0.2.1.{output-stream};
use wasi:io/streams@0.2.2.{output-stream};

@since(version = 0.2.0)
get-stderr: func() -> output-stream;
Expand Down