diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 52a7b9e..248ca1d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,6 +18,7 @@ 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' diff --git a/imports.md b/imports.md index 737ff7d..f494ad3 100644 --- a/imports.md +++ b/imports.md @@ -1,29 +1,29 @@ -
wasi:sockets/network@0.2.1
wasi:sockets/instance-network@0.2.1
wasi:io/poll@0.2.1
wasi:sockets/udp@0.2.1
wasi:sockets/udp-create-socket@0.2.1
wasi:io/error@0.2.1
wasi:io/streams@0.2.1
wasi:clocks/monotonic-clock@0.2.1
wasi:sockets/tcp@0.2.1
wasi:sockets/tcp-create-socket@0.2.1
wasi:sockets/ip-name-lookup@0.2.1
wasi:sockets/network@0.2.2
wasi:sockets/instance-network@0.2.2
wasi:io/poll@0.2.2
wasi:sockets/udp@0.2.2
wasi:sockets/udp-create-socket@0.2.2
wasi:io/error@0.2.2
wasi:io/streams@0.2.2
wasi:clocks/monotonic-clock@0.2.2
wasi:sockets/tcp@0.2.2
wasi:sockets/tcp-create-socket@0.2.2
wasi:sockets/ip-name-lookup@0.2.2
resource network
resource network
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.
-enum error-code
enum error-code
Error codes.
In theory, every API can return any error code. In practice, API's typically only return the errors documented per API @@ -39,220 +39,220 @@ combined with a couple of errors that are always possible:
Unknown error
Access denied.
POSIX equivalent: EACCES, EPERM
The operation is not supported.
POSIX equivalent: EOPNOTSUPP
One of the arguments is invalid.
POSIX equivalent: EINVAL
Not enough memory to complete the operation.
POSIX equivalent: ENOMEM, ENOBUFS, EAI_MEMORY
The operation timed out before it could finish completely.
This operation is incompatible with another asynchronous operation that is already in progress.
POSIX equivalent: EALREADY
Trying to finish an asynchronous operation that: - has not been started yet, or: - was already finished by a previous `finish-*` call.
Note: this is scheduled to be removed when future
s are natively supported.
The operation has been aborted because it could not be completed immediately.
Note: this is scheduled to be removed when future
s are natively supported.
The operation is not valid in the socket's current state.
A new socket resource could not be created because of a system limit.
A bind operation failed because the provided address is not an address that the `network` can bind to.
A bind operation failed because the provided address is already in use or because there are no ephemeral ports available.
The remote address is not reachable
The TCP connection was forcefully rejected
The TCP connection was reset.
A TCP connection was aborted.
The size of a datagram sent to a UDP socket exceeded the maximum supported size.
Name does not exist or has no suitable associated IP addresses.
A temporary failure in name resolution occurred.
A permanent failure in name resolution occurred.
enum ip-address-family
enum ip-address-family
tuple ipv4-address
tuple ipv4-address
tuple ipv6-address
tuple ipv6-address
0
: u16
1
: u16
2
: u16
3
: u16
4
: u16
5
: u16
6
: u16
7
: u16
0
: u16
1
: u16
2
: u16
3
: u16
4
: u16
5
: u16
6
: u16
7
: u16
variant ip-address
variant ip-address
ipv4
: ipv4-address
ipv6
: ipv6-address
ipv4
: ipv4-address
ipv6
: ipv6-address
record ipv4-socket-address
record ipv4-socket-address
sin_port
address
: ipv4-address
address
: ipv4-address
sin_addr
record ipv6-socket-address
record ipv6-socket-address
sin6_port
sin6_flowinfo
address
: ipv6-address
address
: ipv6-address
sin6_addr
sin6_scope_id
variant ip-socket-address
variant ip-socket-address
ipv4
: ipv4-socket-address
ipv6
: ipv6-socket-address
ipv4
: ipv4-socket-address
ipv6
: ipv6-socket-address
This interface provides a value-export of the default network handle..
type network
type network
----
instance-network: func
instance-network: func
Get a handle to the default network.
A poll API intended to let users wait for I/O events on multiple handles at once.
resource pollable
resource pollable
pollable
represents a single I/O event which may be ready, or not.[method]pollable.ready: func
[method]pollable.ready: func
Return the readiness of a pollable. This function never blocks.
Returns true
when the pollable is ready, and false
otherwise.
[method]pollable.block: func
[method]pollable.block: func
block
returns immediately if the pollable is ready, and otherwise
blocks until ready.
This function is equivalent to calling poll.poll
on a list
containing only this pollable.
poll: func
poll: func
Poll for completion on a set of pollables.
This function takes a list of pollables, which identify I/O sources of interest, and waits until one or more of the events is ready for I/O.
@@ -271,56 +271,56 @@ the pollables has an error, it is indicated by marking the source as being ready for I/O.type pollable
type pollable
-#### `type network` +#### `type network` [`network`](#network)
-#### `type error-code` +#### `type error-code` [`error-code`](#error_code)
-#### `type ip-socket-address` +#### `type ip-socket-address` [`ip-socket-address`](#ip_socket_address)
-#### `type ip-address-family` +#### `type ip-address-family` [`ip-address-family`](#ip_address_family)
-#### `record incoming-datagram` +#### `record incoming-datagram`
A received datagram.
The payload.
Theoretical max size: ~64 KiB. In practice, typically less than 1500 bytes.
remote-address
: ip-socket-address
remote-address
: ip-socket-address
The source address.
This field is guaranteed to match the remote address the stream was initialized with, if any.
Equivalent to the src_addr
out parameter of recvfrom
.
record outgoing-datagram
record outgoing-datagram
A datagram to be sent out.
The payload.
remote-address
: option<ip-socket-address
>
remote-address
: option<ip-socket-address
>
The destination address.
The requirements on this field depend on how the stream was initialized:
If this value is None, the send operation is equivalent to send
in POSIX. Otherwise it is equivalent to sendto
.
resource udp-socket
resource udp-socket
A UDP socket handle.
-resource incoming-datagram-stream
resource outgoing-datagram-stream
resource incoming-datagram-stream
resource outgoing-datagram-stream
[method]udp-socket.start-bind: func
[method]udp-socket.start-bind: func
Bind the socket to a specific network on the provided IP address and port.
If the IP address is zero (0.0.0.0
in IPv4, ::
in IPv6), it is left to the implementation to decide which
network interface(s) to bind to.
@@ -365,24 +365,24 @@ don't want to make use of this ability can simply call the native
self
: borrow<udp-socket
>network
: borrow<network
>local-address
: ip-socket-address
self
: borrow<udp-socket
>network
: borrow<network
>local-address
: ip-socket-address
error-code
>error-code
>[method]udp-socket.finish-bind: func
[method]udp-socket.finish-bind: func
self
: borrow<udp-socket
>self
: borrow<udp-socket
>error-code
>error-code
>[method]udp-socket.stream: func
[method]udp-socket.stream: func
Set up inbound & outbound communication channels, optionally to a specific peer.
This function only changes the local socket configuration and does not generate any network traffic.
On success, the remote-address
of the socket is updated. The local-address
may be updated as well,
@@ -423,14 +423,14 @@ if (remote_address is Some) {
self
: borrow<udp-socket
>remote-address
: option<ip-socket-address
>self
: borrow<udp-socket
>remote-address
: option<ip-socket-address
>incoming-datagram-stream
>, own<outgoing-datagram-stream
>), error-code
>incoming-datagram-stream
>, own<outgoing-datagram-stream
>), error-code
>[method]udp-socket.local-address: func
[method]udp-socket.local-address: func
Get the current bound address.
POSIX mentions:
@@ -451,13 +451,13 @@ stored in the object pointed to byaddress
is unspecified.Params
-
- +
self
: borrow<udp-socket
>self
: borrow<udp-socket
>Return values
-
-- result<
+ip-socket-address
,error-code
>- result<
ip-socket-address
,error-code
>+
[method]udp-socket.remote-address: func
[method]udp-socket.remote-address: func
Get the address the socket is currently streaming to.
Typical errors
@@ -472,24 +472,24 @@ stored in the object pointed to by
address
is unspecified.Params
-
- +
self
: borrow<udp-socket
>self
: borrow<udp-socket
>Return values
-
-- result<
+ip-socket-address
,error-code
>- result<
ip-socket-address
,error-code
>+
[method]udp-socket.address-family: func
[method]udp-socket.address-family: func
Whether this is a IPv4 or IPv6 socket.
Equivalent to the SO_DOMAIN socket option.
Params
-
- +
self
: borrow<udp-socket
>self
: borrow<udp-socket
>Return values
-+
[method]udp-socket.unicast-hop-limit: func
[method]udp-socket.unicast-hop-limit: func
Equivalent to the IP_TTL & IPV6_UNICAST_HOPS socket options.
If the provided value is 0, an
invalid-argument
error is returned.Typical errors
@@ -498,23 +498,23 @@ stored in the object pointed to byaddress
is unspecified.Params
-
- +
self
: borrow<udp-socket
>self
: borrow<udp-socket
>Return values
-
-- result<
+u8
,error-code
>- result<
u8
,error-code
>+
[method]udp-socket.set-unicast-hop-limit: func
[method]udp-socket.set-unicast-hop-limit: func
Params
-
- -
self
: borrow<udp-socket
>- +
value
:u8
- +
self
: borrow<udp-socket
>value
:u8
Return values
-
-- result<_,
+error-code
>- result<_,
error-code
>+
[method]udp-socket.receive-buffer-size: func
[method]udp-socket.receive-buffer-size: func
The kernel buffer space reserved for sends/receives on this socket.
If the provided value is 0, an
invalid-argument
error is returned. Any other value will never cause an error, but it might be silently clamped and/or rounded. @@ -526,54 +526,54 @@ I.e. after setting a value, reading the same setting back may return a differentParams
-
- +
self
: borrow<udp-socket
>self
: borrow<udp-socket
>Return values
-
-- result<
+u64
,error-code
>- result<
u64
,error-code
>+
[method]udp-socket.set-receive-buffer-size: func
[method]udp-socket.set-receive-buffer-size: func
Params
-
- -
self
: borrow<udp-socket
>- +
value
:u64
- +
self
: borrow<udp-socket
>value
:u64
Return values
-
-- result<_,
+error-code
>- result<_,
error-code
>+
[method]udp-socket.send-buffer-size: func
[method]udp-socket.send-buffer-size: func
Params
-
- +
self
: borrow<udp-socket
>self
: borrow<udp-socket
>Return values
-
-- result<
+u64
,error-code
>- result<
u64
,error-code
>+
[method]udp-socket.set-send-buffer-size: func
[method]udp-socket.set-send-buffer-size: func
Params
-
- -
self
: borrow<udp-socket
>- +
value
:u64
- +
self
: borrow<udp-socket
>value
:u64
Return values
-
-- result<_,
+error-code
>- result<_,
error-code
>+
[method]udp-socket.subscribe: func
[method]udp-socket.subscribe: func
Create a
pollable
which will resolve once the socket is ready for I/O.Note: this function is here for WASI Preview2 only. It's planned to be removed when
future
is natively supported in Preview3.Params
-
- +
self
: borrow<udp-socket
>self
: borrow<udp-socket
>Return values
-+
[method]incoming-datagram-stream.receive: func
[method]incoming-datagram-stream.receive: func
Receive messages on the socket.
This function attempts to receive up to
@@ -601,26 +601,26 @@ This function never returnsmax-results
datagrams on the socket without blocking. The returned list may contain fewer elements than requested, but never more.error(would-block)
.Params
-
- -
self
: borrow<incoming-datagram-stream
>- +
max-results
:u64
- +
self
: borrow<incoming-datagram-stream
>max-results
:u64
Return values
-
-- result<list<
+incoming-datagram
>,error-code
>- result<list<
incoming-datagram
>,error-code
>+
[method]incoming-datagram-stream.subscribe: func
[method]incoming-datagram-stream.subscribe: func
Create a
pollable
which will resolve once the stream is ready to receive again.Note: this function is here for WASI Preview2 only. It's planned to be removed when
future
is natively supported in Preview3.Params
-
- +
self
: borrow<incoming-datagram-stream
>self
: borrow<incoming-datagram-stream
>Return values
-+
[method]outgoing-datagram-stream.check-send: func
[method]outgoing-datagram-stream.check-send: func
Check readiness for sending. This function never blocks.
Returns the number of datagrams permitted for the next call to
send
, or an error. Callingsend
with more datagrams than this function has @@ -631,13 +631,13 @@ error.Never returns
would-block
.Params
-
- +
self
: borrow<outgoing-datagram-stream
>self
: borrow<outgoing-datagram-stream
>Return values
-
-- result<
+u64
,error-code
>- result<
u64
,error-code
>+
[method]outgoing-datagram-stream.send: func
[method]outgoing-datagram-stream.send: func
Send messages on the socket.
This function attempts to send all provided
datagrams
on the socket without blocking and returns how many messages were actually sent (or queued for sending). This function never @@ -672,43 +672,43 @@ eithercheck-send
was not called ordatagrams
containsParams
-
- -
self
: borrow<outgoing-datagram-stream
>- +
datagrams
: list<outgoing-datagram
>- +
self
: borrow<outgoing-datagram-stream
>datagrams
: list<outgoing-datagram
>Return values
-
-- result<
+u64
,error-code
>- result<
u64
,error-code
>+
[method]outgoing-datagram-stream.subscribe: func
[method]outgoing-datagram-stream.subscribe: func
Create a
pollable
which will resolve once the stream is ready to send again.Note: this function is here for WASI Preview2 only. It's planned to be removed when
future
is natively supported in Preview3.Params
-
- +
self
: borrow<outgoing-datagram-stream
>self
: borrow<outgoing-datagram-stream
>Return values
-Import interface wasi:sockets/udp-create-socket@0.2.1
+Import interface wasi:sockets/udp-create-socket@0.2.2
Types
-+
type network
type network
-#### `type error-code` +#### `type error-code` [`error-code`](#error_code)
-#### `type ip-address-family` +#### `type ip-address-family` [`ip-address-family`](#ip_address_family)
-#### `type udp-socket` +#### `type udp-socket` [`udp-socket`](#udp_socket)
----
Functions
-+
create-udp-socket: func
create-udp-socket: func
Create a new UDP socket.
Similar to
@@ -730,16 +730,16 @@ the socket is effectively an in-memory configuration object, unable to communicasocket(AF_INET or AF_INET6, SOCK_DGRAM, IPPROTO_UDP)
in POSIX. On IPv6 sockets, IPV6_V6ONLY is enabled by default and can't be configured otherwise.Params
-
- +
address-family
:ip-address-family
address-family
:ip-address-family
Return values
-
-- result<own<
+udp-socket
>,error-code
>- result<own<
udp-socket
>,error-code
>Import interface wasi:io/error@0.2.1
+Import interface wasi:io/error@0.2.2
Types
-+
resource error
resource error
A resource which represents some error information.
The only method provided by this resource is
@@ -754,7 +754,7 @@ parameter and returns anto-debug-string
, which provides some human-readable information about the error.option<wasi:filesystem/types/error-code>The set of functions which can "downcast" an
error
into a more concrete type is open.Functions
-+
[method]error.to-debug-string: func
[method]error.to-debug-string: func
Returns a string that is suitable to assist humans in debugging this error.
WARNING: The returned string should not be consumed mechanically! @@ -763,42 +763,44 @@ details. Parsing this string is a major platform-compatibility hazard.
Params
Return values
-Import interface wasi:io/streams@0.2.1
+Import interface wasi:io/streams@0.2.2
WASI I/O is an I/O abstraction API which is currently focused on providing stream types.
In the future, the component model is expected to add built-in stream types; when it does, they are expected to subsume this API.
Types
-+
type error
type error
-#### `type pollable` +#### `type pollable` [`pollable`](#pollable)
-#### `variant stream-error` +#### `variant stream-error`
An error for input-stream and output-stream operations.
Variant Cases
-
- -
+
last-operation-failed
: own<error
>
last-operation-failed
: own<error
>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
.- - +
The stream is closed: no more input will be accepted by the stream. A closed output-stream will return this error on all future operations.
+
resource input-stream
resource input-stream
An input bytestream.
-
input-stream
s are non-blocking to the extent practical on underlying platforms. I/O operations always return promptly; if fewer bytes are @@ -806,7 +808,7 @@ promptly available than requested, they return the number of bytes promptly available, which could even be zero. To wait for data to be available, use thesubscribe
function to obtain apollable
which can be polled for usingwasi:io/poll
.+
resource output-stream
resource output-stream
An output bytestream.
progress may result in the data being lost. Before dropping the stream, be sure to fully flush your writes.
output-stream
s are non-blocking to the extent practical on underlying platforms. Except where specified otherwise, I/O operations also @@ -818,7 +820,7 @@ polled for usingwasi:io/poll
.Functions
-+
[method]input-stream.read: func
[method]input-stream.read: func
Perform a non-blocking read from the stream.
When the source of a
read
is binary data, the bytes from the source are returned verbatim. When the source of aread
is known to the @@ -842,51 +844,51 @@ as a return value by the callee. The callee may return a list of bytes less thanlen
in size while more bytes are available for reading.Params
-
- -
self
: borrow<input-stream
>- +
len
:u64
- +
self
: borrow<input-stream
>len
:u64
Return values
-
-- result<list<
+u8
>,stream-error
>- result<list<
u8
>,stream-error
>+
[method]input-stream.blocking-read: func
[method]input-stream.blocking-read: func
Read bytes from a stream, after blocking until at least one byte can be read. Except for blocking, behavior is identical to
read
.Params
-
- -
self
: borrow<input-stream
>- +
len
:u64
- +
self
: borrow<input-stream
>len
:u64
Return values
-
-- result<list<
+u8
>,stream-error
>- result<list<
u8
>,stream-error
>+
[method]input-stream.skip: func
[method]input-stream.skip: func
Skip bytes from a stream. Returns number of bytes skipped.
Behaves identical to
read
, except instead of returning a list of bytes, returns the number of bytes consumed from the stream.Params
-
- -
self
: borrow<input-stream
>- +
len
:u64
- +
self
: borrow<input-stream
>len
:u64
Return values
-
-- result<
+u64
,stream-error
>- result<
u64
,stream-error
>+
[method]input-stream.blocking-skip: func
[method]input-stream.blocking-skip: func
Skip bytes from a stream, after blocking until at least one byte can be skipped. Except for blocking behavior, identical to
skip
.Params
-
- -
self
: borrow<input-stream
>- +
len
:u64
- +
self
: borrow<input-stream
>len
:u64
Return values
-
-- result<
+u64
,stream-error
>- result<
u64
,stream-error
>+
[method]input-stream.subscribe: func
[method]input-stream.subscribe: func
Create a
pollable
which will resolve once either the specified stream has bytes available to read or the other end of the stream has been closed. @@ -895,13 +897,13 @@ Implementations may trap if theinput-stream
pollable
s created with this function are dropped.Params
-
- +
self
: borrow<input-stream
>self
: borrow<input-stream
>Return values
-+
[method]output-stream.check-write: func
[method]output-stream.check-write: func
Check readiness for writing. This function never blocks.
Returns the number of bytes permitted for the next call to
write
, or an error. Callingwrite
with more bytes than this function has @@ -911,13 +913,13 @@ become ready when this function will report at least 1 byte, or an error.Params
-
- +
self
: borrow<output-stream
>self
: borrow<output-stream
>Return values
-
-- result<
+u64
,stream-error
>- result<
u64
,stream-error
>+
[method]output-stream.write: func
[method]output-stream.write: func
Perform a write. This function never blocks.
When the destination of a
the last call to check-write provided a permit.write
is binary data, the bytes fromcontents
are written verbatim. When the destination of awrite
is @@ -930,14 +932,14 @@ length of less than or equal to n. Otherwise, this function will trap.Params
-
- -
self
: borrow<output-stream
>- +
contents
: list<u8
>- +
self
: borrow<output-stream
>contents
: list<u8
>Return values
-
-- result<_,
+stream-error
>- result<_,
stream-error
>+
[method]output-stream.blocking-write-and-flush: func
[method]output-stream.blocking-write-and-flush: func
Perform a write of up to 4096 bytes, and then flush the stream. Block until all of these operations are complete, or an error occurs.
This is a convenience wrapper around the use of
check-write
, @@ -961,14 +963,14 @@ let _ = this.check-write(); // eliding error handlingParams
-
- -
self
: borrow<output-stream
>- +
contents
: list<u8
>- +
self
: borrow<output-stream
>contents
: list<u8
>Return values
-
-- result<_,
+stream-error
>- result<_,
stream-error
>+
[method]output-stream.flush: func
[method]output-stream.flush: func
Request to flush buffered output. This function never blocks.
This tells the output-stream that the caller intends any buffered output to be flushed. the output which is expected to be flushed @@ -979,24 +981,24 @@ completed. The
subscribe
pollable will become ready when the flush has completed and the stream can accept more writes.Params
-
- +
self
: borrow<output-stream
>self
: borrow<output-stream
>Return values
-
-- result<_,
+stream-error
>- result<_,
stream-error
>+
[method]output-stream.blocking-flush: func
[method]output-stream.blocking-flush: func
Request to flush buffered output, and block until flush completes and stream is ready for writing again.
Params
-
- +
self
: borrow<output-stream
>self
: borrow<output-stream
>Return values
-
-- result<_,
+stream-error
>- result<_,
stream-error
>+
[method]output-stream.subscribe: func
[method]output-stream.subscribe: func
Create a
pollable
which will resolve once the output-stream is ready for more writing, or an error has occurred. When this pollable is ready,check-write
will returnok(n)
with n>0, or an @@ -1007,13 +1009,13 @@ Implementations may trap if theoutput-stream
s created with this function are dropped.pollable
Params
-
- +
self
: borrow<output-stream
>self
: borrow<output-stream
>Return values
-+
[method]output-stream.write-zeroes: func
[method]output-stream.write-zeroes: func
Write zeroes to a stream.
This should be used precisely like
write
with the exact same preconditions (must use check-write first), but instead of @@ -1021,14 +1023,14 @@ passing a list of bytes, you simply pass the number of zero-bytes that should be written.Params
-
- -
self
: borrow<output-stream
>- +
len
:u64
- +
self
: borrow<output-stream
>len
:u64
Return values
-
-- result<_,
+stream-error
>- result<_,
stream-error
>+
[method]output-stream.blocking-write-zeroes-and-flush: func
[method]output-stream.blocking-write-zeroes-and-flush: func
Perform a write of up to 4096 zeroes, and then flush the stream. Block until all of these operations are complete, or an error occurs.
@@ -1052,14 +1054,14 @@ let _ = this.check-write(); // eliding error handlingParams
-
- -
self
: borrow<output-stream
>- +
len
:u64
- +
self
: borrow<output-stream
>len
:u64
Return values
-
-- result<_,
+stream-error
>- result<_,
stream-error
>+
[method]output-stream.splice: func
[method]output-stream.splice: func
Read from one stream and write to another.
The behavior of splice is equivalent to:
@@ -1074,30 +1076,30 @@ let _ = this.check-write(); // eliding error handling than
len
.Params
-
- -
self
: borrow<output-stream
>- -
src
: borrow<input-stream
>- +
len
:u64
- +
self
: borrow<output-stream
>- +
src
: borrow<input-stream
>len
:u64
Return values
-
-- result<
+u64
,stream-error
>- result<
u64
,stream-error
>+
[method]output-stream.blocking-splice: func
[method]output-stream.blocking-splice: func
Read from one stream and write to another, with blocking.
This is similar to
splice
, except that it blocks until theoutput-stream
is ready for writing, and theinput-stream
is ready for reading, before performing thesplice
.Params
-
- -
self
: borrow<output-stream
>- -
src
: borrow<input-stream
>- +
len
:u64
- +
self
: borrow<output-stream
>- +
src
: borrow<input-stream
>len
:u64
Return values
-
-- result<
+u64
,stream-error
>- result<
u64
,stream-error
>Import interface wasi:clocks/monotonic-clock@0.2.1
+Import interface wasi:clocks/monotonic-clock@0.2.2
WASI Monotonic Clock is a clock API intended to let users measure elapsed time.
It is intended to be portable at least between Unix-family platforms and @@ -1106,100 +1108,100 @@ Windows.
successive reads of the clock will produce non-decreasing values.
Types
-+
type pollable
type pollable
-#### `type instant` +#### `type instant` `u64`
An instant in time, in nanoseconds. An instant is relative to an unspecified initial value, and can only be compared to instances from the same monotonic-clock. -
+
type duration
type duration
u64
A duration of time, in nanoseconds.
Functions
-+
now: func
now: func
Read the current value of the clock.
The clock is monotonic, therefore calling this function repeatedly will produce a sequence of non-decreasing values.
Return values
-+
resolution: func
resolution: func
Query the resolution of the clock. Returns the duration of time corresponding to a clock tick.
Return values
-+
subscribe-instant: func
subscribe-instant: func
Create a
pollable
which will resolve once the specified instant has occurred.Params
Return values
-+
subscribe-duration: func
subscribe-duration: func
Create a
pollable
that will resolve after the specified duration has elapsed from the time this function is invoked.Params
Return values
-Import interface wasi:sockets/tcp@0.2.1
+Import interface wasi:sockets/tcp@0.2.2
Types
-+
type input-stream
type input-stream
-#### `type output-stream` +#### `type output-stream` [`output-stream`](#output_stream)
-#### `type pollable` +#### `type pollable` [`pollable`](#pollable)
-#### `type duration` +#### `type duration` [`duration`](#duration)
-#### `type network` +#### `type network` [`network`](#network)
-#### `type error-code` +#### `type error-code` [`error-code`](#error_code)
-#### `type ip-socket-address` +#### `type ip-socket-address` [`ip-socket-address`](#ip_socket_address)
-#### `type ip-address-family` +#### `type ip-address-family` [`ip-address-family`](#ip_address_family)
-#### `enum shutdown-type` +#### `enum shutdown-type`
Enum Cases
-
- - +
Similar to `SHUT_RD` in POSIX.
- - +
Similar to `SHUT_WR` in POSIX.
- - +
Similar to `SHUT_RDWR` in POSIX.
+
resource tcp-socket
resource tcp-socket
A TCP socket resource.
The socket can be in one of the following states:
@@ -1221,7 +1223,7 @@ the term "bound" without backticks it actually means: in the
bou
network::error-code
type, TCP socket methods may always returnerror(invalid-state)
when in theclosed
state.Functions
-+
[method]tcp-socket.start-bind: func
[method]tcp-socket.start-bind: func
Bind the socket to a specific network on the provided IP address and port.
If the IP address is zero (
0.0.0.0
in IPv4,::
in IPv6), it is left to the implementation to decide which network interface(s) to bind to. @@ -1260,24 +1262,24 @@ don't want to make use of this ability can simply call the nativeParams
-
- -
self
: borrow<tcp-socket
>- -
network
: borrow<network
>- +
local-address
:ip-socket-address
- +
self
: borrow<tcp-socket
>- +
network
: borrow<network
>local-address
:ip-socket-address
Return values
-
-- result<_,
+error-code
>- result<_,
error-code
>+
[method]tcp-socket.finish-bind: func
[method]tcp-socket.finish-bind: func
Params
-
- +
self
: borrow<tcp-socket
>self
: borrow<tcp-socket
>Return values
-
-- result<_,
+error-code
>- result<_,
error-code
>+
[method]tcp-socket.start-connect: func
[method]tcp-socket.start-connect: func
Connect to a remote endpoint.
On success:
@@ -1322,24 +1324,24 @@ the
SO_ERROR
socket option, in case the poll signaled readiness.Params
-
- -
self
: borrow<tcp-socket
>- -
network
: borrow<network
>- +
remote-address
:ip-socket-address
- +
self
: borrow<tcp-socket
>- +
network
: borrow<network
>remote-address
:ip-socket-address
Return values
-
-- result<_,
+error-code
>- result<_,
error-code
>+
[method]tcp-socket.finish-connect: func
[method]tcp-socket.finish-connect: func
Params
-
- +
self
: borrow<tcp-socket
>self
: borrow<tcp-socket
>Return values
-
-- result<(own<
+input-stream
>, own<output-stream
>),error-code
>- result<(own<
input-stream
>, own<output-stream
>),error-code
>+
[method]tcp-socket.start-listen: func
[method]tcp-socket.start-listen: func
Start listening for new connections.
Transitions the socket into the
listening
state.Unlike POSIX, the socket must already be explicitly bound.
@@ -1366,22 +1368,22 @@ don't want to make use of this ability can simply call the nativeParams
-
- +
self
: borrow<tcp-socket
>self
: borrow<tcp-socket
>Return values
-
-- result<_,
+error-code
>- result<_,
error-code
>+
[method]tcp-socket.finish-listen: func
[method]tcp-socket.finish-listen: func
Params
-
- +
self
: borrow<tcp-socket
>self
: borrow<tcp-socket
>Return values
-
-- result<_,
+error-code
>- result<_,
error-code
>+
[method]tcp-socket.accept: func
[method]tcp-socket.accept: func
Accept a new client socket.
The returned socket is bound and in the
connected
state. The following properties are inherited from the listener socket:@@ -1412,13 +1414,13 @@ a pair of streams that can be used to read & write to the connection.
Params
-
- +
self
: borrow<tcp-socket
>self
: borrow<tcp-socket
>Return values
-
-- result<(own<
+tcp-socket
>, own<input-stream
>, own<output-stream
>),error-code
>- result<(own<
tcp-socket
>, own<input-stream
>, own<output-stream
>),error-code
>+
[method]tcp-socket.local-address: func
[method]tcp-socket.local-address: func
Get the bound local address.
POSIX mentions:
@@ -1439,13 +1441,13 @@ stored in the object pointed to byaddress
is unspecified.Params
-
- +
self
: borrow<tcp-socket
>self
: borrow<tcp-socket
>Return values
-
-- result<
+ip-socket-address
,error-code
>- result<
ip-socket-address
,error-code
>+
[method]tcp-socket.remote-address: func
[method]tcp-socket.remote-address: func
Get the remote address.
Typical errors
@@ -1460,35 +1462,35 @@ stored in the object pointed to by
address
is unspecified.Params
-
- +
self
: borrow<tcp-socket
>self
: borrow<tcp-socket
>Return values
-
-- result<
+ip-socket-address
,error-code
>- result<
ip-socket-address
,error-code
>+
[method]tcp-socket.is-listening: func
[method]tcp-socket.is-listening: func
Whether the socket is in the
listening
state.Equivalent to the SO_ACCEPTCONN socket option.
Params
-
- +
self
: borrow<tcp-socket
>self
: borrow<tcp-socket
>Return values
-+
[method]tcp-socket.address-family: func
[method]tcp-socket.address-family: func
Whether this is a IPv4 or IPv6 socket.
Equivalent to the SO_DOMAIN socket option.
Params
-
- +
self
: borrow<tcp-socket
>self
: borrow<tcp-socket
>Return values
-+
[method]tcp-socket.set-listen-backlog-size: func
[method]tcp-socket.set-listen-backlog-size: func
Hints the desired listen queue size. Implementations are free to ignore this.
If the provided value is 0, an
@@ -1500,14 +1502,14 @@ Any other value will never cause an error, but it might be silently clamped and/invalid-argument
error is returned. Any other value will never cause an error, but it might be silently clamped and/or rounded.Params
-
- -
self
: borrow<tcp-socket
>- +
value
:u64
- +
self
: borrow<tcp-socket
>value
:u64
Return values
-
-- result<_,
+error-code
>- result<_,
error-code
>+
[method]tcp-socket.keep-alive-enabled: func
[method]tcp-socket.keep-alive-enabled: func
Enables or disables keepalive.
The keepalive behavior can be adjusted using:
@@ -1519,23 +1521,23 @@ These properties can be configured while
keep-alive-enabled
is falsEquivalent to the SO_KEEPALIVE socket option.
Params
-
- +
self
: borrow<tcp-socket
>self
: borrow<tcp-socket
>Return values
-
-- result<
+bool
,error-code
>- result<
bool
,error-code
>+
[method]tcp-socket.set-keep-alive-enabled: func
[method]tcp-socket.set-keep-alive-enabled: func
Params
-
- -
self
: borrow<tcp-socket
>- +
value
:bool
- +
self
: borrow<tcp-socket
>value
:bool
Return values
-
-- result<_,
+error-code
>- result<_,
error-code
>+
[method]tcp-socket.keep-alive-idle-time: func
[method]tcp-socket.keep-alive-idle-time: func
Amount of time the connection has to be idle before TCP starts sending keepalive packets.
If the provided value is 0, an
invalid-argument
error is returned. Any other value will never cause an error, but it might be silently clamped and/or rounded. @@ -1547,23 +1549,23 @@ I.e. after setting a value, reading the same setting back may return a differentParams
-
- +
self
: borrow<tcp-socket
>self
: borrow<tcp-socket
>Return values
-
-- result<
+duration
,error-code
>- result<
duration
,error-code
>+
[method]tcp-socket.set-keep-alive-idle-time: func
[method]tcp-socket.set-keep-alive-idle-time: func
Params
-
- -
self
: borrow<tcp-socket
>- +
value
:duration
- +
self
: borrow<tcp-socket
>value
:duration
Return values
-
-- result<_,
+error-code
>- result<_,
error-code
>+
[method]tcp-socket.keep-alive-interval: func
[method]tcp-socket.keep-alive-interval: func
The time between keepalive packets.
If the provided value is 0, an
invalid-argument
error is returned. Any other value will never cause an error, but it might be silently clamped and/or rounded. @@ -1575,23 +1577,23 @@ I.e. after setting a value, reading the same setting back may return a differentParams
-
- +
self
: borrow<tcp-socket
>self
: borrow<tcp-socket
>Return values
-
-- result<
+duration
,error-code
>- result<
duration
,error-code
>+
[method]tcp-socket.set-keep-alive-interval: func
[method]tcp-socket.set-keep-alive-interval: func
Params
-
- -
self
: borrow<tcp-socket
>- +
value
:duration
- +
self
: borrow<tcp-socket
>value
:duration
Return values
-
-- result<_,
+error-code
>- result<_,
error-code
>+
[method]tcp-socket.keep-alive-count: func
[method]tcp-socket.keep-alive-count: func
The maximum amount of keepalive packets TCP should send before aborting the connection.
If the provided value is 0, an
invalid-argument
error is returned. Any other value will never cause an error, but it might be silently clamped and/or rounded. @@ -1603,23 +1605,23 @@ I.e. after setting a value, reading the same setting back may return a differentParams
-
- +
self
: borrow<tcp-socket
>self
: borrow<tcp-socket
>Return values
-
-- result<
+u32
,error-code
>- result<
u32
,error-code
>+
[method]tcp-socket.set-keep-alive-count: func
[method]tcp-socket.set-keep-alive-count: func
Params
-
- -
self
: borrow<tcp-socket
>- +
value
:u32
- +
self
: borrow<tcp-socket
>value
:u32
Return values
-
-- result<_,
+error-code
>- result<_,
error-code
>+
[method]tcp-socket.hop-limit: func
[method]tcp-socket.hop-limit: func
Equivalent to the IP_TTL & IPV6_UNICAST_HOPS socket options.
If the provided value is 0, an
invalid-argument
error is returned.Typical errors
@@ -1628,23 +1630,23 @@ I.e. after setting a value, reading the same setting back may return a differentParams
-
- +
self
: borrow<tcp-socket
>self
: borrow<tcp-socket
>Return values
-
-- result<
+u8
,error-code
>- result<
u8
,error-code
>+
[method]tcp-socket.set-hop-limit: func
[method]tcp-socket.set-hop-limit: func
Params
-
- -
self
: borrow<tcp-socket
>- +
value
:u8
- +
self
: borrow<tcp-socket
>value
:u8
Return values
-
-- result<_,
+error-code
>- result<_,
error-code
>+
[method]tcp-socket.receive-buffer-size: func
[method]tcp-socket.receive-buffer-size: func
The kernel buffer space reserved for sends/receives on this socket.
If the provided value is 0, an
invalid-argument
error is returned. Any other value will never cause an error, but it might be silently clamped and/or rounded. @@ -1656,42 +1658,42 @@ I.e. after setting a value, reading the same setting back may return a differentParams
-
- +
self
: borrow<tcp-socket
>self
: borrow<tcp-socket
>Return values
-
-- result<
+u64
,error-code
>- result<
u64
,error-code
>+
[method]tcp-socket.set-receive-buffer-size: func
[method]tcp-socket.set-receive-buffer-size: func
Params
-
- -
self
: borrow<tcp-socket
>- +
value
:u64
- +
self
: borrow<tcp-socket
>value
:u64
Return values
-
-- result<_,
+error-code
>- result<_,
error-code
>+
[method]tcp-socket.send-buffer-size: func
[method]tcp-socket.send-buffer-size: func
Params
-
- +
self
: borrow<tcp-socket
>self
: borrow<tcp-socket
>Return values
-
-- result<
+u64
,error-code
>- result<
u64
,error-code
>+
[method]tcp-socket.set-send-buffer-size: func
[method]tcp-socket.set-send-buffer-size: func
Params
-
- -
self
: borrow<tcp-socket
>- +
value
:u64
- +
self
: borrow<tcp-socket
>value
:u64
Return values
-
-- result<_,
+error-code
>- result<_,
error-code
>+
[method]tcp-socket.subscribe: func
[method]tcp-socket.subscribe: func
Create a
pollable
which can be used to poll for, or block on, completion of any of the asynchronous operations of this socket.When
It's planned to be removed whenfinish-bind
,finish-listen
,finish-connect
oraccept
@@ -1707,13 +1709,13 @@ for more information.future
is natively supported in Preview3.Params
-
- +
self
: borrow<tcp-socket
>self
: borrow<tcp-socket
>Return values
-+
[method]tcp-socket.shutdown: func
[method]tcp-socket.shutdown: func
Initiate a graceful shutdown.
receive
: The socket is not expecting to receive any data from @@ -1740,31 +1742,31 @@ has no effect and returnsok
.Params
-
- -
self
: borrow<tcp-socket
>- +
shutdown-type
:shutdown-type
- +
self
: borrow<tcp-socket
>shutdown-type
:shutdown-type
Return values
-
-- result<_,
+error-code
>- result<_,
error-code
>Import interface wasi:sockets/tcp-create-socket@0.2.1
+Import interface wasi:sockets/tcp-create-socket@0.2.2
Types
-+
type network
type network
-#### `type error-code` +#### `type error-code` [`error-code`](#error_code)
-#### `type ip-address-family` +#### `type ip-address-family` [`ip-address-family`](#ip_address_family)
-#### `type tcp-socket` +#### `type tcp-socket` [`tcp-socket`](#tcp_socket)
----
Functions
-+
create-tcp-socket: func
create-tcp-socket: func
Create a new TCP socket.
Similar to
@@ -1786,31 +1788,31 @@ is called, the socket is effectively an in-memory configuration object, unable tsocket(AF_INET or AF_INET6, SOCK_STREAM, IPPROTO_TCP)
in POSIX. On IPv6 sockets, IPV6_V6ONLY is enabled by default and can't be configured otherwise.Params
-
- +
address-family
:ip-address-family
address-family
:ip-address-family
Return values
-
-- result<own<
+tcp-socket
>,error-code
>- result<own<
tcp-socket
>,error-code
>Import interface wasi:sockets/ip-name-lookup@0.2.1
+Import interface wasi:sockets/ip-name-lookup@0.2.2
Types
-+
type pollable
type pollable
-#### `type network` +#### `type network` [`network`](#network)
-#### `type error-code` +#### `type error-code` [`error-code`](#error_code)
-#### `type ip-address` +#### `type ip-address` [`ip-address`](#ip_address)
-#### `resource resolve-address-stream` +#### `resource resolve-address-stream`
Functions
-+
resolve-addresses: func
resolve-addresses: func
Resolve an internet host name to a list of IP addresses.
Unicode domain names are automatically converted to ASCII using IDNA encoding. If the input is an IP address string, the address is parsed and returned @@ -1832,14 +1834,14 @@ to (asynchronously) fetch the results.
Params
Return values
-
-- result<own<
+resolve-address-stream
>,error-code
>- result<own<
resolve-address-stream
>,error-code
>+
[method]resolve-address-stream.resolve-next-address: func
[method]resolve-address-stream.resolve-next-address: func
Returns the next address from the resolver.
This function should be called multiple times. On each call, it will return the next address in connection order preference. If all @@ -1854,21 +1856,21 @@ addresses have been exhausted, this function returns
none
.Params
-
- +
self
: borrow<resolve-address-stream
>self
: borrow<resolve-address-stream
>Return values
-
-- result<option<
+ip-address
>,error-code
>- result<option<
ip-address
>,error-code
>+
[method]resolve-address-stream.subscribe: func
[method]resolve-address-stream.subscribe: func
Create a
pollable
which will resolve once the stream is ready for I/O.Note: this function is here for WASI Preview2 only. It's planned to be removed when
future
is natively supported in Preview3.Params
-
- +
self
: borrow<resolve-address-stream
>self
: borrow<resolve-address-stream
>Return values
diff --git a/wit/deps.lock b/wit/deps.lock index 2b50429..5cab24d 100644 --- a/wit/deps.lock +++ b/wit/deps.lock @@ -1,9 +1,9 @@ [clocks] url = "https://github.com/WebAssembly/wasi-clocks/archive/main.tar.gz" -sha256 = "ea9d69ee803bc176e23e5268f5e24a2ac485dd1f62a0ab4c748e9d3f901f576f" -sha512 = "5efc22927c46cd56c41e5549ec775561c7fac2ea0d365abc0b55396d9475a7c9f984077a81f84a44a726f1c008fd2fadbffffa4fa53ecd5fbfd05afd379ab428" +sha256 = "c2da62619d1067646316e8592b583d77036d778e28b1154353e0825956b3d6aa" +sha512 = "4d409fc38b31646fc5de70160e81bd3fa67f9c99b4d24543b4fd40a922c7545739869521b8a997efb675d0816de8b001b6af7950e0cb0bc823d89b9f07b286c4" [io] url = "https://github.com/WebAssembly/wasi-io/archive/main.tar.gz" -sha256 = "2a74bd811adc46b5a0f19827ddbde89870e52b17615f4d0873f06fd977250caf" -sha512 = "94624f00c66e66203592cee820f80b1ba91ecdb71f682c154f25eaf71f8d8954197dcb64503bc21e72ed5e812af7eae876df47b7eb727b02db3a74a7ce0aefca" +sha256 = "6d8dbfaaaa685167c1829616dc7265f5f3cb776845879555612d56544f6d9bfc" +sha512 = "52219562c4183503169cd2947b8164e1c96974500a5adf15bbf382c5992a10a626cc89c3b319204aeda6698ce59cbca2c42f98f7fde296aa77b9db4b41154dbe" diff --git a/wit/deps/clocks/monotonic-clock.wit b/wit/deps/clocks/monotonic-clock.wit index 3c24840..233cace 100644 --- a/wit/deps/clocks/monotonic-clock.wit +++ b/wit/deps/clocks/monotonic-clock.wit @@ -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. /// @@ -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 diff --git a/wit/deps/clocks/timezone.wit b/wit/deps/clocks/timezone.wit index 212da66..349fb57 100644 --- a/wit/deps/clocks/timezone.wit +++ b/wit/deps/clocks/timezone.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.2.1; +package wasi:clocks@0.2.2; @unstable(feature = clocks-timezone) interface timezone { diff --git a/wit/deps/clocks/wall-clock.wit b/wit/deps/clocks/wall-clock.wit index 6be069a..ec05a1f 100644 --- a/wit/deps/clocks/wall-clock.wit +++ b/wit/deps/clocks/wall-clock.wit @@ -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. diff --git a/wit/deps/clocks/world.wit b/wit/deps/clocks/world.wit index 9251ac6..e36802c 100644 --- a/wit/deps/clocks/world.wit +++ b/wit/deps/clocks/world.wit @@ -1,4 +1,4 @@ -package wasi:clocks@0.2.1; +package wasi:clocks@0.2.2; @since(version = 0.2.0) world imports { diff --git a/wit/deps/io/error.wit b/wit/deps/io/error.wit index 4ea29c4..717135f 100644 --- a/wit/deps/io/error.wit +++ b/wit/deps/io/error.wit @@ -1,4 +1,4 @@ -package wasi:io@0.2.1; +package wasi:io@0.2.2; @since(version = 0.2.0) interface error { diff --git a/wit/deps/io/poll.wit b/wit/deps/io/poll.wit index b25ac72..49c1c5e 100644 --- a/wit/deps/io/poll.wit +++ b/wit/deps/io/poll.wit @@ -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. diff --git a/wit/deps/io/streams.wit b/wit/deps/io/streams.wit index b697e24..330f709 100644 --- a/wit/deps/io/streams.wit +++ b/wit/deps/io/streams.wit @@ -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. @@ -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 @@ -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. diff --git a/wit/deps/io/world.wit b/wit/deps/io/world.wit index 6405a4e..f7001cc 100644 --- a/wit/deps/io/world.wit +++ b/wit/deps/io/world.wit @@ -1,4 +1,4 @@ -package wasi:io@0.2.1; +package wasi:io@0.2.2; @since(version = 0.2.0) world imports { diff --git a/wit/ip-name-lookup.wit b/wit/ip-name-lookup.wit index dc56f30..8d6dcec 100644 --- a/wit/ip-name-lookup.wit +++ b/wit/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.1.{pollable}; + use wasi:io/poll@0.2.2.{pollable}; @since(version = 0.2.0) use network.{network, error-code, ip-address}; diff --git a/wit/network.wit b/wit/network.wit index 993c4ce..7f2d86a 100644 --- a/wit/network.wit +++ b/wit/network.wit @@ -1,7 +1,7 @@ @since(version = 0.2.0) interface network { @unstable(feature = network-error-code) - use wasi:io/error@0.2.1.{error}; + 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. diff --git a/wit/tcp.wit b/wit/tcp.wit index bae5a29..91f421b 100644 --- a/wit/tcp.wit +++ b/wit/tcp.wit @@ -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}; diff --git a/wit/udp.wit b/wit/udp.wit index b289e49..328d916 100644 --- a/wit/udp.wit +++ b/wit/udp.wit @@ -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}; diff --git a/wit/world.wit b/wit/world.wit index a1d4267..6e349c7 100644 --- a/wit/world.wit +++ b/wit/world.wit @@ -1,4 +1,4 @@ -package wasi:sockets@0.2.1; +package wasi:sockets@0.2.2; @since(version = 0.2.0) world imports {