Skip to content

Commit

Permalink
import published wasip2 0.2.3 wits (#635)
Browse files Browse the repository at this point in the history
  • Loading branch information
pchickey authored Dec 5, 2024
1 parent 63a46f6 commit d93b745
Show file tree
Hide file tree
Showing 26 changed files with 55 additions and 55 deletions.
2 changes: 1 addition & 1 deletion wasip2/cli/command.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:cli@0.2.2;
package wasi:cli@0.2.3;

@since(version = 0.2.0)
world command {
Expand Down
12 changes: 6 additions & 6 deletions wasip2/cli/imports.wit
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
6 changes: 3 additions & 3 deletions wasip2/cli/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.2.{input-stream};
use wasi:io/streams@0.2.3.{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.2.{output-stream};
use wasi:io/streams@0.2.3.{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.2.{output-stream};
use wasi:io/streams@0.2.3.{output-stream};

@since(version = 0.2.0)
get-stderr: func() -> output-stream;
Expand Down
4 changes: 2 additions & 2 deletions wasip2/clocks/monotonic-clock.wit
Original file line number Diff line number Diff line change
@@ -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.
///
Expand All @@ -10,7 +10,7 @@ package wasi:[email protected];
@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
Expand Down
2 changes: 1 addition & 1 deletion wasip2/clocks/timezone.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:clocks@0.2.2;
package wasi:clocks@0.2.3;

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

@since(version = 0.2.0)
world imports {
Expand Down
4 changes: 2 additions & 2 deletions wasip2/filesystem/preopens.wit
Original file line number Diff line number Diff line change
@@ -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<tuple<descriptor, string>>;
}
10 changes: 5 additions & 5 deletions wasip2/filesystem/types.wit
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -26,9 +26,9 @@ package wasi:[email protected];
@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)
Expand Down Expand Up @@ -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<output-stream, error-code>;

Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion wasip2/filesystem/world.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:filesystem@0.2.2;
package wasi:filesystem@0.2.3;

@since(version = 0.2.0)
world imports {
Expand Down
2 changes: 1 addition & 1 deletion wasip2/http/handler.wit
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface incoming-handler {
/// sent. This enables both streaming to the response body, and performing other
/// work.
///
/// The implementer of this function must write a response to the
/// The implementor of this function must write a response to the
/// `response-outparam` before returning, or else the caller will respond
/// with an error on its behalf.
@since(version = 0.2.0)
Expand Down
14 changes: 7 additions & 7 deletions wasip2/http/proxy.wit
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
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.
@since(version = 0.2.0)
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()`).
Expand Down
10 changes: 5 additions & 5 deletions wasip2/http/types.wit
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
/// <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,
Expand Down
2 changes: 1 addition & 1 deletion wasip2/io/error.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:io@0.2.2;
package wasi:io@0.2.3;

@since(version = 0.2.0)
interface error {
Expand Down
2 changes: 1 addition & 1 deletion wasip2/io/poll.wit
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion wasip2/io/streams.wit
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion wasip2/io/world.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:io@0.2.2;
package wasi:io@0.2.3;

@since(version = 0.2.0)
world imports {
Expand Down
2 changes: 1 addition & 1 deletion wasip2/random/insecure-seed.wit
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion wasip2/random/insecure.wit
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion wasip2/random/random.wit
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion wasip2/random/world.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:random@0.2.2;
package wasi:random@0.2.3;

@since(version = 0.2.0)
world imports {
Expand Down
2 changes: 1 addition & 1 deletion wasip2/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.2.{pollable};
use wasi:io/poll@0.2.3.{pollable};
@since(version = 0.2.0)
use network.{network, error-code, ip-address};

Expand Down
2 changes: 1 addition & 1 deletion wasip2/sockets/network.wit
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
12 changes: 6 additions & 6 deletions wasip2/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.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};

Expand Down Expand Up @@ -66,7 +66,7 @@ interface tcp {
/// - `not-in-progress`: A `bind` operation is not in progress.
/// - `would-block`: Can't finish the operation, it is still in progress. (EWOULDBLOCK, EAGAIN)
///
/// # Implementers note
/// # Implementors note
/// When binding to a non-zero port, this bind operation shouldn't be affected by the TIME_WAIT
/// state of a recently closed socket on the same local address. In practice this means that the SO_REUSEADDR
/// socket option should be set implicitly on all platforms, except on Windows where this is the default behavior
Expand Down Expand Up @@ -115,7 +115,7 @@ interface tcp {
/// - `not-in-progress`: A connect operation is not in progress.
/// - `would-block`: Can't finish the operation, it is still in progress. (EWOULDBLOCK, EAGAIN)
///
/// # Implementers note
/// # Implementors note
/// The POSIX equivalent of `start-connect` is the regular `connect` syscall.
/// Because all WASI sockets are non-blocking this is expected to return
/// EINPROGRESS, which should be translated to `ok()` in WASI.
Expand Down Expand Up @@ -148,7 +148,7 @@ interface tcp {
/// - `not-in-progress`: A listen operation is not in progress.
/// - `would-block`: Can't finish the operation, it is still in progress. (EWOULDBLOCK, EAGAIN)
///
/// # Implementers note
/// # Implementors note
/// Unlike in POSIX, in WASI the listen operation is async. This enables
/// interactive WASI hosts to inject permission prompts. Runtimes that
/// don't want to make use of this ability can simply call the native
Expand Down
4 changes: 2 additions & 2 deletions wasip2/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.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};

Expand Down Expand Up @@ -55,7 +55,7 @@ interface udp {
/// - `not-in-progress`: A `bind` operation is not in progress.
/// - `would-block`: Can't finish the operation, it is still in progress. (EWOULDBLOCK, EAGAIN)
///
/// # Implementers note
/// # Implementors note
/// Unlike in POSIX, in WASI the bind operation is async. This enables
/// interactive WASI hosts to inject permission prompts. Runtimes that
/// don't want to make use of this ability can simply call the native
Expand Down
2 changes: 1 addition & 1 deletion wasip2/sockets/world.wit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wasi:sockets@0.2.2;
package wasi:sockets@0.2.3;

@since(version = 0.2.0)
world imports {
Expand Down

0 comments on commit d93b745

Please sign in to comment.